Posts

Showing posts with the label html5-video

chrome html5 video stops autoplay after a second or two

Image
Clash Royale CLAN TAG #URR8PPP chrome html5 video stops autoplay after a second or two I've got an autoplaying video which works well on all browsers, except Chrome - which has apparently disabled autoplay video. I've tried some work arounds, but now it just plays for 1-2 seconds and stops entirely. Here's my code: <video id="introduction-video" preload="auto" playsinline autoplay muted loop volume="0" poster="/images/videos/video-background.png" width="100%" height="100%"> <source src="/images/videos/Tasman10seconds.mp4" type="video/mp4"> <source src="/images/videos/Tasman10seconds.webm" type="video/webm"> Sorry, your browser does not support HTML5 video. </video> <script>$(window).on('load',function(){$('#introduction-video').get(0).play();});</script> And you can check i...