Skip to main content

THEOplayer

THEOplayer is a universal video player solution that allows enterprises and online media companies to provide video playback on a wide variety of devices and platforms. THEOplayer supports all major platforms, such as Android, iOS, Roku, Casting, and Smart TVs. It plays adaptive media formats, HLS and MPEG-DASH. By default, THEOplayer supports FairPlay, Widevine, and PlayReady DRM technologies.

The general concept for Axinom DRM integration for DRM-compatible players, is outlined in the video Players document.

THEOplayer is easy to integrate THEOplayer with Axinom DRM as it is already pre-integrated.

Integration​

The SDKs available for integrating Axinom DRM and THEOplayer include:

  • Web SDK
  • Android SDK
  • iOS SDK
  • tvOS SDK
  • Android TV SDK
  • Chromecast SDK

The code examples for Web, Android, and iOS SDKs are given below. For more information, check the THEOplayer website.

Setting up Web SDK​

  • You can follow the guide on the THEOPlayer website to set up your THEOplayer License, setting up the HTML player, and include the THEOplayer library into your implementation.

Below you can find the DRM configuration code samples when integrating Axinom DRM:

Code Sample​

Refer to this code sample when integrating Axinom DRM with THEOplayer for web.

if (HLS) {
let drmConfiguration = {
"integration": "axinom",
"token": "<AXINOM_TOKEN>",
"fairplay": {
"licenseAcquisitionURL": "<AXINOM_DRM_LICENSE_SERVICE_URL_FAIRPLAY>",
"certificateURL": "<CERTIFICATE_URL>"
}
};
player.source = {
"sources": {
"src": "<HLS_STREAM_URL>",
"type": "application/x-mpegurl",
"contentProtection": drmConfiguration
}
}
} else if (DASH) {
let drmConfiguration = {
"integration": "axinom",
"token": "<AXINOM_TOKEN>",
"playready": {
"licenseAcquisitionURL": "<AXINOM_DRM_LICENSE_SERVICE_URL_PLAYREADY>"
},
"widevine": {
"licenseAcquisitionURL": "<AXINOM_DRM_LICENSE_SERVICE_URL_WIDEVINE>"
}
};
player.source = {
"sources": {
"src": "<DASH_STREAM_URL>",
"type": "application/dash+xml",
"contentProtection": drmConfiguration
}
}
}

Android SDK​

You can follow the Android guide on the THEOPlayer website to set up your THEOplayer License, setting up the Android THEOplayer, and include the THEOplayer Maven repository into your implementation.

Below you can find the DRM configuration code samples when integrating Axinom DRM:

Code Sample​

Refer to this code sample when integrating Axinom DRM with THEOplayer for Android. You can add the below configurations in your MainActivity.

DRMConfiguration drmConfiguration = new AxinomDRMConfiguration.Builder("<AXINOM_TOKEN>")
.widevine(
new KeySystemConfiguration(
"<AXINOM_DRM_LICENSE_SERVICE_URL_WIDEVINE>"
)
)
.build();

TypedSource typedSource = new TypedSource.Builder()
.src("<DASH_STREAM_URL>")
.drm(drmConfiguration)
.build();

SourceDescription sourceDescription = SourceDescription.Builder.sourceDescription()
.sources(typedSource)
.build();

theoplayer.getPlayer().setSource(sourceDescription);

iOS SDK​

You can follow the iOS guide on the THEOPlayer website to set up your THEOplayer License, setting up the iOS THEOplayer, and import the framework into your implementation.

Below you can find the DRM configuration code samples when integrating Axinom DRM:

Code Sample​

Refer to this code sample when integrating Axinom DRM with THEOplayer for iOS.

let drmConfiguration = AxinomDRMConfiguration(
licenseAcquisitionURL: "<AXINOM_DRM_LICENSE_SERVICE_URL_FAIRPLAY>",
certificateURL: "<CERTIFICATE_URL>",
token: "<AXINOM_TOKEN>"
)
let typedSource = TypedSource(src: "<HLS_STREAM_URL>", type: "application/x-mpegurl", drm: drmConfiguration)
let sourceDescription = SourceDescription(source: typedSource)
theoplayer.source = sourceDescription

Testing playback​

You can actually try out the THEOplayer from the DRM Video Playback Tool and check whether your video plays with it. This tool allows you to play the DRM-protected video as well as generate and adjust the Entitlement Message. Copy the video URL, create the JWT and choose THEOplayer from the drop-down menu at the bottom. Click to get the player link and you can see whether your video plays with THEOplayer.

You can find the tool here:

DRM Video Playback Tool

See also​