Browser compatibility and known issues
Overview
WebRTC is a JavaScript API that supports web browsers for real-time voice or video calls and real-time data transmission (Web Real-Time Communication).
ZEGO Express Web SDK uses WebRTC technology to implement Video Call features. Therefore, whether the Web SDK can be used in the current browser depends on the browser's compatibility with WebRTC. Currently, WebRTC is well supported on desktop browsers such as Chrome, Firefox, Safari, as well as mobile Safari browsers. This article will introduce the browser compatibility for desktop and mobile platforms respectively.
Due to platform differences and variations in built-in browsers for applications, we cannot cover all browsers. Browsers not listed in the following documentation do not necessarily indicate lack of support. If you have questions, please contact ZEGO Technical Support.
Desktop
Browser compatibility
Currently, the browsers and versions supported by ZEGO Express Web SDK on desktop are as follows:
WebRTC technology is best supported on the Chrome platform. It is recommended that developers use the latest version of Chrome browser and download the latest version of Web SDK.
| Operating system | Browser | Version compatibility | Play stream | Publish stream | Screen sharing |
|---|---|---|---|---|---|
| macOS | Safari browser | 11 or above | ✔️ | ✔️ | ✔️ (Requires Safari 13 or above) |
| Chrome browser | 56 or above | ✔️ | ✔️ | ✔️ (Requires Chrome 72 or above) | |
| Firefox browser | 56 or above | ✔️ | ✔️ | ✔️ (Requires Firefox 66 or above) | |
| Edge browser | 80 or above | ✔️ | ✔️ | ✔️ | |
| WeChat built-in browser | - | ✔️ | ✔️ | ✖ | |
| WeCom built-in browser | - | ✔️ | ✖ | ✖ | |
| Windows | Chrome browser | 56 or above | ✔️ | ✔️ | ✔️ (Requires Chrome72 or above) |
| QQ browser (Speed kernel) | 10.4 or above | ✔️ | ✔️ | ✖ | |
| Firefox browser | 56 or above | ✔️ | ✔️ | ✔️ (Requires Firefox 66 or above) | |
| Edge browser | 80 or above | ✔️ | ✔️ | ✔️ | |
| WeChat built-in browser | - | ✔️ | ✖ | ✖ | |
| WeCom built-in browser | - | ✔️ | ✖ | ✖ |
Compatibility limitations
Different browsers have variations, which may result in different supported features.
For privacy and security reasons, newer versions of Chrome (81 and above), Safari, and Firefox browsers require media device permissions before device IDs can be obtained. For details, please refer to Why can't I get device ID on Chrome 81 and above.
| Browser | Limitations |
|---|---|
| Chrome | WebRTC technology was first proposed by Google, and Chrome was the first browser to support it, so there are fewer restrictions on Chrome.
|
| Firefox |
|
| Safari |
|
Known issues and workarounds
| Known issue | Suggested workaround |
|---|---|
Calling the getStatus method returns an error: "Failed to execute getStats on 'RTCPeerConnection': The callback-based getStatss() method is no longer supported.", making it impossible to obtain publish/play stream quality normally. | Please upgrade Express Web SDK to version 2.25.1 or above. |
When using third-party media streams, if the captureStream method is called twice on the same HTMLMediaElement, the media stream obtained the first time will be stopped. | Please avoid this usage. If you need to re-capture third-party media streams, please replace the tracks of the subsequently captured streams in time. |
| Known issue | Suggested workaround |
|---|---|
Modifying audio bitrate on Firefox browser does not take effect. | Please upgrade Firefox to the latest version, or switch to another browser. |
| Known issue | Suggested workaround |
|---|---|
| On Safari 14.0.1 and 14.2, audio may be intermittent. | Please upgrade Safari to the latest version, or switch to another browser. |
Mobile
Android
Browser compatibility
Since the native WebView on the Android platform can be customized, WebView implementations may vary across different platforms, devices, and applications. The support for ZEGO Express Web SDK on Android is as follows:
Since different mobile phone manufacturers may modify their browser kernels to varying degrees, we cannot guarantee that built-in browsers will support WebRTC well. It is recommended that developers use Chrome browser.
| Operating system | Browser | Play stream | Publish stream | Screen sharing |
|---|---|---|---|---|
| Android | Chrome browser | ✔️ | ✔️ | ✖ |
| Firefox browser | ✔️ | ✔️ | ✖ | |
| QQ browser | ✔️ | ✔️ | ✖ | |
| UC browser | ✖ | ✖ | ✖ | |
| WeChat built-in browser (TBS kernel) | ✔️ | ✔️ | ✖ | |
| WeChat built-in browser (XWEB kernel) | ✔️ | ✔️ | ✖ | |
| WeCom built-in browser | ✔️ | ✔️ | ✖ |
Compatibility limitations
The compatibility limitations of Web SDK on Android are as follows:
| Browser | Limitations |
|---|---|
| All browsers/application embedded WebViews (such as WeChat built-in browser, QQ browser, UC browser, etc.) |
|
| Chrome | Encoding format:
|
| Firefox | Video image: When using Web SDK on Firefox to communicate with some devices, the remote image you see may be rotated. |
Some Android devices do not support H.264 encoding. Developers can detect through the checkSystemRequirements interface. If the current device does not support this encoding format, you can use "VP8" encoding. At the same time, some browsers do not support WebRTC technology. It is recommended that developers use Chrome browser.
iOS
Browser compatibility
Currently, all application built-in WebViews on the iOS platform can only use the system-provided ones, which has certain limitations.
| Operating system | Browser | Version compatibility | Receive (Play) | Send (Publish) | Screen sharing |
|---|---|---|---|---|---|
| iOS version >= 11.1.2 | Safari browser | 11 or above | ✔️ | ✔️ | ✖ |
| iOS version >= 12.1.4 && < 14.3 | Chrome browser | - | ✔️ | ✖ | ✖ |
| iOS version >= 14.3 | Chrome browser | - | ✔️ | ✔️ | ✖ |
| iOS version >= 12.1.4 && < 14.3 | WeChat built-in browser | - | ✔️ | ✖ | ✖ |
| iOS version >= 14.3 | WeChat built-in browser | 6.5 or above (WeChat version) | ✔️ | ✔️ | ✖ |
| iOS version >= 12.1.4 | WeCom built-in browser | - | ✔️ | ✖ | ✖ |
Compatibility limitations
The compatibility limitations of Web SDK on iOS are as follows:
| Browser | Limitations |
|---|---|
| All browsers/application embedded webviews |
|
| Safari |
|
HarmonyOS
Browser compatibility
Currently, the HarmonyOS system needs to be upgraded to HarmonyOS NEXT 5.0 or a higher version, and you need to use the Huawei browser to use WebRTC audio and video publish/play streams.
| Operating system | Browser | Version compatibility | Receive (Play) | Send (Publish) | Screen sharing |
|---|---|---|---|---|---|
| Version >= NEXT 5.0 | Huawei browser | - | ✔️ | ✔️ | ✖ |
Compatibility limitations
The compatibility limitations of Web SDK on HarmonyOS Huawei browser are as follows:
| Browser | Limitations |
|---|---|
| Huawei browser |
|
Known issues and workarounds
| Known issue | Suggested workaround |
|---|---|
| In the built-in browser of iPad WeChat, when turning the camera on/off during publishing in version 7.0.12, the playing stream will flash a 90-degree rotated image. | Please upgrade WeChat to the latest version. |
| There is no sound after playing streams on the built-in browser of "Honor" series mobile phones. | Please upgrade Express Web SDK to version 2.26.0 or above. |
| When using audio mixing or sound quality enhancement features on WeChat built-in browser on some iOS 17 systems, the <audio> tag player has no sound. | It is recommended not to use audio mixing, sound quality enhancement and other features. If you must use them, please upgrade to iOS 17.1.1 or above. |
| Known issue | Suggested workaround |
|---|---|
On iOS 16.0 and 16.1, if AudioContext is used during initialization, there is no sound when using the microphone to publish streams. | Please upgrade to iOS 16.2 or above. |
| When using audio mixing or sound quality enhancement features, the <audio> tag player has no sound. | It is recommended not to use audio mixing, sound quality enhancement and other features; if you must use them, please upgrade to iOS 17.1.1 or above. |
| Known issue | Suggested workaround |
|---|---|
| On some Android devices, because the device does not support H.264 encoding, using an older version of Chrome browser will result in publishing errors. | Please upgrade Chrome browser to the latest version. |
| Known issue | Suggested workaround |
|---|---|
| On HarmonyOS, when using Firefox browser to publish third-party video streams, publishing/preview is normal, but the screen is black when playing streams. | How to handle the situation where publishing/preview is normal but the screen is black when playing streams? |
Browser compatibility detection
Integration detection
Developers can use the checkSystemRequirements interface provided by ZEGO Express Web SDK to detect the compatibility of the current browser. This interface can detect WebRTC, video encoding, custom capture, camera, microphone, and screen sharing support.
const result = await zg.checkSystemRequirements();
// The returned result is the compatibility detection result. When webRTC is true, it means WebRTC is supported. For the meaning of other attributes, please refer to the interface API documentation.
console.log(result);
// {
// webRTC: true,
// customCapture: true,
// camera: true,
// microphone: true,
// videoCodec: { H264: true, H265: false, VP8: true, VP9: true },
// screenSharing: true,
// errInfo: {}
// }Online detection
ZEGO provides an online detection tool to help developers automatically detect whether the device browser can normally run WebRTC applications.
This tool supports detecting the following items:
- Browser compatibility
- Device acquisition capability
- H264 video encoding detection
- H265 video encoding detection
- VP8 video encoding detection
- Whether speaker playback is normal
- What resolutions the current device can support
The online detection tool automatically detects whether the browser supports the current voice and video call by calling the zg.checkSystemRequirements interface. The following will explain its principle item by item.
Web SDK implements audio and video communication based on WebRTC, so WebRTC detection is essential.
In the online detection page, the detection result object is obtained through the zg.checkSystemRequirements interface. There is a webRTC item in the object, which is used to detect whether the current page supports basic WebRTC capabilities. If the returned result is "true", it means WebRTC is supported; if the result is "false", it means it is not supported, and Web SDK cannot be used normally.
const result = await zg.checkSystemRequirements();
console.log(result.webRTC)Get the device list through the zg.enumDevices interface. The device list includes device IDs, labels, etc. for cameras, microphones, and speakers. Developers can determine whether the current page has the ability to obtain device information by the length of the device list.
const devicesInfo = await zg.enumDevices();
console.log(devicesInfo);Get compatibility with H264 through the zg.checkSystemRequirements interface. A returned result of "true" means the current page supports H264 encoding; a result of "false" means it is not supported, and if not supported, there may be interoperability issues.
const result = await zg.checkSystemRequirements();
console.log(result.videoCodec.H264)Get compatibility with H265 through the zg.checkSystemRequirements interface. A returned result of "true" means the current page supports H265 encoding; a result of "false" means it is not supported, and if not supported, there may be interoperability issues.
const result = await zg.checkSystemRequirements();
console.log(result.videoCodec.H265)Get support for VP8 through the zg.checkSystemRequirements interface. A returned result of "true" means the current page supports VP8 encoding; a result of "false" means it is not supported, and if not supported, there may be interoperability issues.
const result = await zg.checkSystemRequirements();
console.log(result.videoCodec.VP8)Detect whether the microphone sound can be normally captured through the zg.checkSystemRequirements interface.
Developers can obtain the microphone device list through the zg.enumDevices() interface and get the corresponding microphone device ID and label. If the parameter "microphone" in the detection result is "true" and the length of the microphone device list in the enumerated device list is greater than 0, it means the current page supports microphone capture.
const result = await zg.checkSystemRequirements();
console.log(result.microphone);
const devicesInfo = await zg.enumDevices();
console.log(devicesInfo.microphones);Play a piece of music through the HTML5 audio component, and after the user clicks to play, confirm whether the playing sound is heard.
Determine whether the current page supports camera capture through the zg.checkSystemRequirements interface.
Developers can obtain the camera device list through zg.enumDevices and get the corresponding camera device ID and label. If the parameter "camera" in the detection result is "true" and the length of the camera device list in the enumerated device list is greater than 0, it means the current page supports camera capture.
const result = await zg.checkSystemRequirements();
console.log(result.camera);
const devicesInfo = await zg.enumDevices();
console.log(devicesInfo.cameras);Create a video stream through the zg.createZegoStream interface based on different resolution parameters.
Developers can obtain the video resolution through videoTrack.getSettings. If the obtained resolution is the same as the parameter, the test passes; otherwise, it indicates that it is not supported.
const zegoLocalStream = await zg.createZegoStream({
camera: {
video: {
width,
height
}
}
});
const settings = zegoLocalStream.stream.getVideoTracks()[0].getSettings();Call the zg.createZegoStream interface to create a stream, and call the zg.startPublishingStream interface to connect to the ZEGO server and start publishing to detect the availability of the current network link.
If it indicates not supported, please check the current network status or 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);
}
})