Skip to main content

Plugin Configuration

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.

To add Plugins, you can use the following configuration.

AttributeTypeDescription
pluginsPLUGIN_NAME : PLUGIN_CONFIG_OBJPlugins
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,
},
});