rtcEngine$onRemoteAudioPropertiesReport$totalRemoteVolume method
- dynamic engine,
- List audioPropertiesInfos,
- dynamic totalRemoteVolume
@detail callback
@author huangshouqin
@brief After calling enableAudioPropertiesReport:{@link #ByteRTCEngine#enableAudioPropertiesReport}, you will periodically receive this callback for the instantaneous information about the subscribed remote audio streams.
The remote audio streams includes the microphone audio and screen audio collected using the RTC SDK internal mechanism/custom mechanism.
@param engine ByteRTCEngine object
@param audioPropertiesInfos See ByteRTCRemoteAudioPropertiesInfo{@link #ByteRTCRemoteAudioPropertiesInfo}.
@param totalRemoteVolume The volume of the mixing of all the subscribed audio streams. The range is 0,255.
- 0,25 Is close to silent;
- 25,75 Is low volume;
- 76,204 Is medium volume;
- 205,255 Is high volume.
Implementation
FutureOr<void> rtcEngine$onRemoteAudioPropertiesReport$totalRemoteVolume(
dynamic engine,
List<dynamic> audioPropertiesInfos,
dynamic totalRemoteVolume) async {
if ($instance == null || $instance is! IRTCEngineEventHandler) {
return;
}
return ($instance as IRTCEngineEventHandler)
.onRemoteAudioPropertiesReport
?.call(
audioPropertiesInfos
.map((e) => packObject(
e,
() => RemoteAudioPropertiesInfo.fromMap(
RemoteAudioPropertiesInfo.deepPackedMapValues(
RemoteAudioPropertiesInfo
.mapMemberToConstructorParams(e)))))
.toList(),
int.tryParse(totalRemoteVolume.toString()) ?? 0);
}