ApsaraVideo Player SDK is an important part of ApsaraVideo. This service has integrated cloud video services. In addition to the basic playback features of ApsaraVideo for VOD and ApsaraVideo Live, it also supports encrypted playback, secure download, resolution switching, and short video playback. This player provides you with simple, fast, secure, and stable video playback services.
For more information about the demo of ApsaraVideo cloud-device integration solution, see Demo.
Note: As WeChat and QQ do not support downloading the .apk file through QR code scanning, use the QR code scanning function of DingTalk or other third-party software instead.
For more information about SDK download, see SDK Download, where you can download the SDK and demo as required.
|Short video playback||Supports loop playback of short videos and instant playback within seconds after you slide to a short video. For more information, see SmartVideo solution|
|Playback speed control||Supports 0.5x to 2x real-time speed change. The audio pitch remains unchanged at different playback speeds.|
|Encrypted playback||Transcodes video streams into encrypted streams on the cloud. The encrypted streams can only be decrypted by the ApsaraVideo Player SDK. This ensures video security.|
|Secure download||Supports asymmetric encryption for downloaded videos. This ensures that the downloaded videos can only be played by the specified application. It provides advanced hotlinking protection.|
|Video caching||Provides the play-and-cache function and supports loop playback of short videos to save your traffic.|
|Video snapshot||Captures the current frame of a playback image. You can use a screenshot as a video thumbnail, store the snapshots in your local device, or share snapshots with your friends.|
1. Simple integration
Unified operations and error codes are designed for Android and iOS applications. The interfaces are similar to system operations in design, allowing a developer to integrate the product quickly.
2. Hierarchical architecture
Basic functions, business functions, UI components, and so on are deployed hierarchically. This ensures the most effective package size and allows you to select a proper combination as needed.
3. Cloud and client integration
Video streams are encrypted on the cloud and decrypted on the client to ensure video security. Data collection and analysis on the cloud support business operations.
4. Multiple security protection functions
Multiple functions are provided to protect videos in different scenarios, including hotlinking protection, URL signing, encrypted playback, and secure download.
Provides player frameworks to meet user needs in different business scenarios. You can select a proper SDK as needed. The following table describes features of ApsaraVideo Player SDK:
|Format and coding||Supports MP4, m3u8, and FLV video formats, MP3 audio format, H.264 video coding format, and AAC audio coding format.|
|Complete UI source code||Provides complete source code for multiple UIs. You can select the UI source code based on your application style.|
|Playback control||Supports start, stop, pause, resume, replay, loop playback, and other playback control functions.|
|List playback||Supports playing videos in the list in order. This increases the video loading speed.|
|Scaling mode||Supports image padding and cropping.|
|Mute||Supports enabling or disabling the mute function.|
|Volume adjustment||Supports real-time system volume adjustment. Gestures are supported on the UI to control the volume).|
|Brightness adjustment||Supports system brightness adjustment. Gestures are supported on the UI to control the brightness.|
|Audio-only playback||Supports playing MP3 audio files in AAC coding format.|
|Multi-player playback||Supports adding multiple players on one UI to play videos simultaneously.|
|VOD playback and live video playback||Supports the playback function of ApsaraVideo for VOD and ApsaraVideo Live.|
|URL-based playback||Supports URL-based playback of local videos and online videos.|
|VID-based playback||Supports VID-based playback in ApsaraVideo for VOD.|
|Automatic playback||Supports automatic playback after video preparation.|
|Seek||Supports seeking to the specified time point. Gestures are supported on the UI to seek.|
|Screen lock||Supports the screen lock function, including orientation lock and UI element hiding.|
|Resolution switching||Supports multi-resolution switching for VOD and transcoded streams.|
|Encrypted playback||Supports encrypted playback for VOD and transcoded streams.|
|Secure download||Supports using the specified application to download and decrypt a video.|
|Time shifting during live streaming||Supports playing video streams in time shifting mode, setting the start, stop, and current playback time, and seeking to the specified time point.|
|Play-and-cache||Supports the play-and-cache function for loop playback of short videos.|
|Playback speed control||Supports 0.5x to 2x speed change. The audio pitch remains unchanged at different playback speeds.|
|Background playback||Supports switching from the UI to the background to continue playing audio streams.|
|Instant loading||Supports instant loading within seconds for VOD and live streaming.|
|Dynamic frame synchronization||Supports dynamic frame synchronization for live video playback to reduce latency.|
|Automatic reconnection||Supports automatic reconnection for VOD playback.|
|Video snapshot||Captures any frame of a playback image.|
|In-buffer seeking||Supports retaining the cached video content during seeking without clearing it to accelerate the seeking speed.|
|Rendering angle||Supports the rendering view angles 0°, 90°, 180°, and 270°.|
|Image rendering||Supports no image, horizontal image, and vertical image rendering.|
|Multi-bitrate switching||Supports seamless multi-bitrate switching of HTTP Live Streaming (HLS) Encryption-based live streams.|
|Preview||Supports the preview feature of ApsaraVideo for VOD.|
|Hard decoding||Supports H.264 and H.265 hard decoding and switching between hard decoding and soft decoding.|
|Decoding blacklist||Supports setting a blacklist for hard decoding.|
|HTTP header||Supports custom request HTTP headers.|
Scenario 1: Sliding and loop playback of short videos
For short videos, highlights are often displayed in full-screen sliding mode. ApsaraVideo Player SDK supports view size customization to play videos in full screen. It also supports multi-player, automatic playback, and pre-loading functions, allowing you to easily watch multiple videos in full-screen sliding mode. Featuring short and refined content, a short video is usually played in loop playback mode. To save your traffic and ensure seamless loop playback, ApsaraVideo Player SDK provides play-and-cache and loop playback operations to meet business demands.
Record a short video by using the short video SDK and upload it to ApsaraVideo for VOD by using the upload SDK. Use the advanced framework of ApsaraVideo Player SDK to enable the play-and-cache and loop playback functions. Then, you can play a short video in full-screen sliding mode and loop playback mode.
Scenario 2: Video copyright protection
Nowadays, people have higher awareness and requirements on video copyright protection. If you want to build an education video website with video courses from teachers and only open the courses to premium users, you must protect your videos from being pirated. ApsaraVideo Player SDK provides multiple protection functions: 1. Hotlinking protection. This function allows only whitelisted users to access your resources. 2. URL signing. This function ensures that only the videos within their authentication validity period can be played. 3. Encrypted streams. This function ensures that the videos can only be played by using the ApsaraVideo Player SDK. 4. Secure download. This function ensures that the downloaded videos can only be played by the application (with a unique bundle ID or signature) specified in the console.
Enable hotlinking protection and URL signing in security settings in the ApsaraVideo for VOD console. Enable encryption in the transcoding settings. Enable secure download in download settings and generate an encryption key. Integrate the encryption key into ApsaraVideo Player SDK and use its advanced framework to download and play videos.
Scenario 3: Data-driven operation
Data reflects the most real conditions of users and products. Through data analysis, you can optimize products, direct business development, improve the conversion rate, and establish a decision-making basis. ApsaraVideo Player uses service clients to collect data and provide real-time user feedback. It provides data isolation and confidentiality functions to ensure that the data generated for a user only serves the user.
[Procedure] Use the advanced framework of ApsaraVideo Player SDK to play a video that is uploaded to ApsaraVideo for VOD. View the player data and top data in the statistics module in the ApsaraVideo for VOD console.