Video Call
  • iOS
  • Android
  • Web : JavaScript
  • Flutter
  • React Native
  • Electron
  • Unity3D
  • Cocos Creator
  • Windows
  • macOS
  • Linux
  • Overview
  • Develop your app
    • Integrate the SDK
    • Implement a basic video call
    • Enhance basic feature
      • Use Tokens for authentication
      • Check the room connection status
      • Set up common video config
      • Set up common audio config
  • Best practices
    • Implement a video call for multiple users
  • Upgrade using advanced features
    • Advanced features
      • Configure the video
        • Improve your appearance in the video
        • Configure video codec
      • Improve video quality
        • Visualize the sound level
        • Monitor streaming quality
      • Message signaling
        • Broadcast real-time messages to a room
        • Quotas and limits
      • Share the screen
      • Mix the video streams
      • Publish multiple video streams
      • Replace the audio/video track
    • Distincitve features
      • Join multiple rooms
      • Customize the video and audio
      • Set the voice hearing range
      • Render the audio and video
      • Autoplay policy
      • Restrictions on playing multiple videos simultaneously in Safari
      • Play streams via URL
      • Browser compatibility
      • Audio mixing
      • Vitrual Background and Blur
    • Implement a video call using frameworks
      • Implement a video call using Vue
      • Implement a video call using Angular
      • Implement a video call using React
  • Resources & Reference
    • SDK
    • Sample codes
    • API reference
      • Client APIs
      • Server APIs
    • Debugging
      • Error codes
      • Logging/Version number
    • FAQs
    • Key concepts
  • Documentation
  • Video Call
  • Upgrade using advanced features
  • Distincitve features
  • Browser compatibility

Web SDK compatibility

Last updated:2023-12-13 16:18

Introduction

WebRTC is a JavaScript API that supports Web browsers to implement real-time audio or video calling and Web real-time Communications.

The ZEGO Web SDK implements the real-time audio and video features based on the WebRTC. Therefore, whether the Web SDK can be used in the current browser depends on whether the current browser is compatible with WebRTC. At present, WebRTC works well in Chrome, Firefox, and Safari on desktop clients and Safari on mobile clients.

This article describes the browser compatibility on both the desktop client and mobile client.

This document does not cover all browsers because platforms and some in-app browsers work differently, and those not listed in the following do not indicate not supported. For any questions, contact ZEGO technical support.

Desktop browsers

Supported browsers

Currently, the ZEGO Express Web SDK supports the following browsers on desktop devices:

WebRTC is currently best supported on Chrome. We recommend you use the latest version of Chrome and download the latest version of the Web SDK.

OS Browser Version compatibility Stream playing Stream publishing Screen sharing
macOS
Safari
11 or later
✔️
✔️
✔️ (Safari 13 or later)
Chrome
56 or later
✔️
✔️
✔️ (Chrome 72 or later)
Firefox
56 or later
✔️
✔️
✔️ (Firefox 66 or later)
Edge
80 or later
✔️
✔️
✔️
Windows
Chrome
56 or later
✔️
✔️
✔️ (Chrome72 or later)
Firefox
56 or later
✔️
✔️
✔️ (Firefox 66 or later)
Edge
80 or later
✔️
✔️
✔️

Restrictions

Differences between browsers dictate that the features supported may vary.

To ensure privacy, Chrome 81 or later, Safari, and Firefox browsers need to obtain the device ID only after you have granted the media device permission. For details, contact ZEGO technical support.

Browser Restrictions
Chrome
WebRTC technology was first proposed by Google, and Chrome was the first browser to support it, so there are fewer restrictions on Chrome.

  • Version: Chrome 58 or later. We recommend using 65 or later.
  • API: Some of the API features require a later version of Chrome. For details, refer to the Client APIs.
  • Devices: On some Windows devices, Chrome may not reach the set bit rate when using H.264 codec. Try turning off hardware acceleration or using `VP8` codec.
  • Resolution: On some Windows devices, if you use Chrome 90 or later (excluding 90) to play third-party videos and the video resolution is not a multiple of 8, image distortion may occur.
Firefox
  • Frame rate: Only supports 30 FPS.
  • Video coding: Setting video encoding on Firefox on some devices does not take effect. Currently known devices are: Windows 10 (MI), MacBook Pro (13-inch, 2016, Two Thunderbolt 3 ports).
  • Video codec: Firefox does not support H.264 codec on Mac devices using Apple M1 chip. For details, see Firefox official.
  • Stream quality detection: When you get stream quality statistics on Firefox, multiple field values are displayed as "0", such as "frameWidth".
  • video images: When you use the Web SDK on Firefox to communicate to some devices, you may see the peer screen rotated.
Safari
  • Resolution: Safari 11 only supports 480p and higher resolutions.
  • Video codec: Safari 12.1(or earlier)only supports `H.264` video codec.
  • Stream publishing: Safari doesn't support publish third-party streams.
  • Stream playing: Safari 13 may not hear the stream being played.
  • Stream quality detection: Some fields, such as `audioSendLevel`, are not supported when obtaining statistics about stream quality on Safari.
  • Audio playback: Audio may be spotty on Safari 14.0.1 on macOS.
  • Speaker: Because the `speakers` property (get by calling the enumDevices method) is empty. Safari cannot get the speaker information.

Android browsers

Supported browsers

Android supports customized WebView, so the WebView varies by device and application.

Currently, the ZEGO Express Web SDK supports the following browsers on Android devices:

We recommend you use Chrome because there is no guarantee that your native browser will support WebRTC well, as different phone manufacturers will make more or fewer changes to the browser kernel.

OS BrowserStream playingStream publishingScreen sharing
Android
Chrome
✔️
✔️
✖️
Firefox
✔️
✔️
✖️

Restrictions

The following are the compatibility restrictions of the Web SDK on Android:

Browser Restrictions
All browsers/In-app WebView
  • Screen sharing: Not supported.
  • Device label: The device label of a media device may not be available on some Android devices.
  • Compatibility: Compatibility of the browser depends on the browser version, running kernel, device chip, etc. We strongly recommend that you check compatibility before using the browser.
Chrome
Video codec: Chrome does not support H.264 codec on some Android devices, such as Huawei.
Firefox
  • Stream quality detection: When you get stream quality statistics on Firefox, multiple field values are displayed as "0", such as "frameWidth".
  • Video images: When you use the Web SDK on Firefox to communicate to some devices, you may see the peer screen rotated.

Some Android devices do not support H.264 codec. To check whether this codec can be used, call the checkSystemRequirements method. If H.264 is not supported, use the VP8 codec instead.

At the same time, some browsers do not support WebRTC technology, try Chrome if this happens.

iOS browsers

Supported browsers

On iOS, all apps with built-in browsers use the system WebView, so support for the Web SDK relies only on the iOS system version.

OS BrowserVersion compatibilityReceive (Stream playing)Send (Stream publishing)Screen sharing
iOS 11.1.2 or later
Safari
11 or later
✔️
✔️
✖️
iOS 12.1.4 or later
Chrome
-
✔️
✖️
✖️
iOS 14.3 or later
Chrome
-
✔️
✔️
✖️

Restrictions

The following are the compatibility restrictions of the Web SDK on iOS:

Browser Restrictions
All browsers/In-app WebView
  • Screen sharing: Not supported.
  • Stream publishing: If an application interrupts an audio or video stream publishing on an iOS device, the video stream cannot be automatically restored. In this case, you need to capture and publish the stream again.
Safari
  • Video codec: IOS Safari 12.1 and earlier versions only support `H.264` codec./li>
  • Resolution: Safari 11 only supports 480p and higher resolutions.
  • Media track: When you call the `getUserMedia` method of the browser to obtain tracks of the same media type for the second time, the media track obtained for the first time will be muted or turned to black screen.
  • Volume: In iOS 13, the volume of pull streams may varies randomly.
  • Audio routing switching: The voice route is switched randomly, that is, the voice may be heard from the headset without the headset plugged in, or the voice may still be heard from the speaker after the headset is plugged in.
  • Audio and video capturing: (Occasional) Unable to collect local audio or video after using another input device App (such as Siri).
  • Audio playback: Audio may be spotty on Safari 14.2 on iOS and Safari 14.0.1 on macOS.

Browser compatibility testing

Test browser compatibility with manual settings

To check the current browser compatibility, you can call the checkSystemRequirements method, and this can be used for testing compatibility of the WebRTC, video codec, custom capture, camera, microphone and screensharing.

const result = await zg.checkSystemRequirements();
// The returned [result] is the compatibility result.  [webRTC] is [true] indicates webRTC is supported, for more details, see the API documents.
console.log(result);
// {
//   webRTC: true,
//   customCapture: true,
//   camera: true,
//   microphone: true,
//   videoCodec: { H264: true, H265: false, VP8: true, VP9: true },
//   screenSharing: true,
//   errInfo: {}
// }

Test browser compatibility online

For your convenience, ZEGO provides an online detection tool, to help you automatically test whether the browser can run WebRTC applications properly. To use this tool, contact the ZEGO technical support.

The tool supports testing the following:

  • Browser compatibility
  • Device acquisition capability
  • H264 video codec
  • VP8 video codec
  • Speaker testing
  • Resolutions supported

This online testing tool realizes its testing function by calling checkSystemRequirements method. The following describes the principle in detail.


1. WebRTC testing

The ZEGO Web SDK implements the real-time audio and video features based on the WebRTC. Therefore, it is essential to test the WebRTC.

To check whether the current browser supports WebRTC, do the following:

  1. Call the checkSystemRequirements method to get the result object webRTC.
  2. You can tell by the returned results:
    • The current browser supports WebRTC when the result is true.
    • The current browser does not support WebRTC when the result is false, and the Web SDK can't be used normally.
const result = await zg.checkSystemRequirements();
console.log(result.webRTC)

2. Device acquisition capability testing

To check whether the current browser supports data acquisition by the devices (camera, microphone, and speaker), call the enumDevices method to get the device ID, label, and etc. You can tell based on the returned length of the device list.

const devicesInfo = await zg.enumDevices();
console.log(devicesInfo);

3. H264 video codec testing

To check whether the H264 is supported, call the checkSystemRequirements method. You can tell by the returned results: - The current webpage supports H264 when the result is true. - The current webpage does not support H264 when the result is false, and in this case, the connectivity can't be guaranteed.

const result = await zg.checkSystemRequirements();
console.log(result.videoCodec.H264)

4. VP8 video codec testing

To check whether the VP8 is supported, call the checkSystemRequirements method. You can tell by the returned results: - The current browser supports VP8 when the result is true. - The current browser does not support VP8 when the result is false, and in this case, the connectivity can't be guaranteed.

const result = await zg.checkSystemRequirements();
console.log(result.videoCodec.VP8)

5. Mircophone testing

To check whether the current browser supports collecting sound with a microphone, do the following:

  1. Call the checkSystemRequirements method.
  2. And call the enumDevices method to obtain the microphone device list, and get the corresponding microphone device ID and label. It indicates the current browser does support collecting sound with a microphone when the following shows in the returned results:
    • The microphone property is true.
    • The length of the microphone device list in the enumerated list is greater than 0.
const result = await zg.checkSystemRequirements();
console.log(result.microphone);

const devicesInfo = await zg.enumDevices();
console.log(devicesInfo.microphones);

6. Speaker testing

To test the speaker, play music with the HTML5 audio component, and see if you can hear what's playing.


7. Camera testing

To check whether the current browser supports collecting images with a camera, do the following:

  1. Call the checkSystemRequirements method.
  2. And call the enumDevices method to obtain the camera device list, and get the corresponding camera device ID and label. It indicates the current browser does support collecting images with a camera when the following shows in the returned results:
    • The camera property is true.
    • The length of the camera device list in the enumerated list is greater than 0.
const result = await zg.checkSystemRequirements();
console.log(result.camera);

const devicesInfo = await zg.enumDevices();
console.log(devicesInfo.cameras);

8. Resolutions supported

To test what resolutions the current device supports, do the following:

  1. Call the createZegoStream method to create video streams of different resolutions.

  2. And call the videoTrack.getSettings method to get the video resolution. If the returned resolution is the same as the stream you created, the test passes, and the resolution is supported; otherwise, the returned result shows it is not supported instead.

const zegoLocalStream = await zg.createZegoStream({
    camera: {
        video: {
            width,
            height
        }
    }
});

const settings = zegoLocalStream.stream.getVideoTracks()[0].getSettings();

9. Check the connectivity

To check whether the connectivity has been established, call the createZegoStream method to create a stream, and then call the startPublishingStream method to start publishing the stream.

If the testing fails, contact ZEGO technical support.

const zegoLocalStream = await zg.createZegoStream();
zg.startPublishingStream('streamID', zegoLocalStream);

zg.on("publisherStateUpdate", result => {
    console.log('publisherStateUpdate: ', result.streamID, result.state);

    if (result.state == 'PUBLISHING') {
        console.info(' publish  success ' + result.streamID);
    }
})
Page Directory