This topic describes how to enable digital rights management (DRM) encryption in the
ApsaraVideo VOD console, including how to upload a certificate, configure settings
in the console, and configure ApsaraVideo Player.
Limits
You can enable DRM encryption only by using the ApsaraVideo VOD console.
Upload a certificate
Note If you develop applications that run on iOS or Android, you must upload a FairPlay
Streaming certificate to the ApsaraVideo VOD console.
- Apply for a FairPlay Streaming certificate from Apple. For more information, see Apply for a FairPlay Streaming certificate.
- Log on to the ApsaraVideo VOD console.
- In the left-side navigation pane, click Configuration Management.
- Choose to go to the DRM Certificates page.
- Click Upload Certificate.

Set the parameters that are described in the following table.
Parameter |
Description |
Certificate Name |
The name of the certificate. The name must be 2 to 128 characters in length. |
Content |
The FairPlay Streaming certificate. Only .cer files are supported. |
Private Key |
The password-protected private key created when you apply for the FairPlay Streaming
certificate.
|
Passphrase |
The key that is used to decrypt the private key. A passphrase must be 1 to 32 characters
in length and can contain letters and digits.
|
ASk |
The Application Secret key (ASk). The ASk is provided by Apple for you when you apply
for the FairPlay Streaming certificate. An ASk must be 1 to 32 characters in length
and can contain letters and digits.
|
- Click OK.
Enable DRM encryption in the ApsaraVideo VOD console
- Log on to the ApsaraVideo VOD console.
- In the left-side navigation pane, click Configuration Management.
- Choose .
- Click Create Transcoding Template Group.
- On the Create Transcoding Template Group page, click Add Template below Normal Transcoding Template.
- In the section, select hls from the Encapsulation Format drop-down list.
- Click the Show icon on the left of . Turn on Video Encryption and select DRM Encryption for the Encryption Method parameter.
View videos transcoded by using DRM encryption-enabled templates
When you upload a video by using the ApsaraVideo VOD console, API, or upload SDK,
use a template for which DRM encryption is enabled to transcode the video. After the
video is transcoded, choose in the console. Find the transcoded video and click Manage in the Actions column. On the management page of the video, click the Video URL tab to view the information about the video. The DRM Encryption label is displayed in the Format column if the video is transcoded by using a DRM
encryption-enabled template.
Play a DRM-encrypted video
To play DRM-encrypted videos, you must use ApsaraVideo Player to facilitate your development.
Before you use ApsaraVideo Player to play DRM-encrypted videos, you must configure
the following settings:
- The version of ApsaraVideo Player must be V5.2.1 or later. You can use FairPlay DRM
encryption for iOS and Widevine DRM encryption for Android.
- If you use ApsaraVideo Player for iOS, you must call the setFairPlayCertID method
of AliPlayerGlobalSettings to specify the ID of your FairPlay Streaming certificate.
This method needs to be called only once. To obtain the ID of your FairPlay Streaming
certificate, log on to the ApsaraVideo VOD console. Choose . Then, find your certificate ID on the DRM Certificates page.
- If you use ApsaraVideo Player for Android, we recommend that you use SurfaceView to
play videos with high security levels.
Note Mobile and web clients are supported. When you play a video with a high security level,
you cannot rotate the video, mirror the video, or take snapshots from the video.