Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support react-native > 0.40 #437

Merged
merged 3 commits into from
Jan 11, 2017
Merged

Conversation

olofd
Copy link
Contributor

@olofd olofd commented Jan 8, 2017

Updated header imports to build on react-native > 0.40

@hellogerard
Copy link

Consider bumping the package version to 1.0, since it is a breaking change (react-native-video will no longer work on React Native <= 0.39).

@olofd
Copy link
Contributor Author

olofd commented Jan 9, 2017

Bumped version. Let me know if there is anything else I can do.

@joekim
Copy link

joekim commented Jan 9, 2017

Are you guys having issues with the device events such as, onLoad, not triggering RN .40?

@olofd
Copy link
Contributor Author

olofd commented Jan 9, 2017

@joekim yup.. same here. This PR was intended just to make it build. But can take a look at this as well.

@olofd
Copy link
Contributor Author

olofd commented Jan 9, 2017

@joekim No, wait. It worked here. Just some confusing JS. The event is onLoad not onVideoLoad. When I called it onLoad it was called.

@joekim
Copy link

joekim commented Jan 9, 2017

@olofd My onLoad does not seem to be triggering. But, I know through the debugger that onVideoLoad is being emitted on the native side. How does that event name map to onLoad? Any tips on debugging my issue?

@olofd
Copy link
Contributor Author

olofd commented Jan 9, 2017

set a debugger; on line 48 in Video.js in your node_modules/react-native-video folder, close the packager-terminal and relaunch. Mine hit that then ran onLoad={() => console.log('load')} on the video element at least. onVideoLoad is mapped to onLoad in JS: onVideoLoad: this._onLoad (Line 169).

@joekim
Copy link

joekim commented Jan 9, 2017

@olofd I added a breakpoint in _onLoad and it's not triggering. I added one in render just to see that it's working and that works fine. I also know that onVideoLoad is being emitted by native. Not sure what the issue is. Maybe it's something to do with my project. I'm going to try to create a new project from scratch.

@hellogerard
Copy link

hellogerard commented Jan 10, 2017

Are you guys having issues with the device events such as, onLoad, not triggering RN .40?

To test this, I tried to see if the Example project would work using this PR branch. I couldn't even get it to build (this issue, I believe: facebook/react-native#11721). I tried upgrading RN a few different ways with the same result.

Can anyone get the Example project working in RN 0.40? If we can get the native files upgraded, we could add that to this PR.

@olofd
Copy link
Contributor Author

olofd commented Jan 10, 2017

@hellogerard I'll take a look at the example-project tonight.

@olofd
Copy link
Contributor Author

olofd commented Jan 10, 2017

@hellogerard I've now upgraded the example project to run on 0.40. Ran react-native upgrade and did some manual fixes after that. Now runs. Also left a console.log for you and @joekim in onLoad. Would recommend that you wipe your node_module-folder in the example project and run npm install in the example project again after pulling my update.

@hellogerard
Copy link

@olofd That's awesome. No reason not to merge this now.

@joekim If you are still having issues with callbacks, I suggest creating a new issue. (BTW, is your video playing at all? If not, make sure you are using a https URL.)

@joekim
Copy link

joekim commented Jan 10, 2017

@hellogerard I'll take a look. The video is playing but the call backs are triggering.

@joekim
Copy link

joekim commented Jan 10, 2017

@olofd @hellogerard I retested the sample app and it triggers properly.

@mattapperson mattapperson merged commit fe6bc4f into TheWidlarzGroup:master Jan 11, 2017
@chirag04
Copy link

@mattapperson This PR is merged but react-native-video v1.0 is not published on npm. Can you also publish the latest master on npm.

@mattapperson
Copy link
Contributor

published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants