Skip to main content

Quick Start

Introduction

This section describes all the mandatory steps to integrate Lura React Native SDK into your application. Through a single interface, the Lura React Native SDK offers a component to the platforms for iOS, Android, Web, WebOS, and tvOS.

Getting Started

The first step in this part is to build a simple demo app that uses the lura-react-native-core package. This is followed by a description of the LuraPlayer component's features and available properties.

Requirements

  • npm (Web)
  • Gradle (Android)
  • Cocoapods (iOS)

Usage

In your react-native project, install the lura-react-native-core package from npm.

npm

npm i lura-react-native-core

yarn

yarn add lura-react-native-core

After installing the npm package, import the player in your project. Note that you need to configure Android and IOS if you want to use the player in Android or IOS, check out the installation section.

import LuraPlayer from 'lura-react-native-core';

export default function MySampleComponent(){
...

const config = {
token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2aWQiOiI0MzY2NjIzIiwiaXNzIjoiM1FMWjdaV0JsRko1Vk16Y2pyczJPbTd3VTdEanIzNFkifQ.CruM1W3gIEyQTBTqfaY5gTdf7b_2SSNg4gj6JGOj4Mg"
};

return (
<View>
<LuraPlayer ref={playerRef} config={config} />
</View>
);
}