Skip to main content

Adding DRM Information

The example code shows how to use the LuraPlayer to play encrypted content protected with Digital Rights Management (DRM) systems. LuraPlayer currently supports widevine and playready for Roku.

A DRM (Digital Rights Management) license URL is a URL that points to a server that issues licenses for protected digital content. When content is protected by DRM, it is encrypted to prevent unauthorized access and distribution. In order to view or use the content, the user needs a license that grants them permission to do so. The license contains information such as the user's rights to the content, the expiration date of the license, and the decryption key needed to access the content.

Widevine and Playready

To configure Widevine or Playready DRM in Lura Player, you only need to add a license URL to the encrypted media object.

AttributeTypeRequiredDescription
licenseUrlstringyesLicense URL of the content.
Widevine and Playready
m.player.callFunc("setConfig", {
...
content: {
media: [
...
{
url: "YOUR_PROTECTED_MEDIA",
type: "application/x-mpegURL", ' HLS + fmp4
licenseUrl: "YOUR_DRM_LICENSE_SERVER_URL"
}
...
]
}
...
})

Preferred DRM Systems

You can specify the Preferred DRM Systems on your configuration by adding preferredDRMSystems attribute to your configuration. By specifying this attribute, LuraPlayer will only try to use the preferred DRM systems on supported devices.

danger

Specifying this attribute may lead to playback failure if none of the preferred drm systems are supported on the browser. Please provide the widest range of DRM systems the license server supports.

AttributeTypeDescription
preferredDRMSystemsArray<"widevine" | "playready">Preferred DRM Systems.
Preferred DRM Systems
m.player.callFunc("setConfig", {
...
content: {
media: [
...
{
url: "YOUR_PROTECTED_MEDIA",
type: "application/x-mpegURL", ' HLS + fmp4
licenseUrl: "YOUR_DRM_LICENSE_SERVER_URL"
}
...
]
preferredDRMSystems: [
"widevine"
]
}
...
})