products / solutions
Platform / Framework

How to solve the compilation error after upgrading to Express v2.20.0 or above?

Products / Plugins:Video Call / Voice Call / / / Live Streaming

Platform / Framework:iOS / Android / macOS / Windows / Linux

Last updated:2022-06-09 21:22

From v2.20.0, there is no longer any API difference between Express-Video SDK and Express-Audio SDK, that is, you can easily switch from Video SDK to Audio SDK and vice versa at any time. The only difference between the two SDKs is that for the Audio SDK, some video-related APIs (such as video encoding parameter settings, ZegoCanvas parameter in startPlayingStream, etc.) have no effect after being set, and no error will be reported.

**This change will affect the following APIs on the Android / Linux platform. After upgrading from the old version, it may cause few incompatibilities and need to be fixed. **

Java SDK (Android / Linux)

/Pics/FAQ/Android/express_v2_20_startplayingstream_error_java.png

// If you just want to play a stream with sound (without view), instead of setting the "canvas" parameter to null, set an empty ZegoCanvas, or leave the second parameter unset!
engine.startPlayingStream("streamid", null); // error: reference to startPlayingStream is ambiguous
engine.startPlayingStream("streamid", new ZegoCanvas(null)); // GOOD
engine.startPlayingStream("streamid"); // GOOD
Page Directory
Download PDF