player.js icon indicating copy to clipboard operation
player.js copied to clipboard

Play and Pause events aren't fired on iOS and Android apps

Open stefanotauriello opened this issue 7 years ago • 49 comments

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

stefanotauriello avatar Sep 11 '18 16:09 stefanotauriello

I can confirm this too. No events are received anymore in our app either.

KristoferGoransson avatar Sep 12 '18 09:09 KristoferGoransson

Yes, none of the events are firing, also loadVideo, unloadVideo are not working 👎

kirrukirru avatar Sep 12 '18 11:09 kirrukirru

Will it be fixed soon? How can I resolve?

stefanotauriello avatar Sep 12 '18 11:09 stefanotauriello

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 avatar Sep 12 '18 14:09 fisherinnovation

@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...

stefanotauriello avatar Sep 12 '18 14:09 stefanotauriello

@fisherinnovation, in my case, it's embedded browser (Android WebView, iOS WkWebKit) loading local html file having the same issue.

kirrukirru avatar Sep 12 '18 16:09 kirrukirru

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 avatar Sep 12 '18 16:09 satishnavik

@satishnavik Yes from two days.... How can we resolve?

stefanotauriello avatar Sep 12 '18 18:09 stefanotauriello

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!

reckoner165 avatar Sep 12 '18 19:09 reckoner165

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!

satishnavik avatar Sep 12 '18 19:09 satishnavik

@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

stefanotauriello avatar Sep 12 '18 19:09 stefanotauriello

@reckoner165

Just copy and paste the jsfiddle code on a html page and run it on the any browser.

satishnavik avatar Sep 12 '18 19:09 satishnavik

@satishnavik The code works in browsers, it DOESN’T work in iOS and Android apps

stefanotauriello avatar Sep 12 '18 19:09 stefanotauriello

Its not working on any browser as well

Chrome Version 69.0.3497.92 Firefox Version 62.0

capture

satishnavik avatar Sep 12 '18 19:09 satishnavik

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 avatar Sep 12 '18 20:09 reckoner165

@reckoner165 Yes i’m using the player.js API

stefanotauriello avatar Sep 12 '18 20:09 stefanotauriello

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.

trohil avatar Sep 12 '18 21:09 trohil

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.

satishnavik avatar Sep 12 '18 21:09 satishnavik

@trohil We’re in the same situation, i should be contacted by Vimeo developers. Stay tuned!

stefanotauriello avatar Sep 12 '18 22:09 stefanotauriello

@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.

trohil avatar Sep 12 '18 22:09 trohil

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 avatar Sep 13 '18 00:09 fisherinnovation

@fisherinnovation Thank you. I will test it and let you know what I see.

trohil avatar Sep 13 '18 00:09 trohil

@fisherinnovation It works now!! 👏👏👏

stefanotauriello avatar Sep 13 '18 05:09 stefanotauriello

Thanks!!

lykrysh avatar Sep 13 '18 06:09 lykrysh

Thanks...Its working now...!!!

satishnavik avatar Sep 13 '18 16:09 satishnavik

Pretty sure this is happening again? At least, when loading via https://player.vimeo.com/api/player.js right now

joshdavenport avatar Jul 08 '19 16:07 joshdavenport

@joshdavenport Same here, the 'play' event is not working using Chrome/Safari on iOS.

christianMD avatar Jul 09 '19 15:07 christianMD

@joshdavenport @christianMD do you have a test page online? we couldn't reproduce it on our end. play events are firing on iOS.

luwes avatar Jul 09 '19 18:07 luwes

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.

joshdavenport avatar Jul 10 '19 11:07 joshdavenport

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!

joshdavenport avatar Jul 11 '19 15:07 joshdavenport