1

The autoplay parameter in the html5 video control has been working great up till now and suddenly it does not. I made some formatting changes to my jsp page that displays the video control but ruled out these being the issue. Another post on here mentions an update to Chrome that only allows autoplay with muted parameter. I tried this and woh, it works. But this is not the user interaction we want for our player. How can I revert this and still allow autoplay in chrome?

<body id="body" language="javascript" onload="init()">

    <!-- Media Player -->

    <div>
            <div id="wrap_video">
            <video id="wrVideo" poster="data:image/gif,AAAA" controls width="100%" height="100%" controlsList="nodownload" preload="true" autoplay muted>
                <source src="" type="video/webm">
                <audio controls id="wrAudio" controls controlsList="nodownload" preload="auto" autoplay>
                    <source src="" type="audio/wav" >
                    Your browser does not support the audio element.
                </audio>
            </video>  
            </div>

    </div>

Ideas appreciated.

vbNewbie
  • 3,291
  • 15
  • 71
  • 155
  • 1
    About a year ago (or something) Webkit developers updated policies for autoplaying video. For now video can not be autoplayed without mute or without user gesture. On Google Chrome for Android even youtube videos are playing muted :) – Limbo May 11 '18 at 07:37
  • So is there no work around for this. – vbNewbie May 11 '18 at 07:54
  • I'm afraid that there is no workaround. You cannot even make ```myAvesomeVideo.play()``` without user gesture (and not every user gesture is valid for this operation, e.g. ```mousemove``` event will not run the video), and Google Chrome will show the warning in the console. – Limbo May 11 '18 at 08:00

1 Answers1

5

Well, there is an interesing article that should help you. By the way, update was done at April 2018 :)

https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

Limbo
  • 2,123
  • 21
  • 41