Announcement
The Video SDK for web version 2.1.0 adds WebRTC to Zoom's real-time media stack to support an even wider range of devices and use cases.
By default, Zoom will automatically detect whether to use WebRTC or WebAssembly (Wasm) for desktop browsers based on device capabilities. This ensures optimal performance across various devices and browsers. We recommend using this default, although you can override it with new SDK JWT fields.
To enable WebRTC
Follow these steps to leverage WebRTC within Zoom's real-time web media stack.
- Update to version 2.1.0 from npm or use the CDN.
- If you were using
renderVideoandstopRenderVideoto render videos, update your code to useattachVideoanddetachVideoinstead. See these examples for rendering the self and remote user videos. - If you were using the
startorpreviewVirtualBackgroundfunctions, pass in the customvideo-playerelement (inside the customvideo-player-containerelement) instead of avideoorcanvasHTML element. See pre-session video preview and in-session virtual background preview for examples. - Be sure to follow the Zoom network firewall or proxy server settings guidelines.
Breaking Changes
- Updates audio exception handling in speaker-only mode on certain devices (such as iOS).
- Previously, when a user started audio without a microphone (listening mode, with
speakerOnly: true) and no one spoke for at least 5 minutes, the system would interrupt audio playback, causing the Video SDK to automatically leave the audio in an attempt to recover. - In version 2.1.0, instead of leaving the audio, the Video SDK will trigger an
active-media-failedevent with the payloaderrorCode: ActiveMediaFailedCode.AudioStreamMuted, notifying the developer to display a toast to prompt the user to interact with the page to restore audio. See Handle events for details.
- Previously, when a user started audio without a microphone (listening mode, with
- Updates the exception reason returned by
stream.startAudio()fromUSER_FORBIDDEN_MICROPHONEto a more generalAUDIO_CAPTURE_FAILEDstring.
Added
- Support for WebRTC video and audio.
Enhanced
- Improved the
active-media-failedmessage payload to include detailed exception types and recommended messages. We strongly recommend listening to theactive-media-failedevent and handling the exceptions. - Improved the socket connection with Zoom TP protocol, significantly reducing the frequency of session reconnections.
Fixed
- Issues with media playback as video input on macOS Safari.
- Issue where the
client.joinmethod didn't return a rejected promise when failing to join a session.
Known issues
- 1080p video (send) - supported by WebAssembly on high performance machines, not supported by WebRTC.
- When
originalRatioset tofalse- WebAssembly video supports cropping to 16/9; WebRTC does not. - Configurable max video FPS - WebAssembly video supports configuring the max capture FPS; WebRTC does not.
- A/V sync - On WebRTC receiver side, audio/video synchronization is currently not supported.
FAQs
How can I default to using WebRTC?
Set the video_webrtc_mode and audio_webrtc_mode properties in the SDK JWT to override the default detection and automatically use WebRTC for video and audio communications. Note that on browsers that do not support WebRTC video, even if you set the video_webrtc_mode value to 1, Zoom will use WebAssembly video.
Do I still need SharedArrayBuffer?
Certain WebAssembly features required SharedArrayBuffer for optimal performance, such as rendering multiple videos and using a virtual background. Now that Zoom has added WebRTC, SharedArrayBuffer is no longer required for these features.
However, if you had SharedArrayBuffer enabled previously and plan to disable it, you will lose the ability to optimize screen share for video clips , which prioritizes FPS over resolution during the screen share.
Can you use WebRTC and Wasm in the same session?
Different users can use WebRTC and WebAssembly in the same session. For example, if User A is using WebRTC, User B is using Wasm, and User C is using a native client like the Video SDK for iOS, they can all communicate successfully in the same session.
Which browsers are supported?
See WebRTC video and WebRTC audio rows in browser support for details.
