DRM

Digital Rights Management (DRM) protects video content by encrypting its streams so that only authorized players can decrypt and play them.

Dailymotion uses DRM to ensure that only users with valid entitlements can access protected content.

Use this page to understand the DRM workflow and find the guide relevant to your integration.

DRM requirement

DRM must be enabled on your organization. Reach out to your Dailymotion Success Manager or our Support team.


Supported DRM systems

The Dailymotion Player supports the following DRM systems:

DRM systemMain platforms and browsers
WidevineChrome, Firefox, Android, Edge
FairPlaySafari, iOS, macOS
PlayReadyEdge, Windows, Xbox

The Player automatically selects the appropriate DRM system for the user’s browser or device.


How DRM-protected playback works

Your backend
Your frontend
Dailymotion
You implement the purple parts. Click any step or call to see the details below.
Short-lived (5 min), signed with your private key
Checks signature, video ID, expiry and single use
Decryption key + usage rules (start window, duration)
Widevine, FairPlay or PlayReady
if valid
license
encrypted video
You implementYour code calls the playerDailymotion handlesBrowser (secure CDM)
You implement the purple parts. Tap any step or call to see the details below.
You implementYour code calls the playerDailymotion handlesBrowser (secure CDM)
Your frontend
Your backend
Your frontend
Dailymotion
Your frontend
license
encrypted video
if valid
Short-lived (5 min), signed with your private key
Checks signature, video ID, expiry and single use
Select a step
Click any pill or code call to see what happens and what you need to write.
YOU IMPLEMENT
Check entitlement
Your backend decides, with your own business rules, whether this user may watch this specific video.
Only entitled users get a token: this is the gate that protects your content.
YOU IMPLEMENT
Sign a JWT
Build the payload and sign a short-lived token (5 min) with your RSA private key.
Dailymotion verifies it with the public key you registered once during setup.
const jwt = require('jsonwebtoken');
const { v4: uuidv4 } = require('uuid');
function generateDRMToken(videoId, privateKey) {
const iat = Math.floor(Date.now() / 1000);
const exp = iat + 300; // 5-minute expiration window
const jti = uuidv4();
const payload = {
videoId: videoId,
iat: iat,
exp: exp,
jti: jti
};
return jwt.sign(payload, privateKey, { algorithm: 'RS256' });
}
YOUR CODE
Fetch the token
Your frontend calls your own backend endpoint to get the signed JWT for the video about to play.
const response = await fetch('/api/get-drm-token?videoId=YOUR_VIDEO_KID'
if (!response.ok) throw new Error(`Token request failed: ${response.status}`)
const { token } = await response.json();
YOUR FRONTEND
User opens the video
The flow starts on every protected playback. Create the player instance in its container first, before any DRM configuration.
const player = await dailymotion
  .createPlayer('player-wrapper');
YOUR CODE
setDrmConfig({ token })
Mandatory. Pass the JWT to the player before loading any content.
Skipping it, or calling it too late, makes the license request fail.
player.setDrmConfig({ token });
DAILYMOTION HANDLES
Dailymotion Player
Picks the DRM system for the browser or device (Widevine, FairPlay or PlayReady), requests the license and decrypts the stream. No configuration needed on your side.
YOUR CODE
loadContent(videoKid)
Load the protected video. The player then sends the license request with your JWT automatically.
player.loadContent({ video: YOUR_VIDEO_KID });
DAILYMOTION HANDLES
Validate the JWT
Dailymotion verifies the cryptographic signature, checks the video ID, and confirms the token has not expired or been used before.
DAILYMOTION HANDLES
Issue the license
The license contains the decryption key and the usage rules defined in your DRM protection settings.
DAILYMOTION HANDLES
Encrypted stream
The video stream is encrypted with Widevine, FairPlay or PlayReady. Without the matching decryption key it is unreadable.
BROWSER
Secure CDM
The browser's Content Decryption Module receives the license. The key stays inside this secure environment and never becomes accessible to external code.
BROWSER
Decrypt & render
The CDM decrypts the stream with the key and the player renders the video.

DRM usage rules

DRM licenses can enforce several usage rules:

  • Relative expiration: Defines how long a license remains valid after it is issued and before playback starts.
  • VOD play duration: Defines how long a VOD remains playable after playback begins.
  • Key rotation: Allows encryption keys to be changed during playback.
  • Key rotation period: Defines how frequently encryption keys are changed.

These rules can be configured separately for VOD and livestream content through API v2. The available fields and values are described in Configure DRM protection with API v2.


1. Configure your DRM protection settings

Configure DRM defaults settings and content-specific settings through API v2.

You can do the following via the API v2:

  • Register your RSA public key.
  • Configure separate default settings for VOD and livestream content.
  • Make DRM protection the default visibility setting for newly created VODs.
  • Apply default DRM settings to VODs and livestreams.
  • Override profile defaults for individual content.

Also available from Studio

you can also configure default DRM settings for VOD and livestream from your Dailymotion Studio. However, custom DRM settings for individual content is only available via API v2.


2. Implement DRM-protected playback

After configuring your DRM protection settings, implement the playback flow with the Dailymotion Player.

The Player integration requires a secure backend to generate signed playback JWTs. The token must be passed to setDrmConfig() before loading the protected content.





Did this page help you?