Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In an intranet environment that I help administer, I'm trying to set up an HTML page to auto-play video whenever we access it. However, I get this from the Chromium browser on load:

error.name = Not Allowed Error
error.message = play() failed because the user didn't interact with the document first.

Any suggestions on how I might overcome this issue?

What I have tried:

Uninstalling and reinstalling Chromium.
Posted
Updated 4-May-21 10:55am
Comments
[no name] 9-Apr-21 20:28pm    
Some sort of "focus" / activate issue perhaps ("on load")
Richard MacCutchan 10-Apr-21 3:42am    
Obviously something is wrong with the code that is trying to play the video. But since we cannot see that code it is impossible to suggest anything.

Assuming you control the clients, you can use the Chrome Enterprise policies to change the autoplay policy:
Autoplay Policy Changes  |  Web  |  Google Developers[^]
Chrome Enterprise policy list and management | Documentation[^]
 
Share this answer
 
My team and I really appreciate your suggestions! In the end, we employed the following solution to do away with the pesky requirement that a user interact with an HTML page before it can do its thing.

To allow autoplay on pages when you have full control of the client Chromium browser (as our intranet setting permits), create a text file in the Raspbian directory

etc/chromium-browser/policies/managed

and name it

policies.json

Its contents should be the following line:

{"AutoplayAllowed"=true}

If additional policies are set at the same time, just make new .json files in the same directory, in the same format (e.g., a file named "policies2.json").
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900