All Products
Search
Document Center

ApsaraVideo VOD:Configure download settings

Last Updated:Dec 04, 2023

ApsaraVideo VOD allows you to download videos to your mobile devices for offline playback. You can enable the download feature based on your business requirements. This way, users can cache videos for offline playback.

Limits

You must integrate and configure ApsaraVideo Player SDK to use the download feature. ApsaraVideo Player SDK for Web does not provide the download feature. For more information about how to configure the download feature in ApsaraVideo Player SDK for other clients, 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 any 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, choose Configuration Management > CDN Configuration > Download.

  3. On the page that appears, enable the download feature. In the dialog box that appears, set Download Mode to Normal Download, and click OK. If you have enabled the download feature, 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, choose Configuration Management > CDN Configuration > Download.

  3. On the page that appears, enable the download feature. In the dialog box that appears, set Download Mode to Secure Download, and click OK. If you have enabled the download feature, 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 video 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 enter the unique identifier of your app and the private key that is generated by using the proprietary cryptography algorithm for decryption. You must save the downloaded private key file on the client app. This way, ApsaraVideo Player SDK can use the file for 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. The value is a string that contains a colon (:).

    • iOS: the bundle ID of the app.

    • Windows: the serial number in the digital signature certificate.

    For more information about how to obtain the unique identifier of an app, see Obtain the unique app identifier.

    Private Key

    A custom string of 16 to 32 characters in length. The string must contain uppercase letters, lowercase letters, and digits.

  5. Save the generated key file to the client app and configure the key file in ApsaraVideo Player SDK.

Obtain the unique app identifier

Android

The signature information of an Android app is the SHA-1 fingerprint of the keystore. You can run the signingReport task in Android Studio to obtain the signature information.

iOS

The unique identifier of an iOS app is the bundle ID of the app.

Windows

Run the exe program of ApsaraVideo Player SDK for Windows to obtain the serial number in the digital signature certificate.

image.png

References

For more information about how to download media files in ApsaraVideo VOD, see Download media files.