This topic describes the processes that are involved when you use ApsaraVideo Player SDK, including the basic playback process, STS-based playback process, PlayAuth-based playback process, and secure download process.

Basic playback process

ApsaraVideo Player SDK provides various features of ApsaraVideo VOD and ApsaraVideo Live. For more information, see Overview.
  1. Obtain a video ID or streaming URL by using ApsaraVideo VOD or ApsaraVideo Live.
  2. Integrate the ApsaraVideo Player SDK framework. For more information, see Integration of ApsaraVideo Player SDK for iOS and Integration of ApsaraVideo Player SDK for Android.
  3. Play a VOD program based on the video ID and Security Token Service (STS) token or play a live streaming program based on the streaming URL.

STS-based playback process

  1. Your application requests an STS token.
  2. The AppServer delivers an STS token.
  3. You upload a video and obtain 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.
Notice The AppServer is the server of your application. You can use the server API or SDK to develop your own AppServer.

PlayAuth-based playback process

  1. Your application requests an upload credential.
  2. The AppServer delivers an upload credential.
  3. You upload a video and obtain a video ID.
  4. The AppServer obtains a playback credential.
  5. The AppServer delivers the playback credential to the client.
  6. The video is played.
Notice The AppServer is the server of your application. You can use the server API or SDK to develop your own AppServer.

Secure download process

  1. Generate and download the private key file that is used to encrypt offline videos. For more information, see Configure offline download.
  2. Integrate the private key file into the SDK and call the setEncrptyFile or setSecretImagePath method to set a path for the private key file. For more information, see How can I obtain a security file?.
Note If you select the secure download mode, you must download a private key file from the ApsaraVideo VOD console and integrate the file into the SDK. This way, both encrypted and unencrypted streaming videos are saved as encrypted videos on your on-premises device. If you select the normal download mode, both encrypted and unencrypted streaming videos are saved as unencrypted videos on your on-premises device. These unencrypted videos can be played by various players.