Named templates and custom policies
Choose a DRM-X license policy matching the published package, including durations, output protection, and quality tiers.
Use a server-side named policy template#
Named templates remove most policy JSON from application code. DRM-X expands the selected name to a canonical v2 policy, validates it against the real package, and signs the result into the DRM License Token.
| Name | Package model | Behavior |
|---|---|---|
single-software | Single key | Broad compatibility, software DRM, no HDCP minimum. |
single-hdcp | Single key | Software DRM with HDCP 1.x-class output protection. |
single-hardware | Single key | Hardware-secure DRM with HDCP 2.2-class output protection. |
multi-tier-standard | Multi-key | Audio/SD software, HD software + HDCP, UHD1 hardware + HDCP 2.2. |
{
"contentId": "course-12-lesson-4",
"contentType": "vod",
"drmSystem": "widevine",
"subject": "customer-user-1001",
"playbackMode": "streaming",
"licensePolicyTemplate": "multi-tier-standard",
"useEnvironmentDefaults": true,
"maximumQualityTier": "auto"
}
With useEnvironmentDefaults: true, the template supplies security while the saved environment settings control DRM License Token validity, concurrent streams, and renewal. Set it to false when you want the template’s exact operational values.
Applications may discover the current built-ins through GET /api/v1/playback/license-policy-templates. Template names are case-insensitive on input and canonicalized in the request.
Send a complete custom request-time policy#
Use licensePolicy when a named template does not express your business rule. Do not send licensePolicyTemplate in the same request.
{
"policy_version": 2,
"playback_policy": {
"persistent": false,
"license_duration": 14400,
"rental_duration": 0,
"playback_duration": 7200,
"renewal_duration": 300,
"allowed_track_types": "ALL",
"max_stream_per_user": 2
},
"security_policy": [{
"track_type": "ALL",
"widevine": {
"security_level": 1,
"required_hdcp_version": "HDCP_V1",
"disable_analog_output": true
},
"playready": {
"security_level": 2000,
"digital_video_protection_level": 250,
"analog_video_protection_level": 150,
"digital_audio_protection_level": 100
},
"fairplay": {
"hdcp_enforcement": 0,
"allow_airplay": true,
"allow_av_adapter": false
},
"wiseplay": {
"security_level": 1,
"output_control": 1
}
}]
}
Rules that fail closed
- Policy JSON is limited to 16 KiB, must use
policy_version: 2, and may contain at most seven unique track rules. - Single-key content requires one
ALLrule,allowed_track_types: ALL, and an automatic quality ceiling. - Multi-key rules may target
AUDIO,SD,HD,UHD1, orUHD2. Omitted tiers receive no key. max_stream_per_user: 0disables DRM-X concurrent-stream limiting for that token.expiresInSecondsis DRM License Token validity (60–7200 seconds). It is separate from DRM license and playback durations.
DRM-X 6.0