ApsaraVideo VOD provides the offline download feature for mobile clients. You can enable the offline download feature based on your business requirements so that users can cache videos for offline playback.

Limits

You must integrate and configure ApsaraVideo Player SDK to use the offline download feature. The offline download feature is not provided only for ApsaraVideo Player SDK for Web. For more information about how to configure the offline download feature for ApsaraVideo Player SDK on other terminals, see the following topics:

Normal download

If you use the normal download mode, users can use ApsaraVideo Player to cache videos for offline playback on mobile devices. The downloaded videos are not encrypted by Alibaba Cloud and can be copied and played by third-party players. Exercise caution when you use the normal download mode.

  1. Log on to the ApsaraVideo VOD console.
  2. In the left-side navigation pane of the ApsaraVideo VOD console, choose Configuration Management > CDN Configuration > Download.
  3. On the page that appears, turn on the Download switch. On the dialog box that appears, set Download Mode to Normal, and then click OK. If you have enabled the download feature, you can click Modify to change the download mode.

Secure download

If you use the secure download mode, users can use ApsaraVideo Player to cache videos for offline playback on mobile devices. The downloaded videos are encrypted by using a key file and can be decrypted only by using the same key file. The videos cannot be played by third-party players or without being decrypted. The videos can be played only by ApsaraVideo Player.

  1. Log on to the ApsaraVideo VOD console.
  2. In the left-side navigation pane of the ApsaraVideo VOD console, choose Configuration Management > CDN Configuration > Download.
  3. On the page that appears, turn on the Download switch. On the dialog box that appears, select Encrypted, and then click OK. If you have enabled the download feature, you can click Modify to change the download mode.
  4. In the Get the key section, enter the unique identifier of the app and the private key for offline decryption, and click Generate and Download Key.
    If you use the secure download mode, the downloaded videos can be played only after the video is decrypted.
    The encryption key is a binary file. To generate and download the key file, you must first enter the unique app identifier and the private key that is generated by using the proprietary cryptography algorithm for decryption. You must save the downloaded private key file in client applications. This way, ApsaraVideo Player SDK can use the file for offline download and playback.
    Note You can generate multiple keys for different clients.
    Parameter Description
    Unique App Identifier
    • Android: the SHA-1 fingerprint of the keystore.
    • iOS: the value of the app bundle identifier.
    Private Key A custom string of 16 to 32 characters in length. The string can contain letters and digits and must contain uppercase letters, lowercase letters, and digits.
  5. Save the generated key file to the client application and configure the key file in ApsaraVideo Player SDK.

References

For more information about downloading media files in ApsaraVideo VOD, see Download media files.