In version 3.8.1, deprecated changes were made to the following API interfaces.
Abandoned the original onPublisherSendAudioFirstFrame
callback interface and replaced it with the onPublisherSendAudioFirstFrame callback of the same name, and added a channel
parameter to support callback-related event activities by publsih channel.
Before 3.8.1
static void Function()? onPublisherSendAudioFirstFrame;
After 3.8.1 and above
static void Function(ZegoPublishChannel channel)? onPublisherSendAudioFirstFrame;
Before 3.8.1
ZegoExpressEngine.onPublisherSendAudioFirstFrame = () {
// ...
};
After 3.8.1 and above
ZegoExpressEngine.onPublisherSendAudioFirstFrame = (channel) {
// ...
};
The original member function setAudioReceiveRange
interface of the ZegoRangeAudio class is discarded and replaced with the setAudioReceiveRange interface with the same name, and the parameter ZegoReceiveRangeParam type is extended to support setting the audio receiving range of the range voice.
Before 3.8.1
Future<void> setAudioReceiveRange(double range);
After 3.8.1 and above
Future<int> setAudioReceiveRange(ZegoReceiveRangeParam param);
Before 3.8.1
rangeAudio.setAudioReceiveRange(1.0);
After 3.8.1 and above
var param = ZegoReceiveRangeParam(0.5, 1.0);
rangeAudio.setAudioReceiveRange(param);
The original member function setStreamVocalRange
interface of the ZegoRangeAudio class is discarded and replaced with the setStreamVocalRange interface with the same name, and the parameter ZegoVocalRangeParam type is extended to support setting the voice range of a single stream of range voice.
Before 3.8.1
Future<void> setStreamVocalRange(String streamID, double vocalRange);
After 3.8.1 and above
Future<int> setStreamVocalRange(String streamID, ZegoVocalRangeParam param);
Before 3.8.1
rangeAudio.setStreamVocalRange(streamid, 1.0);
After 3.8.1 and above
var param = ZegoVocalRangeParam(0.5, 1.0);
rangeAudio.setStreamVocalRange(streamid, param);