Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome update block flash autoplay - how avoid it?

I embedded a youtube video in a html page. I use the youtube iframe API with Flash (in my case, I cannot use an HTML5 video). Since the last Google Chrome update, Chrome block the autoplay and avoid to play/pause programmatically a video ( element.playVideo() not respond). (Everything is ok on others browsers)

The only way I found is to:

  • Go into Chrome preferences
  • Then hit Show advanced settings...
  • Then hit Content Settings
  • then under Plugins, select the 1st choice Run all plugin content (or choose a specific exception )

enter image description here

This solution is TO COMPLICATED for users, does someone have a solution without any user interactions?

like image 586
Damien Romito Avatar asked Sep 23 '15 14:09

Damien Romito


People also ask

How do I stop auto play on Chrome?

On AndroidLaunch the “Chrome” app and go to “Settings”. Under settings, go to “Site settings”. Click sound and toggle “Allow sites to play sound” to off.

Do browsers block Autoplay?

Some web browsers, including Chrome, restrict the autoplay of videos to improve the user experience. In some cases, this may result in the video features of Wonder not functioning. To prevent this, make sure the 'autoplay block' is disabled in your browser.

How do I disable HTML5 in Chrome?

For Google Chrome, one option is to go to the online Chrome Web Store and search for the free Disable HTML5 Autoplay extension. Once you install the extension, it should prevent audio and video clips on web pages from playing automatically. You can turn the extension off or on from its icon in the Chrome toolbar.

How do I enable Autoplay on Chrome?

Select Menu > Settings. Activate Site Settings (under Privacy and Security) and select Media on the page that opens. Tap on Auto-play.


2 Answers

Two possible Solutions to avoid autoplay blocking in Chrome:

  • Load flash swf file from same domain name. You could consider proxying if it's your own infrastructure, but I think it's not possible for Youtube api.

  • Load the player with a bigger size (Try different resolutions). This might sound naive, but Chrome considers bigger video players as content and doesn't block auto playback.

like image 76
Prabu Raja Avatar answered Oct 13 '22 19:10

Prabu Raja


As far as I know and think, this issue is related with embedded Flash Content from other domains

What I think

  • this is a security feature from chrome, something like IOS video start, when to start a video the user have to tap somewhere on page (there must be a real user event behind the first video play), in this way we assure the OS that we are agree to play the video
  • I have almost the same problem, my flash video player is embedded in another page using an iframe, and to start the video I have to click again on flash player placeholder, and let chrome know that as a simple user I'm agree with playing that content which comes from another domain.

I think that the only solution for this will be HTML5 Video, until then maybe someone will come with an "workaround"

like image 42
Mosu Avatar answered Oct 13 '22 20:10

Mosu