Skip to main content

Getting Started

Lura Plugins are seamlessly integrated tools developed or managed by Lura Player developers to effortlessly add functionality, such as advertisements and analytics, to Lura Player. These plugins are made to simplify the commonly used measuring and monetization tools in the industry into Lura Player.

Getting started with LuraPlayer plugins is very easy. Just add plugins key to your config object and start experimenting.

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 = {
...
plugins: {
...
PLUGIN_CONFIG_NAME: {
...
PLUGIN_PARAM : VALUE
...
}
...
},
...
};
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,
},
});