0
votes

I' informed iOS blocks all video autoplays, including html5 video autoplay attribute as well as any type of javascript initiated autoplays.

However, I'm wondering if it's possible to overcome this limitation if I wrap my web app around with Phonegap. I'm hoping that since Phonegap has access to some native features it might be able to trigger click or play events. Has anyone been able to pull this off?

I've read this question Autoplay video in PhoneGap where a guy says you can do it with a javascript call, but I am having hard time believing that because people say that's not possible.

2

2 Answers

2
votes

i've found that mediaelement.js works well in phonegap, the trick i've found that makes autoplay work is setting a small timeout in the mejs success callback so that play is only called after the player is completely setup.

of course, you'll also need to have webkit-playsinline in your video tag, and MediaPlaybackRequiresUserAction = false and AllowInlineMediPlayback = true in your phonegap config.xml.

0
votes

Apple have blocked it and i cannot find a work around. You pretty much have to use something like this to achieve the effect you are after: https://github.com/eiffelqiu/phonegap-videoplayer-plugin