search
Home
/
FAQ
/
System integration
/
DRM client
How does the video APP process DRM license response message?
2025-02-20
17:45:04
After obtaining the license response, the video APP should parse the "status" field in the message. If it is "success", it meets the playback conditions, otherwise it can terminate the playback. The video APP should intercept the exception of provideKeyResponse (the interface for processing license response). If the exception is intercepted, the playback can be terminated.
How does the video APP judge whether the terminal supports DRM and the security level?
2025-02-20
17:44:16
Video APP can use the following example code (taking Android platform as an example) to determine whether the terminal supports ChinaDRM:
public static boolean checkSupportChinaDRM(){
boolean isSupportCDRM = false;
byte[] sessionId = null;
MediaDrm mediaDrm = null;
String statusString = null;
UUID drmScheme = new UUID(0X3D5E6D359B9A41E8L, 0XB843DD3C6E72C42CL);//ChinaDRM UUID
try {
if (Util.SDK_INT < 18) {
statusString = "Protected content not supported on API levels below 18";
} else if (!MediaDrm.isCryptoSchemeSupported(drmScheme)) {
statusString = "This device does not support the required DRM scheme";
} else {
mediaDrm = new MediaDrm(drmScheme);
sessionId = mediaDrm.openSession();
isSupportCDRM = true;
statusString = "check ChinaDRM ok!";
}
} catch (NotProvisionedException e){
statusString = "drm certifate not found!";
}catch (Exception e) {
Log.i(TAG, "catched Exception:" + e.getMessage());
statusString = "exception:" + e.getMessage();
}
if (mediaDrm != null && sessionId != null) {
mediaDrm.closeSession(sessionId);
}
Log.i(TAG, statusString);

return isSupportCDRM;
}
The Android video app uses MediaDrm. getPropertyString ("securityLevel") to determine the security level of the client. The DRM license server can determine the security level (SW indicates software security level, HW indicates hardware security level, and EH indicates enhanced hardware level) identified by the Common Name field of the DRM client certificate body carried in the license request sent by the DRM client, so as to confirm the security level of the terminal device.
How to reinforcement video APP which integrates DRM client inside the APP itself?
2025-02-20
17:43:54
The video APP integrates DRM software level client inside APP itself, and so the video APP should be secured. The DRM security level can reach the software security level at most. The security reinforcement methods for video APP include code confusion, shelling, using the security related capabilities of the operating system (such as anti recording and anti screenshot capabilities), anti root, digital watermarking, and so on.
How to use video watermark with DRM?
2025-02-20
17:43:36
The video watermark can trace the source of pirated video generated through screen recording, screen capture, shooting, signal acquisition and other methods when playing. It is recommended to use with DRM. Identification information (digital watermark information) can be added in the code stream, video playing layer and other places.
How should video applications choose decoder for DRM encrypted content?
2025-02-20
17:43:00
If the terminal has DRM capability, the video application should give priority to the terminal's own security decoder. If the protection security level of the content is hardware level, only the security decoder can be selected. If the terminal does not have DRM capability, the video application will use the software security level DRM client built in the application, and the decoder built in the video application or the normal decoder provided by the terminal. Only by using the security decoder provided by the terminal, the terminal can achieve to prevent screen recording and screen capture (the results of screen recording and screen capture are null and black) by using the SVP(Secure Video Path).
How to test the connection between the test terminal and the DRM server in the production environment?
2025-02-20
17:41:17
Terminals in the test phase, such as set-top boxes and smart TVs, are recommended to use the development certificate and connect the DRM server with the development certificate. DTA provides DRM server with development certificate, which can be used for debugging and testing of test terminals. Reference to the article(Resource->Client integration test env->User Manual for Client Integration Testing Environment).
How does ChinaDRM reuse widevine encrypted stream?
2025-02-20
17:10:57
The ChinaDRM client supports the CENC standard AES algorithm (generally supporting the cbcs mode algorithm), but it should be noted that the DRM description information format (i.e. pssh format) and DRM license protocol between ChinaDRM and widevine are different. After the video and audio application obtains the PSSH in the widevine stream index file,
Processing method 1: The video and audio applications should generate the ChinaDRM format PSSH by widevine PSSH and then do subsequent processing, such as encapsulating the license request, requesting the ChinaDRM license and processing the license. Note that the base64string code of the keyId resolved from widevine PSSH can be used as the contentId of ChinaDRM.
Processing mode 2: The video and audio application directly transmits widevine PSSH to the ChinaDRM client, the ChinaDRM client encapsulates the license request and the video and audio application sends it to the ChinaDRM license server. After receiving the license request, the ChinaDRM license server obtains widevine PSSH from the contentIDs field in the request, parses the keyId from it and obtains the keyValue from key management server, thereby encapsulating the ChinaDRM license response. The base64string code of the keyId can be used as the contentId of ChinaDRM. Mode 2 relies on the ChinaDRM client to support the parameter of widevine PSSH.
ChinaDRM multiplexes Fairplay encrypted stream (only using CENC cbcs mode encryption) in the same way.
1

FAQ / System integration / DRM client

'
' '
' '
' '
' ' ' '
' '
How does the video APP process DRM license response message?
' '
' '
' '
2025-02-20
' '
' '
' '
' '
' ' ' '
' '
' '
After obtaining the license response, the video APP should parse the "status" field in the message. If it is "success", it meets the playback conditions, otherwise it can terminate the playback. The video APP should intercept the exception of provideKeyResponse (the interface for processing license response). If the exception is intercepted, the playback can be terminated.
' '
' '
' '
' '
' '
' '
' '
' ' ' '
' '
How does the video APP judge whether the terminal supports DRM and the security level?
' '
' '
' '
2025-02-20
' '
' '
' '
' '
' ' ' '
' '
' '
Video APP can use the following example code (taking Android platform as an example) to determine whether the terminal supports ChinaDRM:
public static boolean checkSupportChinaDRM(){
boolean isSupportCDRM = false;
byte[] sessionId = null;
MediaDrm mediaDrm = null;
String statusString = null;
UUID drmScheme = new UUID(0X3D5E6D359B9A41E8L, 0XB843DD3C6E72C42CL);//ChinaDRM UUID
try {
if (Util.SDK_INT < 18) {
statusString = "Protected content not supported on API levels below 18";
} else if (!MediaDrm.isCryptoSchemeSupported(drmScheme)) {
statusString = "This device does not support the required DRM scheme";
} else {
mediaDrm = new MediaDrm(drmScheme);
sessionId = mediaDrm.openSession();
isSupportCDRM = true;
statusString = "check ChinaDRM ok!";
}
} catch (NotProvisionedException e){
statusString = "drm certifate not found!";
}catch (Exception e) {
Log.i(TAG, "catched Exception:" + e.getMessage());
statusString = "exception:" + e.getMessage();
}
if (mediaDrm != null && sessionId != null) {
mediaDrm.closeSession(sessionId);
}
Log.i(TAG, statusString);

return isSupportCDRM;
}
The Android video app uses MediaDrm. getPropertyString ("securityLevel") to determine the security level of the client. The DRM license server can determine the security level (SW indicates software security level, HW indicates hardware security level, and EH indicates enhanced hardware level) identified by the Common Name field of the DRM client certificate body carried in the license request sent by the DRM client, so as to confirm the security level of the terminal device.
' '
' '
' '
' '
' '
' '
' '
' ' ' '
' '
How to reinforcement video APP which integrates DRM client inside the APP itself?
' '
' '
' '
2025-02-20
' '
' '
' '
' '
' ' ' '
' '
' '
The video APP integrates DRM software level client inside APP itself, and so the video APP should be secured. The DRM security level can reach the software security level at most. The security reinforcement methods for video APP include code confusion, shelling, using the security related capabilities of the operating system (such as anti recording and anti screenshot capabilities), anti root, digital watermarking, and so on.
' '
' '
' '
' '
' '
' '
' '
' ' ' '
' '
How to use video watermark with DRM?
' '
' '
' '
2025-02-20
' '
' '
' '
' '
' ' ' '
' '
' '
The video watermark can trace the source of pirated video generated through screen recording, screen capture, shooting, signal acquisition and other methods when playing. It is recommended to use with DRM. Identification information (digital watermark information) can be added in the code stream, video playing layer and other places.
' '
' '
' '
' '
' '
' '
' '
' ' ' '
' '
How should video applications choose decoder for DRM encrypted content?
' '
' '
' '
2025-02-20
' '
' '
' '
' '
' ' ' '
' '
' '
If the terminal has DRM capability, the video application should give priority to the terminal's own security decoder. If the protection security level of the content is hardware level, only the security decoder can be selected. If the terminal does not have DRM capability, the video application will use the software security level DRM client built in the application, and the decoder built in the video application or the normal decoder provided by the terminal. Only by using the security decoder provided by the terminal, the terminal can achieve to prevent screen recording and screen capture (the results of screen recording and screen capture are null and black) by using the SVP(Secure Video Path).
' '
' '
' '
' '
' '
' '
' '
' ' ' '
' '
How to test the connection between the test terminal and the DRM server in the production environment?
' '
' '
' '
2025-02-20
' '
' '
' '
' '
' ' ' '
' '
' '
Terminals in the test phase, such as set-top boxes and smart TVs, are recommended to use the development certificate and connect the DRM server with the development certificate. DTA provides DRM server with development certificate, which can be used for debugging and testing of test terminals. Reference to the article(Resource->Client integration test env->User Manual for Client Integration Testing Environment).
' '
' '
' '
' '
' '
' '
' '
' ' ' '
' '
How does ChinaDRM reuse widevine encrypted stream?
' '
' '
' '
2025-02-20
' '
' '
' '
' '
' ' ' '
' '
' '
The ChinaDRM client supports the CENC standard AES algorithm (generally supporting the cbcs mode algorithm), but it should be noted that the DRM description information format (i.e. pssh format) and DRM license protocol between ChinaDRM and widevine are different. After the video and audio application obtains the PSSH in the widevine stream index file,
Processing method 1: The video and audio applications should generate the ChinaDRM format PSSH by widevine PSSH and then do subsequent processing, such as encapsulating the license request, requesting the ChinaDRM license and processing the license. Note that the base64string code of the keyId resolved from widevine PSSH can be used as the contentId of ChinaDRM.
Processing mode 2: The video and audio application directly transmits widevine PSSH to the ChinaDRM client, the ChinaDRM client encapsulates the license request and the video and audio application sends it to the ChinaDRM license server. After receiving the license request, the ChinaDRM license server obtains widevine PSSH from the contentIDs field in the request, parses the keyId from it and obtains the keyValue from key management server, thereby encapsulating the ChinaDRM license response. The base64string code of the keyId can be used as the contentId of ChinaDRM. Mode 2 relies on the ChinaDRM client to support the parameter of widevine PSSH.
ChinaDRM multiplexes Fairplay encrypted stream (only using CENC cbcs mode encryption) in the same way.
' '
' '
' '
'