xw0810 / react-native-ijkplayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-ijkplayer

Getting started

$ npm install react-native-ijkplayer --save

Mostly automatic installation

$ react-native link react-native-ijkplayer

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-ijkplayer and add RNIjkplayer.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNIjkplayer.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.nandasoftech.med.ijkplayer.RNIjkplayerPackage; to the imports at the top of the file
  • Add new RNIjkplayerPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-ijkplayer'
    project(':react-native-ijkplayer').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-ijkplayer/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-ijkplayer')
    

Usage

import RNIJKPlayer from 'react-native-ijkplayer';

// TODO: 
RNIJKPlayer;

About


Languages

Language:Java 57.9%Language:Ruby 24.4%Language:Objective-C 13.2%Language:JavaScript 4.6%