-
-
Notifications
You must be signed in to change notification settings - Fork 301
Conversation
Is there a reason why iPad was not supported in the library? Videos are playing fine on my iPad.
iPad plays video inline autonomously, you don't need this library. Are you using it for |
Yes, I'm using it for playing videos without user interaction. I've made a video carousel which changes to next video when the last one ends. |
If you know of a solution to using the native iPad player and make it possible to play/pause with javascript, please let me know. |
If you don't need audio, use this: if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
makeVideoPlayableInline(video, /*hasAudio*/ false, false /*this will will skip the integrated device test*/);
} Edit: as an heads-up, the API will be changed to something like this in v2 (whenever that comes): if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
enableInlineVideo(video, {
mute: true,
enabled: 'always'
});
} |
Was not aware of the |
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
makeVideoPlayableInline(video, /*hasAudio*/ false, false /*this will will skip the integrated device test*/);
} Won't think unnecessarily take over playback in cases where autoplay and inline are natively supported (i.e. iOS 10)? I ended up writing a check around the makeVideoPlayableInline: const supportsInlineVideo = matchMedia('(-webkit-video-playable-inline)').matches;
if (/iPhone|iPad|iPod/i.test(navigator.userAgent) && !supportsInlineVideo) {
makeVideoPlayableInline(video, false, false);
} Seems like some of the confusion comes from people (myself included) wanting to play inline, but also enable |
Good point! Thanks for the snippet :) |
In the v2 beta I simplified the usage on iPad. Can you try it and let me know how it goes?
|
v2.0.0 has been published :) Now you can use the enableInlineVideo(video, {
iPad: true
}); |
Is there a reason why iPad was not supported in the library? Videos are playing fine on my iPad.