React-native-youtube: Events not firing on RN 0.39

Created on 7 Feb 2017  路  9Comments  路  Source: davidohayon669/react-native-youtube

Hey,

I'm using react-native 0.39 and no events are firing on IOS (onReady, onChangeState,...)
I didn't see any issues on it, am I the only one?

I fixed it by using sendAppEventWithName instead of sendInputEventWithName to dispatch events from React Native to JS. Btw it seems that sendInputEventWithName is deprecated.

It might be the same issue as #108?

If anyone is having the same issue, I will do a PR ;)

Most helpful comment

@iDams @max-mykhailenko I made an integration branch that works great for my project! 馃帀 I will try to make a clean PR for you now.

All 9 comments

same issue +1

It's duplicate of #108

@iDams i replaced sendInputEventWithName with sendAppEventWithName in Libraries > RCTYoutube.xcodeproj > RCTYoutube > RCTYoutube.m, but it still isn't working. Am i missing something?

@jonwu You also need to change the way you listen to events in YouTube.ios.js. You have to use NativeAppEventEmitter.addListener() now

You can check the changes I made on my fork:
https://github.com/iDams/react-native-youtube/commit/3eb3344bd48379b67266dcfc759aeb034010d20f#diff-20f3ec9d61e7a9aa3d583adf9e66d4ffR62

Here is the doc related: https://facebook.github.io/react-native/docs/native-modules-ios.html#sending-events-to-javascript

@iDams can you create PR with this changes?

@iDams I would love to see this commit merged, I will try to test it on an integration branch that also contains the build fix for react native 0.4.0 currently in master.

@iDams @max-mykhailenko I made an integration branch that works great for my project! 馃帀 I will try to make a clean PR for you now.

@wcandillon nice! Sorry for the late response, I didn't have time to do the PR yet.

@iDams @max-mykhailenko ready at https://github.com/inProgress-team/react-native-youtube/pull/113. I use it in my own react native project and it works great. Thank you for such great component and for your support guys.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ishita-kothari picture ishita-kothari  路  5Comments

dungnguyen10989 picture dungnguyen10989  路  3Comments

dozel picture dozel  路  5Comments

LorienHW picture LorienHW  路  3Comments

serialbandicoot picture serialbandicoot  路  4Comments