Getting started on React Native
How to use the THEOlive React Native SDK.
Installation
npm install @theolive/react-native-player
Android
Make sure you add the following repositories to your app, so gradle can find the Android SDK:
maven { url "https://maven.theoplayer.com/releases" }
maven { url "https://jitpack.io" }
iOS
Don't forget to pod install
in your app's ios folder.
Usage
import { THEOlivePlayerView } from "@theolive/react-native-player";
// ...
<THEOlivePlayerView
onPlayerReady={(player) => {
// Use the player API to set your channelId.
player.loadChannel('my-channel-id');
}}
/>
Sample app
A sample app can be found here: https://github.com/THEOplayer/theolive-samples-react-native.
Updated 4 months ago