Reputation:
I am looking at implementing inline videos pre iOS10
.
I have been looking at using this library
This works for inline videos on iOS10
, but not for pre iOS10
.
I am using v 8.3 of iOS and v600.1.4 of safari
My js looks like this
var video = $('video').get(0);
makeVideoPlayableInline(video);
video.addEventListener('touchstart', function () {
video.play();
});
And the html looks like this
<video src='http://www.w3schools.com/html/mov_bbb.mp4' class="video-player video-one" id="video-background" autoplay muted playsinline>
</video>
CSS
.IIV::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button {
opacity: 0;
pointer-events: none;
width: 5px;
}
Upvotes: 0
Views: 747
Reputation: 56
Have you include iphone-inline-video.browser.js like in the demo here : https://github.com/bfred-it/iphone-inline-video/blob/master/demo/index.html ?
<head>
<meta charset="UTF-8" />
<title>iphone-inline-video demo with playsinline</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="../dist/iphone-inline-video.browser.js"></script>
<link rel="stylesheet" href="style.css">
</head>
Have you also check the JS console in your browser ?
Upvotes: 1