Digital Rights Management (DRM) provides content protection for video content. Ravnur Media Player supports multiple DRM systems.
Widevine is Google's DRM solution, widely supported on Chrome, Firefox, Edge, and Android devices.
const mediaSource = {
id: 'widevine-demo',
src: 'YOUR_DRM_PROTECTED_STREAM_URL',
type: 'application/dash+xml', // or 'application/x-mpegURL' for HLS
title: 'DRM Protected Content'
};
const options = {
widevineURL: 'YOUR_WIDEVINE_LICENSE_SERVER_URL'
};
player.setup(mediaSource, options);
PlayReady is Microsoft's DRM solution, primarily supported on Edge and Internet Explorer 11.
const mediaSource = {
id: 'playready-demo',
src: 'YOUR_DRM_PROTECTED_STREAM_URL',
type: 'application/dash+xml',
title: 'DRM Protected Content'
};
const options = {
playreadyURL: 'YOUR_PLAYREADY_LICENSE_SERVER_URL'
};
player.setup(mediaSource, options);
FairPlay is Apple's DRM solution, supported on Safari for macOS and iOS devices. FairPlay requires both a license server URL and a certificate URL.
const mediaSource = {
id: 'fairplay-demo',
src: 'YOUR_DRM_PROTECTED_STREAM_URL',
type: 'application/x-mpegURL', // FairPlay typically uses HLS
title: 'DRM Protected Content'
};
const options = {
fairplayURL: 'YOUR_FAIRPLAY_LICENSE_SERVER_URL',
fairplayCertificateUrl: 'YOUR_FAIRPLAY_CERTIFICATE_URL' // Required for FairPlay
};
player.setup(mediaSource, options);
For maximum compatibility across different browsers and devices, you can configure multiple DRM systems simultaneously. The player will automatically use the appropriate DRM system based on the browser.
const mediaSource = {
id: 'multi-drm-demo',
src: 'YOUR_DRM_PROTECTED_STREAM_URL',
type: 'application/dash+xml',
title: 'DRM Protected Content'
};
const options = {
// Widevine for Chrome, Firefox, Edge, Opera
widevineURL: 'YOUR_WIDEVINE_LICENSE_SERVER_URL',
// PlayReady for Edge, IE11
playreadyURL: 'YOUR_PLAYREADY_LICENSE_SERVER_URL',
// FairPlay for Safari (requires HLS stream)
fairplayURL: 'YOUR_FAIRPLAY_LICENSE_SERVER_URL',
fairplayCertificateUrl: 'YOUR_FAIRPLAY_CERTIFICATE_URL'
};
// The player will automatically select the appropriate DRM system
// based on the browser's capabilities
player.setup(mediaSource, options);