Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline video and autoplay on iOS10 #154

Open
fatlinesofcode opened this issue Jun 1, 2017 · 1 comment
Open

Inline video and autoplay on iOS10 #154

fatlinesofcode opened this issue Jun 1, 2017 · 1 comment
Labels

Comments

@fatlinesofcode
Copy link

Is it possible to embed the videos as inline for phones with iOS10?

Also would be it possible to autoplay the video after the user clicked on somewhere on screen? I've used this technique with vanilla html5 video. When the user first loads the site there is BEGIN button which plays a blank video, after that point i change the video src attribute at anytime so the video autoplays e.g.

<script>
function begin(){
     var vid = document.querySelector('video');
     vid.play();
     //autoplay video 2 secs after begin click
     setTimeout(function(){
         vid.src = 'someothervid.mp4';
         vid.play();
     },2000);
}
</script>
<video src="blank.mp4" webkit-playsinline playsinline></video>
<button onclick="begin()">Begin</button>
@mcarthurnick
Copy link

@fatlinesofcode Did you ever figure out if you could get yours to play inline with embed? I can't get mine to work and wonder if there is a work around.

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

No branches or pull requests

3 participants