DRMtoday Onboard¶
Code samples
DRMtoday Onboard: a DRM-protected DASH stream with licenses from a DRMtoday Onboard server.
Onboard is the offline architecture for DRMtoday. It lets you install a DRMtoday server on a private network — for example, on board a bus, plane, train, or ship.
Enable Onboard by defining an environment name and the URL of your local
DRMtoday Onboard server. The SDK registers a new environment automatically
using the specified name and URL. We suggest the name DRMtodayOnboard to
avoid a collision with other predefined environments. You can also pass
other custom data, such as a user ID or session ID.
Specific properties of the DRMtoday Onboard environment, set under
drm.customData:
Property |
Required |
Description |
|---|---|---|
|
Yes |
The base URL of the DRMtoday Onboard server. |
|
No |
Appended to the base URL to form the Widevine URL. Default: |
|
No |
Appended to the base URL to form the PlayReady URL. Default: |
|
No |
Appended to the base URL to form the FairPlay URL. Default: |
|
No |
Widevine video robustness levels. Default: |
|
No |
Widevine audio robustness levels. Default: |
|
No |
Whether a persistent distinctive identifier is required. Default: |
|
No |
Whether the ability to persist state is required. Default: |
|
No |
PlayReady video robustness levels. Default: |
|
No |
PlayReady audio robustness levels. Default: |
|
No |
The Widevine server certificate. If unset, the SDK uses its default certificate. Set to |
Import the DRMtoday Onboard component:
import "@castlabs/prestoplay/cl.onboard";
Minimal example:
const player = new clpp.Player(...);
player.open({
source: 'https://example.com/Manifest.mpd',
drm: {
env: 'DRMtodayOnboard',
customData: {
baseUrl: 'offlineDRMTodayServerUrl',
}
}
});
More complex example:
const player = new clpp.Player(...);
player.open({
source: 'https://example.com/Manifest.mpd',
drm: {
env: 'DRMtodayOnboard',
customData: {
baseUrl: 'offlineDRMTodayServerUrl',
widevineUrl: 'widevine',
playreadyUrl: 'playready',
fairplayUrl: 'fairplay',
serverCertificate: null, // Forces fetching the certificate from the Widevine server
}
}
});