DRM License
To play DRM protected videos, your player should request DRM licence from our URL.
This API requires access_token in query param for authentication.
POST: https://app.tpstreams.com/api/v1/<organization_id>/assets/<asset_id>/drm_license/?access_token={{access_token}}
Fields
| Name | Type | Description | Required |
|---|---|---|---|
| player_payload | string | Player license key message encoded into base64 String. | Yes |
| widevine | json | See the Widevine table below for available fields. | No |
Widevine
Name | Description |
content_key_specs.track_type | A track type definition, Options are
|
content_key_specs.security_level | Security level for content key specs, Default = 1.
|
content_key_specs.required_output_protection.hdcp | Output protection options for HDCP Options:
|
license_duration | The total duration (in seconds) that the DRM license is valid. Once this time expires, the player must request a new license to continue playback. Set to 0 for unlimited duration (not recommended for rental content). |
Sample Payload:
{
"player_payload": keyMessageInbase64,
"widevine": {
"content_key_specs": [
{'track_type': 'SD', 'security_level': 1, 'required_output_protection': {'hdcp': 'HDCP_V1'}},
{'track_type': 'HD', 'security_level': 1, 'required_output_protection': {'hdcp': 'HDCP_V1'}},
{'track_type': 'UHD1', 'security_level': 1, 'required_output_protection': {'hdcp': 'HDCP_V1'}},
{'track_type': 'UHD2', 'security_level': 1, 'required_output_protection': {'hdcp': 'HDCP_V1'}},
{'track_type': 'AUDIO', 'security_level': 1, 'required_output_protection': {'hdcp': 'HDCP_V1'}}
],
"license_duration": 3600,
}
}
Security Considerations:
The recommendation is to invoke the DRM license endpoint on the server, rather than on the client. This precaution is taken because passing the License configuration and calling it from the client could expose configurations to users.