1.0.11 • Published 3 years ago
rn-tvexo-player v1.0.11
react-native-native-exo-player
Getting started
$ npm install react-native-native-exo-player --save
Mostly automatic installation
$ react-native link react-native-native-exo-player
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-native-exo-playerand addRNNativeExoPlayer.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNNativeExoPlayer.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNNativeExoPlayerPackage;to the imports at the top of the file - Add
new RNNativeExoPlayerPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-native-exo-player' project(':react-native-native-exo-player').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-native-exo-player/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-native-exo-player')
Windows
- In Visual Studio add the
RNNativeExoPlayer.slninnode_modules/react-native-native-exo-player/windows/RNNativeExoPlayer.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Native.Exo.Player.RNNativeExoPlayer;to the usings at the top of the file - Add
new RNNativeExoPlayerPackage()to theList<IReactPackage>returned by thePackagesmethod
Usage
import RNNativeExoPlayer from 'react-native-native-exo-player';
// TODO: What to do with the module?
RNNativeExoPlayer;