setWTNRemoteAudioPlaybackVolume method
@detail api
@valid since 3.60. Since version 3.60, this interface replaces setPublicStreamAudioPlaybackVolume for the following function. If you have upgraded to version 3.60 or above and are still using this method, please migrate to this interface.
@author hanchenchen
@brief Set the audio playback volume of the WTN stream.
@param streamId ID of the WTN stream.
@param volume Ratio(%) of the audio playback volume to the original volume, in the range [0, 400], with overflow protection. The default volume is 100.
To ensure the audio quality, the recommended range is [0, 100].
@return
- 0: Success.
- -2: Wrong parameter.
@order 4
Implementation
Future<int?> setWTNRemoteAudioPlaybackVolume(
string streamId, int volume) async {
$a() => ($instance as $p_a.IWTNStream)
.setWTNRemoteAudioPlaybackVolume(streamId, volume);
$i() => ($instance as $p_i.ByteRTCWTNStream)
.setWTNRemoteAudioPlaybackVolume(streamId, volume);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}