Documentation
ExpressVideoSDK Video Call
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Video Call
  • Resources & Reference
  • SDK
  • Upgrade guide
  • Upgrade guide v3.0.0+

Upgrade guide v3.0.0+

Last updated:2023-09-27 14:34

  • If your current SDK version is lower than 3.0.0, when you need to upgrade to any version of 3.0.0 or above. Please make sure to read this document.
  • In addition, it is recommended that you refer to the business-related interfaces changes in the Release notes between the current version and the target version.

This article will introduce the instructions and precautions when upgrading the Express Flutter SDK version to 3.0.0 and above.

Deprecation instructions

  1. Discard the [General], [Communication], and [Live] scenarios in the ZegoScenario scenario enumeration. For details, please refer to the Scenario-based audio and Video configuration document for adaptation. .

  2. Starting from this version, Express iOS SDK no longer supports bitcode.

Please refer to Apple's Xcode 14 Release Notes for instructions on deprecating bitcode.

Adaptation method: Open the configuration page of the Xcode project, find the "Enable Bitcode" option in the "Build Settings" page of App Target, and set it to "No".

delete instructions

Removed the following interfaces that were deprecated in previous versions.

method name Description
setDebugVerbose Sets the debug verbose switch and Language. This function is deprecated in version 2.3.0, please use enableDebugAssistant to realize the original function.
loginMultiRoom Multiple Rooms MultiRoom. This method is obsolete after version 2.9.0. If you need to implement the multi-room function, please call the setRoomMode function to set the multi-room mode before engine initialization, and then use loginRoom to Multiple Rooms, if you call the loginRoom function to Multiple Rooms, please make sure to pass in the same user information.
setPlayStreamVideoLayer Set the selected play streams Video layer. This function is deprecated after version 2.3.0, please use setPlayStreamVideoType instead.
enableAudioDataCallback Enable the callback for receiving additional Audio data. This function is deprecated after version 2.7.0, please use startAudioDataObserver and stopAudioDataObserver instead.
setReverbParam Set the specific parameters of the Reverb. This function is deprecated after version 1.18.0, please use setReverbPreset or setReverbAdvancedParam instead.
setBuiltInSpeakerOn Whether to use the built-in speaker to play sound. This function is deprecated after version 2.3.0, please use setAudioRouteToSpeaker instead.
onDeviceError Device error notification. This function is deprecated in version 2.15.0 and above, please use onLocalDeviceExceptionOccurred instead.

sample code

You can refer to the following sample code for interface changes.

setDebugVerbose

Before version 3.0.0

ZegoExpressEngine.instance.setDebugVerbose(true, ZegoLanguage.English);

3.0.0 and above

// Note, do not enable this feature in the online version! Use only during development!
// Note, do not enable this feature in the online version! Use only during development phase!"
ZegoExpressEngine.instance.enableDebugAssistant(true);

loginMultiRoom

Before version 3.0.0

ZegoExpressEngine.createEngineWithProfile(profile);

var user = ZegoUser.id("user1");
ZegoExpressEngine.instance.loginRoom("first_room", user);
ZegoExpressEngine.instance.loginMultiRoom("second_room");

3.0.0 and above

You can refer to Multiple Rooms documentation

// Must be set before calling [createEngine] to take effect, otherwise it will fail.
// Must be set before calling [createEngine] to take effect, otherwise it will fail.
ZegoExpressEngine.setRoomMode(ZegoRoomMode.MultiRoom);

ZegoExpressEngine.createEngineWithProfile(profile);

var user = ZegoUser.id("user1");
ZegoExpressEngine.instance.loginRoom("first_room", user);
ZegoExpressEngine.instance.loginRoom("second_room", user);

setPlayStreamVideoLayer

Before version 3.0.0

ZegoExpressEngine.instance.setPlayStreamVideoLayer("stream1", ZegoPlayerVideoLayer.Auto);

3.0.0 and above

You can refer to the Set Video encoding method document

ZegoExpressEngine.instance.setPlayStreamVideoType("stream1", ZegoVideoStreamType.Default);

enableAudioDataCallback

Before version 3.0.0

int bitmask = ZegoAudioDataCallbackBitMask.Captured | ZegoAudioDataCallbackBitMask.Player;
var param = ZegoAudioFrameParam(ZegoAudioSampleRate.SampleRate48K, ZegoAudioChannel.Mono);

// Start
ZegoExpressEngine.instance.enableAudioDataCallback(true, bitmask, param);

// Stop
ZegoExpressEngine.instance.enableAudioDataCallback(false, bitmask, param);

3.0.0 and above

int bitmask = ZegoAudioDataCallbackBitMask.Captured | ZegoAudioDataCallbackBitMask.Player;
var param = ZegoAudioFrameParam(ZegoAudioSampleRate.SampleRate48K, ZegoAudioChannel.Mono);

// Start
ZegoExpressEngine.instance.startAudioDataObserver(bitmask, param);

// Stop
ZegoExpressEngine.instance.stopAudioDataObserver();

setReverbParam

Before version 3.0.0

var param = ZegoReverbParam(ZegoReverbPreset.Basement);
ZegoExpressEngine.instance.setReverbParam(param);

3.0.0 and above

ZegoExpressEngine.instance.setReverbPreset(ZegoReverbPreset.Basement);

// param for the ZegoReverbAdvancedParam object;
ZegoExpressEngine.instance.setReverbAdvancedParam(param);

setBuiltInSpeakerOn

Before version 3.0.0

ZegoExpressEngine.instance.setBuiltInSpeakerOn(true);

3.0.0 and above

ZegoExpressEngine.instance.setAudioRouteToSpeaker(true);

onDeviceError

Before version 3.0.0

ZegoExpressEngine.onDeviceError(int errorCode, String deviceName) {
    // Handle device error
    // Handle device errors
}

3.0.0 and above

ZegoExpressEngine.onLocalDeviceExceptionOccurred(ZegoDeviceExceptionType exceptionType, ZegoDeviceType deviceType, String deviceID) {
    // Handle device error
    // Handle device errors
}
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code