Differences Between Video Call SDK and Voice Call SDK
From version v2.20.0 onwards, there is no longer any API difference 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 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 stream playing, etc.) will have no effect after being set, but will not cause errors.
The APIs involved are as follows:
- startPreview
- In the Video Call SDK: Starts the microphone, starts the camera, and if a view is passed in the view parameter, the SDK will render the preview image in that view.
- In the Voice Call SDK: Starts the microphone. Developers can set the canvas parameter to null when calling this API, or if there is an overload function, use the overload function of this API without the view parameter.
When calling startPreview on the Voice Call Flutter / Electron / uni-app / Unity3D / React-Native SDK, the camera will still be started. 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 view parameter, the SDK will render the video image of the played stream in that view.
- In the Voice Call SDK: Starts playing stream, plays the audio of the played stream. Developers can set the view parameter to null when calling this API, or if there is an overload function, use the overload function of this API without the view parameter.
All other video-related APIs have no effect in the Voice Call SDK. You can determine whether an API is video-related by the comment provided in the API: Note: This function is only available in ZegoExpressVideo SDK!. If this comment exists, it means the API is video-related.
