ApsaraVideo VOD provides the offline download feature for mobile clients. You can enable offline download based on your business requirements so that users can cache videos for offline playback.
- Log on to the ApsaraVideo VOD console.
- In the left-side navigation pane, click Configuration Management.
to go to the Download page.
- Turn on Download and select a download mode.
Offline download is disabled by default.
Two download modes are supported.
- Normal: Downloaded video files are not encrypted, can be copied, and can be played on any player. Proceed with caution.
- Encrypted: Downloaded video files are encrypted by using a key file and can be decrypted only by using the same key file. This ensures video security. You can use only ApsaraVideo Player SDK to decrypt and play the downloaded video files. In addition, a tool is provided for you to generate private keys for offline video encryption.
Generate the private key
If you select Encrypted for the Download Mode parameter, private keys are required to decrypt the downloaded videos.
A private key for offline video encryption is contained in a binary file. The system uses a private algorithm to generate a private key file based on the specified application unique identifier (UID) and a custom private key string for encryption. The private key string for encryption must be 16 to 32 characters in length, and can contain only and must contain uppercase letters, lowercase letters, and digits. You can download the private key file as needed. The downloaded private key file must be securely stored in client applications. This way, ApsaraVideo Player SDK can use the file for offline download and playback.