How do I run a video on Android Chrome?

1

How to run a video tagged video in google Chrome browser?

My code:

<video autobuffer id="bgVideo" loop="true" volume="0">
                    <source src="/video_bg_1.webm" type="video/webm">
                    <source src="/video_bg_1.ogg" type="video/ogg">
                    <source src="/video_bg_1.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>
    
asked by anonymous 05.02.2016 / 20:27

1 answer

0

Remove the type attribute from the source tag and deploy play via JavaScript.

var player = document.getElementById("bgVideo");

function playVideo() {
  player.play();
}

set this function to body onload = "playVideo()" and in the video tag put the loop attribute to repeat the video. maybe that will solve.

    
05.02.2016 / 21:29