Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Not working on Ipad? #48

Closed
0xsven opened this issue Jun 4, 2016 · 5 comments
Closed

Not working on Ipad? #48

0xsven opened this issue Jun 4, 2016 · 5 comments

Comments

@0xsven
Copy link

0xsven commented Jun 4, 2016

Is there a reason why it doesn't work on my ipad?

I am on iOS 9.2.1

@fregante
Copy link
Owner

fregante commented Jun 5, 2016

What are you trying to do on the iPad? It's disabled by default because the iPad plays videos inline natively

@0xsven
Copy link
Author

0xsven commented Jun 5, 2016

Thank's for the info.

Do you know if I have to do something to make them autoplay? I have put the attribute on the video element but it doesn't autoplay on iPad.

@fregante
Copy link
Owner

fregante commented Jun 6, 2016

There is a third parameter that when set to false IIV will be run in all browsers, not just iPhone and iPod.

This is what you're looking for to enable silent auto playing videos on the iPad:

if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
    makeVideoPlayableInline(video, false /* hasAudio */, false /* false = run everywhere */);
}

@fregante
Copy link
Owner

In the v2 beta I simplified the usage on iPad. Can you try it and let me know how it goes?

@fregante
Copy link
Owner

fregante commented Feb 5, 2017

v2.0.0 has been published :)

Now you can use the iPad option:

enableInlineVideo(video, {
    iPad: true
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants