Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Chrome media pause

I am developing a chrome extension that plays videos in the background (in an inactive tab) and I remarked that Chrome automatically pauses any video or media before the tab is focused. This is a real problem for me as I need to play videos in unfocused tabs.

I have made some research but I haven't found any solution to disable this behavior.

Is there any way to solve this ? A local solution would be great (from chrome params), even if a javascript one would be better (from the extension).

like image 384
David Seroussi Avatar asked Dec 21 '16 10:12

David Seroussi


1 Answers

I am not familiar with a javascript solution, but there is a local option.

This behavior can be adjusted with the flag:

Gesture requirement for media playback

When this flag is enabled, videos will not be played in the background. This flag can be disabled on the chrome://flags page or by adding to the launch options:

--disable-gesture-requirement-for-media-playback

like image 146
jobB Avatar answered Oct 29 '22 21:10

jobB