Token Playback
This is the most simple and the recommended way of playing videos. Lura Player will configure itself based on the token you configured from MCP.
Attribute | Type | Description |
---|---|---|
token | string | JWT of the video you get from MCP |
import React, { useRef } from "react";
import { LuraPlayer, LuraPlayerProps } from "lura-react-native-core";
export default function MySampleComponent() {
const playerRef = useRef<LuraPlayer>(null);
const config = {
token:
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2aWQiOiI0MzY2NjIzIiwiaXNzIjoiM1FMWjdaV0JsRko1Vk16Y2pyczJPbTd3VTdEanIzNFkifQ.CruM1W3gIEyQTBTqfaY5gTdf7b_2SSNg4gj6JGOj4Mg",
};
return (
<View>
<LuraPlayer ref={playerRef} config={config} />
</View>
);
}