All Products
Search
Document Center

Usage

Last Updated: Sep 06, 2019

Procedure

ApsaraVideo Player SDK provides many features of ApsaraVideo for VOD and ApsaraVideo Live. For more information, see Product introduction. You can obtain a video ID or streaming URL by using ApsaraVideo for VOD or ApsaraVideo Live, integrate the ApsaraVideo Player SDK framework, and play a VOD program based on the video ID and STS token or play a live streaming program based on the streaming URL. For more information, see Integration of ApsaraVideo Player SDK for Android and Integration of ApsaraVideo Player SDK for iOS.

STS-based playback procedure

The STS-based playback procedure is as follows: 1. A user application requests an STS token. 2. The AppServer delivers an STS token. 3. The user uploads a video and obtains a video ID. 4. The AppServer obtains the STS token. 5. The AppServer delivers the STS token to the client. 6. The video is played.

Note: The AppServer is the user application server. You need to use the server API or SDK to develop your own server-side applications.

playAuth-based playback procedure

The playAuth-based playback procedure is as follows: 1. A user application requests an upload token. 2. The AppServer delivers an upload token. 3. The user uploads a video and obtains a video ID. 4. The AppServer obtains the playback credential. 5. The AppServer delivers the playback credential to the client. 6. The video is played.

Note: The AppServer is the user application server. You need to use the server API or SDK to develop your own server-side applications.

Secure download procedure

The secure download procedure is as follows: 1. Log on to the ApsaraVideo for VOD console, choose Global Settings > Download, and select Encrypted. 2. Set the bundle ID of the application or the SHA1 signature of the keystore. 3. Generate and download the private key file for encryption. 4. Integrate the file into the SDK and call the setEncrptyFile or setSecretImagePath method to set a path for the file. For more information about how to obtain the private key file, see the relevant document. The following figure shows the flowchart of secure download.

Note: If you select the secure download mode, you must download a private key file from the ApsaraVideo for VOD console and integrate the file into the SDK. In this way, both encrypted and unencrypted streaming videos are locally saved as encrypted videos. If you select the normal download mode, both encrypted and unencrypted streaming videos are locally saved as unencrypted videos that can be played by any players.