ApsaraVideo Player SDK for web can be integrated with your web applications. This allows you to play videos in live streaming and video-on-demand (VOD) scenarios. This topic describes the features of ApsaraVideo Player SDK for web and its compatibility with browsers.
Introduction
ApsaraVideo Player SDK for web plays videos in web applications by using the <video> tag of the HTML5 player and the Flash player. ApsaraVideo Player SDK for web is compatible with multiple browsers such as Google Chrome and Safari to provide unified video playback effects on diverse platforms. ApsaraVideo Player SDK for web can also be used together with ApsaraVideo Live and ApsaraVideo VOD to provide features such as hotlink protection, encrypted playback of copyrighted videos, and video quality monitoring.
Supported protocols
VOD scenarios
Player | Encoding protocol | Video protocol | Audio coding format | Audio file format | |||
HTML5 | H.264 | MP4, Flash Video (FLV), and HTTP Live Streaming (HLS) | Advanced Audio Coding (AAC) | MP3 | |||
H.265 | MP4 and FLV | AAC | - | ||||
Flash (This playback mode is no longer updated.) | H.264 | MP4, FLV, HLS, and Real-Time Messaging Protocol (RTMP) | AAC and MP3 | MP3 |
To play H.265-encoded videos, submit a request to apply for a license.
Specific browsers do not support the playback of H.265-encoded videos.
If you enable the playback of H.265-encoded videos, the startup loading time is extended and traffic consumption increases.
Live streaming scenarios
Encoding protocol | Video protocol | Audio coding format | Audio file format | ||||
H.264 | HLS, FLV, and Real-Time Streaming Protocol (RTS) | AAC | - | ||||
H.265 | FLV (The value of codec ID is 12.) | AAC | - |
The following table describes the advantages and disadvantages of live streaming protocols.
Protocol | Advantage | Disadvantage | Latency | ||||
HLS | HLS is compatible with more browsers. | HLS has a relatively higher latency. | > 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 to 3s | ||||
RTS | RTS has high performance 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 |
Supported browsers
HTML5 player
Browsers supported by the HTML5 player
Supported desktop browsers
To play videos in the FLV or HLS format by using desktop browsers, you must enable cross-origin resource sharing (CORS). For more information, see Configure CORS.
Browser | MP4 | FLV | HLS | MP3 | |||
Google Chrome | √ | Google Chrome 34 and later | Google Chrome 34 and later | √ | |||
Firefox | √ | Firefox 49 and later | Firefox 49 and later | √ | |||
Internet Explorer | Internet Explorer 9 and later |
Note The live streams in the FLV format cannot be played 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 | |||
Microsoft Edge | √ | √ | √ | √ | |||
Opera | √ | √ | √ | √ | |||
Safari | √ | Safari 8 and later | Safari 8 and later | √ |
Supported mobile browsers
ApsaraVideo Player SDK for web does not allow you to play video streams in the FLV format by using the HTML5 player on mobile browsers.
Android
Browser
MP4
FLV
HLS
MP3
Google Chrome
√
×
Google Chrome 34 and later
√
Firefox
√
×
Firefox 49 and later
√
WeChat
√
×
√
√
Microsoft Edge
√
×
√
√
Opera
√
×
√
√
iOS
Browser
MP4
FLV
HLS
MP3
Google Chrome
√
×
Google Chrome 34 and later
√
Firefox
√
×
Firefox 49 and later
√
WeChat
√
×
√
√
Microsoft Edge
√
×
√
√
Opera
√
×
√
√
Safari
√
×
Safari 8 and later
√
Supported features
Feature | Desktop browser | Mobile browser | 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 business requirements.
Note | |||||
Autoplay | The autoplay feature provided by ApsaraVideo Player SDK for web is not supported in specific browsers.
| By default, autoplay is disabled. You can configure specific settings to enable this feature. Note Specific browsers and WebView-based applications support autoplay. These browsers and applications are generally on Android devices. | |||||
Volume adjustment | Supported | The | |||||
Playback speed | Supported | You cannot set the playback speed in specific mobile browsers, such as the WeChat browser for Android. | |||||
HLS-encrypted video playback |
| Supported | |||||
Playback of videos encrypted by using Alibaba Cloud proprietary cryptography Note For security reasons, you cannot use Alibaba Cloud proprietary cryptography to debug encrypted videos. |
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. | This feature is not supported in browsers for iOS. This feature is supported only in Google Chrome for Android. | |||||
Playback of DRM-encrypted live streams | Windows
macOS
| iOS
Android
| |||||
Playback of DRM-encrypted VOD files | Windows
macOS
| iOS
Android
|
Flash player
The Flash player is supported only by desktop browsers. The following table describes the supported browsers.
To use the Flash player in Internet Explorer 8, you must add the reference to the json.min.js file in the browser. For more information, see Integrate ApsaraVideo Player SDK for web.
Browser | MP4 | FLV | HLS | RTMP | MP3 |
Google Chrome | √ | √ | √ | √ | √ |
Firefox | √ | √ | √ | √ | √ |
Internet Explorer | Internet Explorer 8 and later | Internet Explorer 8 and later | Internet Explorer 8 and later | Internet Explorer 8 and later | Internet Explorer 8 and later |
Microsoft Edge | √ | √ | √ | √ | √ |
Opera | √ | √ | √ | √ | √ |
Safari | √ | √ | √ | √ | √ |
Version status division and technical support policies
To optimize user experience, ApsaraVideo Player keeps updating player SDKs to release new features, improve player performance, and fix issues. ApsaraVideo VOD preserves the API compatibility to a great extent during version updates. We recommend that you update your player SDK to the latest version at your earliest opportunity to improve your playback experience.
ApsaraVideo Player SDK versions are classified into four states based on the release date: Recommended, Supported, Not Recommended, and Not Supported. ApsaraVideo VOD provides different technical support services for player SDKs in different states.
For more information about the versions of ApsaraVideo Player SDK for Web, see Release notes for ApsaraVideo Player SDK for Web. The following table describes the version states and technical support policies for ApsaraVideo Player SDK for Web.
Version state | Classification | Description |
Recommended RECOMMENDED | The latest version. |
|
Supported SUPPORTED | The versions that are released within 6 months before the latest version. |
|
Not Recommended DEPRECATED | The versions that are released 6 to 12 months before the latest version. |
|
Not Supported UNSUPPORTED | The versions that are released more than 12 months before the latest version. |
|