You can integrate ApsaraVideo Player SDK for Web into your web applications and use the SDK for live streaming and video playback on demand. This topic describes the features of ApsaraVideo Player SDK for Web and its compatibility with browsers.
Overview
ApsaraVideo Player SDK for Web uses the <video> tag of the HTML5 player to play videos in web applications. ApsaraVideo Player SDK for Web is compatible with multiple browsers such as Chrome and Safari to provide unified video playback effects on multiple platforms. ApsaraVideo Player SDK for Web also supports features such as hotlink protection, encrypted video playback, and quality monitoring based on ApsaraVideo Live and ApsaraVideo VOD.
License service update
Starting from December 1, 2024, the license service is required before you can use ApsaraVideo Player SDK for Web 2.28.0 and later. For more information, see Manage licenses. Versions earlier than 2.28.0 are not affected by this change. However, we recommend that you upgrade to the latest version for more comprehensive services and support.
Supported protocols
VOD scenarios
The following table describes the playback protocols and codecs supported by ApsaraVideo Player SDK for Web.
Video codec | Video protocol | Audio file format | Audio codec |
H.264 |
| MP3 | AAC |
H.265 Note
|
| - | |
H.266 Note
| MP4 | - |
Live streaming scenarios
The following table describes the live streaming protocols and codecs supported by ApsaraVideo Player SDK for Web.
Video codec | Video protocol | Audio codec | Audio file format |
H.264 | HLS, FLV, RTS, and DASH | AAC | - |
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 ApsaraVideo Player SDK for Web to play videos. | 1s~3s |
RTS | RTS performs well under poor network conditions. You can smoothly play streams even at a packet loss rate of 30%. | Browsers require integration with ApsaraVideo Player SDK for Web to play videos. | < 1s |
DASH | Adaptive bitrate is supported. | The latency is high. | > 10s |
Adaptation to browsers
Supported browsers on 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 | ✓ |
IE | Internet Explorer 9 and later |
Important You cannot play video streams in the FLV format in Internet Explorer 11 for Windows 8 and later. This is because the value of | Internet Explorer 11 and later for Windows 8.1 and later | Internet Explorer 9 and later |
Edge | ✓ | ✓ | ✓ | ✓ |
Opera | ✓ | ✓ | ✓ | ✓ |
Safari | ✓ | Safari 8 and later | Safari 8 and later | ✓ |
Supported browsers on mobile devices
ApsaraVideo 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 that is provided by ApsaraVideo Player SDK for Web is not supported in specific 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 the WeChat browser for Android. | |
Playback of videos encrypted by using HLS |
| Supported | |
Alibaba Cloud proprietary HLS cryptography Note For security reasons, you cannot use actual videos that are encrypted by using Alibaba Cloud proprietary cryptography for debugging. |
Note Specific third-party browsers may modify the settings of ApsaraVideo Player SDK without your authorization or knowledge. In this case, videos encrypted by using Alibaba Cloud proprietary cryptography cannot be played. To resolve this issue, we recommend that you use the HLS or digital rights management (DRM) encryption method to encrypt videos. |
| |
Playback of live streams encrypted by using DRM | Windows
macOS
| iOS
Android
| |
Playback of DRM-encrypted VOD files | Windows
macOS
| iOS
Android
|