2
votes

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

A while back, Chrome changed their autoplay policy so that you can't autoplay a video unless it is muted, or the user has interacted with the web page.

I use HTML5 video as part of a digital signage application, but it's common that the page is never clicked - for example when launched automatically in Kiosk mode.

If I mute the video it can autoplay, then if I bind to the play event and try and unmute it causes the video to stop playing (I guess they thought of that). I've had no other luck with similar trickery.

I understand the reasoning behind this behavior and on a website it makes sense - but mine is not a website, it's an application.

Is there a way around this? For example, if I moved to being a Chrome Application/Extension would the policy no longer be enforced? I'm somewhat stumped and would appreciate any insight.

(Asking people to go to chrome://flags/#autoplay-policy is not really an option)

1
Download and use an old version of chrome.szatmary
That's not a solution, that's avoidance.Andrew Spode

1 Answers

0
votes

If you are able to control the launch of Chrome, then you should be able to launch chrome from the command line, or via a script, with a flag to ask it to ignore the requirement for a gesture - e.g.:

$ chrome --autoplay-policy=no-user-gesture-required

This flag changed recently which may cause some confusion or be relevant if using older versions - see this discussion for some background: https://groups.google.com/a/chromium.org/forum/#!topic/headless-dev/zxPyN5f8MAQ