Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to allow video autoplay in a Google Chrome kiosk app in version 66 or later

Tags:

As of version 66 of Google Chrome onwards it will no longer automatically start playback of audio and video files when the playback volume is not muted.

This change was made to prevent autoplay on ad videos and other annoying web page elements. However, this has negative consequences for a number of perfectly valid applications of the autoplay feature, for instance in signage applications.

The new default behaviour of not auto playing a video with sound can be overridden at the startup of the Google Chrome browser with the command line options

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

or

--no-user-gesture-required

The new default autoplay behaviour is also present in the Chrome browser on ChromeOS (currently in the beta channel). For Kiosk-apps running on ChromeOS there are no command line options, only configuration using the Manifest.json file.

Currently there is no option in the documentation of the Manifest.json format that allows changing the autoplay policy.

Is there any way to change the new Chrome default autoplay policy in Kiosk apps to allow autoplay of videos in an app on ChromeOS?

like image 530
Bob Groeneveld Avatar asked Apr 19 '18 12:04

Bob Groeneveld


People also ask

How do I enable autoplay videos in Chrome?

Step 1 - Open the Google Chrome browser. Step 3 - Click the Autoplay policy drop-down and select "No user gesture is required." This will make it so that you don't need to intereact with the page in order for the video or audio to start playing automatically. Step 4 - Restart the browser.

How do I change autoplay settings in Chrome?

First, launch Chrome on your phone or tablet and go to Settings > Site Settings. Next, scroll down the menu and tap on Media, and then Autoplay and toggle the switch off.

Do Chrome extensions work in kiosk mode?

As of 2017 chrome will no longer allow you to enter kiosk mode on new devices without a google chrome management license subscription. "Note: If your Chromebook, Chromebase, or Chromebox is from 2017 or later, it won't work in kiosk mode unless it's managed by an administrator."


2 Answers

It turns out that the end user will have to enable automatic video playback manually, by:

  1. upon startup pressing Ctrl+Alt+S
  2. logging in
  3. opening a Chrome browser and typing: chrome://flags/#autoplay-policy
  4. changing the "Autoplay policy" from "Default" to "No user gesture is required"
  5. pressing "relaunch"
  6. rebooting the device

From now on autoplay works again in webview components used in your app.

See this comment thread about this topic by Google.

like image 67
Pascal Lindelauf Avatar answered Sep 23 '22 10:09

Pascal Lindelauf


This function is often useful on kiosks, where you want to autoplay sound from one specified site. In that case, you can just to to:

  1. Settings
  2. Advanced
  3. Privacy and Security
  4. Site Settings
  5. Sound

And enable autoplay for particular website. It should override its default behaviour and play the sound immediately after displaying site.

like image 38
Ajantis Avatar answered Sep 22 '22 10:09

Ajantis