All Products
Search
Document Center

Apsara Video SDK:Overview

Last Updated:Mar 29, 2024

ApsaraVideo Player SDK for web can be integrated with your web applications to allow 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.

Enable 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.

Set 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