Setup DRM from MCP
MCP is a feature complete OTT Platform owned by Akta Tech. You can add DRM to your content in MCP. The configured DRM is automatically detected and handled by Lura Player from the token in the configuration. No additional configuration is needed.
To configure DRM in MCP, go to your mcp.
Create DRM Keyset
Under the Transcodings
tab, go to DRM Keysets
Press create new drm keyset button
Fill the title, and enable your preferred drms.
After enabling, fill the fields with your drm details, and press create
button.
Create License Policies
Under the Play Services
tab, go to License Policies
Press add new button
Fill the title and description
After filling the title and description, enable your preferred drms, and press create
Play Configurations
After creating the drm keyset and license policy, go to play configurations under the Play Services
Press Add New
After filling the Name of the play configuration, press on Show Advanced Options
Select DRM Keyset and License policy that you have created earlier
After creating the play configuration, you can implement your video with the token you have created, and it will start showing ads.
import React, { useRef, useEffect, useState } from "react";
import { SafeAreaView, StyleSheet, View } from "react-native";
import { LuraPlayer, type UnifiedPlayer, type Configuration } from "@akta-tech/lura-player-react-native";
import { LuraPlayerControls } from "@akta-tech/lura-player-react-native-ui";
export default function App() {
const playerRef = useRef<UnifiedPlayer>(null);
const config: Configuration = {
...
lura: {
appKey: "<YOUR_APP_KEY>",
assetId: "<ASSET_ID>",
},
...
};
useEffect(() => {
playerRef.current?.setConfig(config)
}, [playerRef]);
return (
<View>
<SafeAreaView />
<LuraPlayer ref={playerRef} style={styles.player}>
<LuraPlayerControls></LuraPlayerControls>
</LuraPlayer>
</View>
);
}
const styles = StyleSheet.create({
player: {
backgroundColor: "#000",
width: "100%",
maxWidth: 640,
aspectRatio: 16 / 9,
},
});