$ npm install --save https://github.com/khjde1207/react-native-android-VideoView
$ react-native link react-native-android-video-view
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.say.lib.videoview.RNReactNativeAndroidVideoViewPackage;
to the imports at the top of the file - Add
new RNReactNativeAndroidVideoViewPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-android-video-view' project(':react-native-android-video-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-video-view/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-android-video-view')
import RNReactNativeAndroidVideoView from 'react-native-android-video-view';
// TODO: What to do with the module?
RNReactNativeAndroidVideoView;