All Products
Search
Document Center

Apsara Video SDK:Overview

Last Updated:Jun 11, 2024

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

Note
  • 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

Note

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

  • VOD playback: Internet Explorer 11 and later for Windows 8.1 and later

  • Live streaming: Internet Explorer 11 and later for Windows 8.1 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 mseLiveFlvPlayback is false in the flv.js file for Internet Explorer 11.

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

Note

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
    • The full-screen playback feature cannot be disabled in Safari on iOS 10 and earlier versions.

    • If you play videos in inline mode, you need to modify the video size based on the resolution of transcoded videos. Otherwise, black bars may be displayed.

Common Settings

Autoplay

The autoplay feature provided by ApsaraVideo Player SDK for web is not supported in specific browsers.

  • Autoplay is not supported in Safari 11 and later versions in macOS High Sierra.

  • Autoplay is not supported in Google Chrome 55 and later versions.

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.

Autoplay

Volume adjustment

Supported

The video.volume property is read-only in iOS and specific Android systems. Therefore, the getVolume and setVolume methods provided by ApsaraVideo Player SDK for web are invalid for iOS and specific Android systems.

Set the volume

Playback speed

Supported

You cannot set the playback speed in specific mobile browsers, such as the WeChat browser for Android.

Specify the playback speed

HLS-encrypted video playback

  • Google Chrome

  • Firefox

  • Safari

  • Microsoft Edge

  • Internet Explorer 11 and later versions for Windows 8.1 and later versions

Supported

Play an encrypted video

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.

  • Google Chrome (recommended)

  • Firefox

  • Safari

  • Microsoft Edge

  • Internet Explorer 11 and later versions for Windows 8.1 and later versions

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

  • Google Chrome

  • Opera

  • Firefox

  • Microsoft Edge

macOS

  • Google Chrome

  • Safari

  • Firefox

  • Opera

  • Microsoft Edge

iOS

  • Google Chrome

  • Safari

Android

  • Google Chrome for Android 10 and later

  • Microsoft Edge

Playback of DRM-encrypted VOD files

Windows

  • Google Chrome

  • Opera

  • Firefox

  • Microsoft Edge

macOS

  • Google Chrome

  • Safari

  • Firefox

  • Opera

  • Microsoft Edge

iOS

  • Google Chrome

  • Safari

Android

  • Google Chrome for Android 10 and later

  • Microsoft Edge

Flash player

The Flash player is supported only by desktop browsers. The following table describes the supported browsers.

Note

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.

  • The latest version contains the newest features and bug fixes. We recommend that you update your player SDK to the latest version.

  • ApsaraVideo VOD provides comprehensive technical support for the latest version of player SDK.

Supported

SUPPORTED

The versions that are released within 6 months before the latest version.

  • These versions contain the relatively new features and fix major issues.

  • ApsaraVideo VOD provides general technical support for these versions of player SDKs.

Not Recommended

DEPRECATED

The versions that are released 6 to 12 months before the latest version.

  • These versions may contain deprecated features, underlying issues, or unknown issues caused by the updates of browsers.

  • ApsaraVideo VOD provides general technical support for these versions of player SDKs, but the efficiency or accuracy of troubleshooting cannot be guaranteed. We recommend that you update your player SDK to the latest version. Besides new features and bug fixes, the new version optimizes troubleshooting. This improves the efficiency of self-troubleshooting and technical support.

Not Supported

UNSUPPORTED

The versions that are released more than 12 months before the latest version.

  • The features in these versions are most likely deprecated and no optimization is performed based on your current browser environment. We recommend that you do not use these versions of player SDKs for production.

  • ApsaraVideo VOD does not provide technical support for these versions unless serious issues occur. We recommend that you update your player SDK to the latest version at your earliest opportunity.