I'm trying to use this code that I thought would work but I can't seem to get it to work
(function($){
var video = $('video'),
v = video[0]
control = $('.control');
// $(window).load(function(){
// $('.control').click();
// $('.control').trigger('touchstart');
// });
// when can play, play
video.bind('canplay', function(){
v.play();
});
$(window).blur(function(e) {
// Left the tab
v.pause();
});
$(window).focus(function(e) {
// Back to the tab
v.play();
});
$('.control').on('click touchstart', function(){
v.play();
});
})(jQuery);
I've also tried the window.load as you can see the commented section there, and I even tried sending both events just in case the mobile OS is ignoring clicks and listening for touch events.
I am trying to get a video to play automatically, I know there are tons of questions but I've tried so many of the code snippets in them with no luck, and through some other google searches I've found this bit but nothing works. Is there really no solution to this at all?