Search code examples
video.jsmobile-browser

Video Js is not auto playing in the mobile browser


I am trying video js based player in my web page. IT is working perfect in the desktop browsers and the mobile browser not auto playing the video.I tried all the options like:

   var options = {};
var player = videojs('video-js', options, function onPlayerReady() {
    videojs.log('Your player is ready!');
    // In this context, `this` is the player that was created by Video.js.
    this.play();
    // How about an event listener?
    this.on('ended', function() {
        videojs.log('Awww...over so soon?!');
    });
});

Still it is not auto playing the video.

May i know do you have any solution?


Solution

  • Autoplay on iOS 10 and recent versions of Chrome for Android only works if the video is muted. On older versions of each platform, it doesn't work at all.