Created
March 7, 2015 11:13
-
-
Save gladkih/30ac13601f00acf7daae to your computer and use it in GitHub Desktop.
Autoplay full screen video on ios
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//force video to play on pages where bg video visible | |
$(function(){ | |
var vid=$('#video video').get(0); | |
//try to force it to start automatically after a few secs | |
setTimeout(function(){ | |
$('body').one('touchstart load',function(){ | |
vid.play(); | |
}).trigger('load'); | |
},3000); | |
});//end jq losure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment