logo
On this page

Compilation error after upgrading to Express v2.20.0 or later?

2023-11-01
Products / Plugins:Video Call / Audio Call / Live streaming
Platform / Framework:Android / Linux

Starting from version 2.20.0, there is no longer an API difference between Video Call and Voice Call, meaning you can switch between Video Call SDK and Voice Call SDK at any time, and vice versa.

The difference between the two SDKs is that for the real-time voice SDK, some video-related APIs (for example, video encoding parameter settings, preview and play stream ZegoCanvas parameters, etc.) have no effect after being set, but will not report errors.

This change will affect the following APIs on the Android-Java platform (other platforms are not affected and can be upgraded directly). After successful upgrade from the old version, compilation errors may occur and need to be adapted.

  • Compilation error:

  • Reason:

    // If you only want to play a stream with sound (no view), do not set the "canvas" parameter to null, but set an empty ZegoCanvas, or do not fill in the second parameter.
    // In version 2.20.0 and above, using this method will report an error "error: reference to startPlayingStream is ambiguous".
    engine.startPlayingStream("streamid", null);
  • Adaptation method:

    // If you only want to play a stream with sound (no view), do not set the "canvas" parameter to null, but set an empty ZegoCanvas, or do not fill in the second parameter.
    // In version 2.20.0 and above, choose any of the following according to your needs.
    engine.startPlayingStream("streamid", new ZegoCanvas(null));
    engine.startPlayingStream("streamid");

Previous

Why doesn't the transcoding clarity take effect immediately after setting it, and re-rendering also doesn't work?

Next

When the camera supports it, the preview is set to 1920 * 1080, but the actual published stream is only 640 * 480. How should this be handled?