BondGoat / react-native-native-video-player

React native video player, used for Android, iOS. It will lauch a Native Video, not an Embeded Component
GNU General Public License v3.0
50 stars 44 forks source link

Unable to resolve module: module does not exist in the module map #12

Open samanthacampisi opened 7 years ago

samanthacampisi commented 7 years ago

I'm trying to install and use the package according to the instructions in the README.

I'm using RN 0.48.

I run npm install react-native-native-video-player --save, then react-native link react-native-native-video-player

then when I add var VideoPlayer = require('react-native-native-video-player'); I find this error in my app.

Am I missing something?

BondGoat commented 7 years ago

Hi @samanthacampisi ,

Sorry for late respond. Are you using Android or iOS, and what is the error that you have?

If you're running in iOS, please open XCode, and do these steps:

Let me know if you still have any problem.

Thanks.

samanthacampisi commented 7 years ago

Hey, no prob!

I was using iOS. Following these steps helped and it worked.

When I used Android, however, I got a compilation error. If someone else is having this problem, removing the following part in VideoPlayerPackage.java worked for me:

@Override public List<Class<? extends JavaScriptModule>> createJSModules() { return Collections.emptyList(); }

Is it not necessary anymore?

BondGoat commented 7 years ago

Hmm... It's maybe different in RN 0.48, I created this when RN was 0.35.

Thanks for your note, I'll update in README.

gsolanki1509 commented 6 years ago

Hello @samanthacampisi im getting "RNVideoPlayer.showVideoPlayer" undefined not an object.

Can you please tell me what i'm missing?