logo
On this page

Differences between Video Call SDK and Voice Call SDK

2024-04-03

Starting from version v2.20.0, there are no longer API differences between Video Call and Voice Call, which means you can switch from the Video Call SDK to the Voice Call SDK at any time, and vice versa.

The only difference between the Voice Call SDK and the Video Call SDK is functional: For the Voice Call SDK, some video-related APIs (such as video encoding parameter settings, ZegoCanvas parameters for preview and playing streams, etc.) have no effect when set, but will not cause errors.

The involved APIs are as follows:

  • startPreview
    • In the Video Call SDK: Starts the microphone, starts the camera, and if a view is passed in the canvas parameter, the SDK will render the preview in that view.
    • In the Voice Call SDK: Starts the microphone. When calling this API, developers can set the canvas parameter to null, or if there is an overloaded function, use the overloaded function of this API without the canvas parameter.
Warning

When calling startPreview on the Voice Call Flutter / Electron / uni-app / Unity3D / Cocos Creator / React-Native SDK, the camera will still start; developers can call enableCamera to turn off the camera before calling startPreview to avoid the SDK requesting camera permissions.

  • startPlayingStream
    • In the Video Call SDK: Starts playing stream, plays the audio of the played stream, and if the developer passes a view in the canvas parameter, the SDK will render the video of the played stream in that view.
    • In the Voice Call SDK: Starts playing stream, plays the audio of the played stream. When calling this API, developers can set the canvas parameter to null, or if there is an overloaded function, use the overloaded function of this API without the canvas parameter.
Warning

All other video-related APIs have no effect in the Voice Call SDK. You can determine whether an API is video-related by the note provided in the API: Note: This function is only available in ZegoExpressVideo SDK!. If this note exists, it means the API is video-related.

Previous

Product Features

Next

Download SDK

On this page

Back to top