-
Notifications
You must be signed in to change notification settings - Fork 261
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
player methods not running on React Native Webview #808
Comments
I tried below and again it worked fine on browser but not it webiew. window.onmessage = function (event) {
if (event.data.event == "play") {
sendEvent(event.data.event, event.data.data);
}
if (event.data.event == "pause") {
sendEvent(event.data.event, event.data.data);
}
if (event.data.event == "ready") {
sendEvent(event.data.event, event.data.data);
}
if (event.data.event == "timeupdate") {
sendEvent('playing', event.data.data);
}
if (event.data.event == "ended") {
sendEvent('end', event.data.data);
}
}; |
I am actually seeing the same with React app and live events on a webapp. Regular videos work nicely. I've been trying to change my own functionality from npm packaged player and oEmbed to the iframe approach as presented here, but no help. Live events (in our case, not recurring event) just cannot be controlled from javascript at all. No events, and play command doesn't work. Right now only thing I can use to track if video is being played is to put the iframe in a "modal", connect on iframe load event and monitor when the modal is closed. I will try to see if just plain html page and and CDN based player can track the events from player for live event. |
Expected Behavior
should show an alert.
Or any method that
player
has should run.Actual Behavior
player
methods are not runningSteps to Reproduce
This is somewhat duplicate with #315
I am trying to get events from the player on my react native project but it seems like the methods are not working inside the react native's webview.
I tested it using codepen and it works fine on the browser.
codepen: https://codepen.io/isaac-tcs/pen/jOaGmXz
Below is my code that I changed some part from https://github.com/MetaLabs-inc/react-native-vimeo-iframe
The text was updated successfully, but these errors were encountered: