logo
Video Call
On this page

Upgrade Guide for Version 2.20.0 and Above

2023-09-25

Warning
  • If your current SDK version is lower than 2.20.0 and you need to upgrade to any SDK version 2.20.0 or higher, please make sure to read this article.
  • In addition, it is recommended that you check the interfaces related to your business based on the current version number and target version number by referring to the change notes between the two versions in the Release Notes.

Starting from version 2.20.0, there are no longer API differences between Video Call and Voice Call. You can switch from the Video Call SDK to the Voice Call SDK at any time, and vice versa.

The difference between the two SDKs is that for the Voice Call SDK, some video-related APIs (e.g., video encoding parameter settings, the ZegoCanvas parameter for preview and playing streams, etc.) will have no effect after being set, but will not cause errors.

This change will affect the following APIs for the Android-Java and Linux-Java platforms (other platforms are not affected and can be upgraded directly). After a successful upgrade from an old version, compilation errors may occur and adaptation is required.

Java SDK (Android-Java and Linux-Java)

  • Compilation error:

  • Reason:

    // If you only want to play audio streams (without view), please do not set the "canvas" parameter to null. Instead, set an empty ZegoCanvas, or do not fill in the second parameter.
    // For version 2.20.0 and above, using this method will result in the error "error: reference to startPlayingStream is ambiguous".
    engine.startPlayingStream("streamid", null);
  • Adaptation method:

    // If you only want to play audio streams (without view), please do not set the "canvas" parameter to null. Instead, set an empty ZegoCanvas, or do not fill in the second parameter.
    // For version 2.20.0 and above, choose any of the following methods according to your needs.
    engine.startPlayingStream("streamid", new ZegoCanvas(null));
    engine.startPlayingStream("streamid");
2023-09-25

Previous

Release Notes

Next

Upgrade Guide for Version 3.0.0 and Above

On this page

Back to top