You can integrate Player SDK for Web into your web applications and use the SDK for live streaming and on-demand streaming. This topic describes the features of Player SDK for Web and its compatibility with browsers.
Overview
Player SDK for Web uses the <video> tag of the HTML5 player to play videos in web applications. It is compatible with multiple browsers, including Chrome and Safari, to ensure consistent video playback across various platforms. Player SDK for Web also supports features such as hotlink protection, encrypted playback, and quality monitoring based on ApsaraVideo Live and VOD.
License update
Starting December 1, 2024, a license is required before you can use Player SDK for Web V2.28.0 and later. Versions earlier than 2.28.0 are not affected by this change. However, we recommend that you update to the latest version for more comprehensive services and support. For more information, see Manage licenses.
Supported protocols
VOD scenarios
The following table describes the playback protocols and codecs supported by Player SDK for Web.
Video codec | Video protocol | Audio file format | Audio codec |
H.264 |
| MP3 | AAC |
H.265 Note
|
| None | |
H.266 Note
| MP4 | None |
Live streaming scenarios
The following table describes the live streaming protocols and codecs supported by Player SDK for Web.
Video codec | Video protocol | Audio codec | Audio file format |
H.264 | HLS, FLV, RTS, and DASH | AAC | None |
H.265 | HLS and FLV (codec ID = 12) | ||
H.266 | HLS and FLV |
The following table describes the benefits and limits of each live streaming protocol.
Protocol | Advantage | Disadvantage | Latency |
HLS | HLS is compatible with a variety of browsers. | The latency is high. | > 10s |
FLV | FLV supports high concurrency and is suitable for native applications. | Browsers require integration with Player SDK for Web to play videos. | 1–3s |
RTS | RTS performs well under poor network conditions. Videos can be played smoothly even with a packet loss rate of up to 30%. | Browsers require integration with Player SDK for Web to play videos. | < 1s |
DASH | Adaptive bitrate is supported. | The latency is high. | > 10s |
Compatibility with browsers
Supported browsers for PCs
To play videos in the FLV or HLS format by using browsers on PCs, you must enable cross-origin resource sharing (CORS). For more information, see Configure CORS.
Browser | MP4 | FLV | HLS | MP3 |
Chrome | √ | Google Chrome 34 and later | Google Chrome 34 and later | √ |
Firefox | √ | Firefox 49 and later | Firefox 49 and later | √ |
Edge | √ | √ | √ | √ |
Opera | √ | √ | √ | √ |
Safari | √ | Safari 8 and later | Safari 8 and later | √ |
Supported browsers for mobile devices
Player SDK for Web does not allow you to play video streams in the FLV format on mobile browsers.
Table 1. Supported browsers on Android devices
Browser | HLS | MP4 | MP3 | FLV |
Chrome | Google Chrome 34 and later | √ | √ | × |
Firefox | Firefox 49 and later | |||
√ | ||||
Edge | √ | |||
Opera | √ |
Table 2. Supported browsers on iOS devices
Browser | HLS | MP4 | MP3 | FLV |
Chrome | Google Chrome 34 and later | √ | √ | × |
Firefox | Firefox 49 and later | |||
√ | ||||
Edge | √ | |||
Opera | √ | |||
Safari | Safari 8 and later |
Features supported by browsers
Feature | PC | Mobile device | References |
Full-screen playback | By default, the full-screen playback feature is disabled. | By default, the full-screen playback feature is enabled. You can disable the feature based on your needs. Note
| |
Autoplay | The autoplay feature is not supported in the following browsers:
| By default, autoplay is disabled. To enable this feature, you must configure specific settings. Note Specific browsers and WebView-based apps allow autoplay. This commonly occurs on Android devices. | |
Volume adjustment | Supported | The | |
Playback speed | Supported | You cannot set the playback speed in specific mobile browsers, including WeChat browser for Android. | |
Playback of HLS-encrypted videos |
| Supported | |
Playback of videos encrypted with Alibaba Cloud proprietary cryptography Note For security reasons, you cannot use videos that are encrypted by using Alibaba Cloud proprietary cryptography for debugging. |
Note Specific third-party browsers may modify playback settings to hijack video playback, preventing videos encrypted with Alibaba Cloud proprietary cryptography from playing. To address this issue, we recommend that you encrypt videos using industry-standard methods such as HLS or Digital Rights Management (DRM). |
| |
Playback of DRM-encrypted live streams | Windows
macOS
| iOS
Android
| |
Playback of DRM-encrypted VOD files | Windows
macOS
| iOS
Android
|