fregante/iphone-inline-video

When going fullscreen, some events and properties don't work

fregante opened this issue · 8 comments

Possibly broken or misbehaving properties in native fullscreen:

  • paused
  • ended
  • muted
  • loop
  • playbackRate

Missing events in fullscreen:

saury commented

Hi, would this piece

timeupdate (this can be solved by inverting the current behavior in preventEvent())

cause anything unexpected if I implement it?
So far so good in my project, just want to confirm with this project owner.
Thanks for these useful information anyway!

I never tested it so I'm not sure. Can I see the code?

saury commented

I didn't dig deep in source code. Just simply remove the following line in overloadAPI function:
preventEvent(video, 'timeupdate', ಠevent, false);
And I apply this plugin only for the purpose to enable the inline play in iOS 8&9. Silent autoplay is not in my consideration. Also iPad platform is applied to fetch the poster which is not in my primal plan, but somehow it works when I applied this plugin to it.

Without that line, timeupdate will fire up to 60 times per second. What are you using that event for?

saury commented

Thanks for reminding, I'm using this event for getting the currentTime and updating a progress bar for the video. I must misunderstanding this 'inverting'. Any good solution to solve this requirement?

Technically it's the right way, it fixes it in the fullscreen — but it's still required in the inline mode. To make it work, preventEvent() needs to be disabled only when it's in fullscreen. It's not as easy

saury commented

Thanks for the guide, I removed timeupdate preventEvent call still and added ended and timeupdate to proxyEvent as a workaround to get video's current time. Now, there's no more 60 times per sec fire up and video's current time keeps syncing.

Events were restored in v2.2.0, but the properties are still not working. Moving that to #125