player.js
player.js copied to clipboard
Play and Pause events aren't fired on iOS and Android apps
Expected Behavior
Actual Behavior
player.on('play', function() { console.log('played the video!'); });
It isn't fired on iOS and Android apps, for over 1 year all was ok but from several days there's a problem
Steps to Reproduce
I can confirm this too. No events are received anymore in our app either.
Yes, none of the events are firing, also loadVideo, unloadVideo are not working 👎
Will it be fixed soon? How can I resolve?
Thanks for reporting everyone. I am noticing in the demo code you provided there is no host element to place the player into.
Without the DIV appended to the DOM, you will see an Uncaught TypeError: You must pass either a valid element or a valid id. error when attempting to run this code.
Can you test https://jsfiddle.net/cxdnbgeo/ an example with the DIV added to the test code? It works as expected in iOS in Android on my end.
@fisherinnovation I omitted the html code, it’s not the problem. The problem is that in iOS and Android Vimeo Player doesn’t fire events anymore...
@fisherinnovation, in my case, it's embedded browser (Android WebView, iOS WkWebKit) loading local html file having the same issue.
Is there any solution to this issue. I am facing this issue from last 2 days.
Any work around to this will be a helpful
@satishnavik Yes from two days.... How can we resolve?
We are trying to reproduce this behavior in order to fix it. Both @stefanotauriello's code (HTML included) and https://jsfiddle.net/cxdnbgeo/ seem to work as expected on Android and iOS. Can you provide more information w.r.t steps to reproduce the issue?
What Android/iOS version and which browsers do the player events not fire on? Do you also see errors accompanying this behavior? If so, can you share them?
Thanks!
I haven't found any solution yet....it is not throwing any error/exception.
Has anyone found any solution or work around?
Thanks in advance!
@reckoner165 My code has worked for Over 1 year on hundreads of mobile phones, from two days it doesn’t work anymore. It has been tested on all devices, so it’s very important finding a solution. Every test has to be done on real device and not on emulator
@reckoner165
Just copy and paste the jsfiddle code on a html page and run it on the any browser.
@satishnavik The code works in browsers, it DOESN’T work in iOS and Android apps
Its not working on any browser as well
Chrome Version 69.0.3497.92 Firefox Version 62.0
Thanks for additional information! The above code snippet works on both Chrome 69.0.3497.92 and Firefox 62.0 Both Android and iOS web players work as well.
@stefanotauriello Since you mentioned that the events are not firing in the iOS app, can you confirm that you are utilizing the player.js API and not https://github.com/vimeo/PlayerKit on iOS ?
@reckoner165 Yes i’m using the player.js API
We are using the player.js API and are experiencing the same problem.
We have an entire training platform built on these videos and all of our users are getting stuck because the player is not communicating to the page to enable the next button.
Previously it was working without using the webserver means just running the local html file using the file:// path but now it is not working..!!
The hybrid Mobile app opens the local html file on the browser (Android WebView, iOS WkWebKit). Here player.js is not firing any event nor throwing any error.
@trohil We’re in the same situation, i should be contacted by Vimeo developers. Stay tuned!
@stefanotauriello Thanks. Let me know what you hear from the developers. We are racing to put a couple of hotfixes in to compensate, but a Vimeo solution would be more ideal.
This issue should be patched and corrected now. Please test again when you get a moment.
Thanks again for providing the detailed feedback on this everyone. I will leave this open until confirmed corrected.
@fisherinnovation Thank you. I will test it and let you know what I see.
@fisherinnovation It works now!! 👏👏👏
Thanks!!
Thanks...Its working now...!!!
Pretty sure this is happening again? At least, when loading via https://player.vimeo.com/api/player.js right now
@joshdavenport Same here, the 'play' event is not working using Chrome/Safari on iOS.
@joshdavenport @christianMD do you have a test page online?
we couldn't reproduce it on our end. play events are firing on iOS.
Sure thing @luwes, this is about as simple as an implementation of this could be but anyway, here is one: https://codepen.io/joshdavenport/full/ormxzR
On Chrome on my laptop, the alert is triggered. On Safari and Chrome on iOS, no alert at all.
Now this is very curious, stumbled upon some odd behaviour this morning: https://www.youtube.com/watch?v=345cUhu4C9I&feature=youtu.be
The event seems to trigger when closing and re-opening the browser.
Found this completely by accident!