- Add the next dependency in
package.jsonmanually (since it's not NPM registered module)
"dependencies": {
...
"react-native-nm-video": "git+https://github.com/NoriginMedia/react-native-nm-video.git"
...
}
-
run
npm install -
run
react-native linkso the lib will be automagically linked to your react-native iOS and Android projects -
in JS:
import Video from "react-native-nm-video";
...
<Video {...props} />-
clone the repo
git@github.com:NoriginMedia/react-native-nm-video.git -
run
npm installin the root folder (installs ESLint etc.) -
cd /examples -
run
npm installinexamplesfolder (installs react-native for local testing in the empty project) -
run
react-native linkso thereact-native-nm-videopackage get linked to yourexamplesubproject for iOS and Android automatically
-
open Android Emulator
-
in
examplefolder runnpm run start:android. Orstart:androidtask from your IDE npm scripts window -
after the changes made to native code, run
npm run reinstallto reinstall dependency with updated code. -
start:androidagain to rebuild with updated native code. -
Official guide on native UI modules: here
-
Standard
<Video />component offered by the community that might be used as an example: here
-
in
examplefolder runnpm run start:ios. Orstart:iostask from your IDE npm scripts window -
after the changes made to native code, run
npm run reinstallto reinstall dependency with updated code. -
start:iosagain to rebuild with updated native code. -
Official guide on native UI modules: here
-
Standard
<Video />component offered by the community that might be used as an example: here
-
examplessubproject has a dependency on the outer folder package (which is `react-native-nm-video itself) for testing -
examples/index.<ios|android>.jsis an entry point to the app for respective platform. -
Video.jsis a React component that requires native component named RCTNMVideo (React Norigin Media Video). -
Sources for native modules are in respective folders,
androidandios. -
examplefolder is excluded when installing package in some external project (see.npmignore)