# react-native-ksy-media-player **Repository Path**: baOZe/react-native-ksy-media-player ## Basic Information - **Project Name**: react-native-ksy-media-player - **Description**: 基于KSYMediaPlayer封装的react native组件 - **Primary Language**: NodeJS - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-06-06 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # react-native-ksy-media-player ## Getting started `$ yarn add https://gitee.com/baOZe/react-native-ksy-media-player.git` ### Mostly automatic installation `$ react-native link react-native-ksy-media-player` ### Manual installation #### iOS 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` 2. Go to `node_modules` ➜ `react-native-ksy-media-player` and add `RNKsyMediaPlayer.xcodeproj` 3. In XCode, in the project navigator, select your project. Add `libRNKsyMediaPlayer.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` 4. Run your project (`Cmd+R`)< #### Android 1. Open up `android/app/src/main/java/[...]/MainActivity.java` - Add `import com.github.tzraeq.RNKsyMediaPlayerPackage;` to the imports at the top of the file - Add `new RNKsyMediaPlayerPackage()` to the list returned by the `getPackages()` method 2. Append the following lines to `android/settings.gradle`: ``` include ':react-native-ksy-media-player' project(':react-native-ksy-media-player').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-ksy-media-player/android') ``` 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: ``` compile project(':react-native-ksy-media-player') ``` 4. put `libksyplayer.jar` and `libksystat.jar` to `android/app/src/main/libs` 5. put `ksyplayer vod jniLibs` to `android/app/src/main/jniLibs` ## Usage ```javascript import RNKsyMediaPlayer from 'react-native-ksy-media-player'; // TODO: What to do with the module? RNKsyMediaPlayer; ```