How do I run a video in a Div? iOS/iPhone (Prevent Fullscreen) & Aviod apple's video loop glitch -
    i’m developing ios app looping video embedded div. i’ve got “webkit-playsinline” working prevents apple’s fullscreen video player kicking in… there’s glitch. video begins first loop, reason forgets set play inline , goes fullscreen.          here’s workaround in case frustrating else out there:   <video class=“myvideo” width="640" height="360" autoplay webkit-playsinline> <source src=“video.mp4" type="video/mp4" /> </video>   rather adding “loop” attribute video tag, use jquery’s .on function play video again when ends this:     var myvideo = document.getelementsbyclassname('myvideo')[0];   $('.myvideo').on('ended',function(){ myvideo.play(); $('.myvideo').attr('webkit-playsinline', '');    });   i reminded video we’re playing inline incase gets funny ideas , tries run in full screen mode on replay… viola! problem solved ;)