Chrome update block flash autoplay - how to avoid this?

I have embedded a youtube video in an html page. I am using the youtube iframe API with Flash (in my case, I cannot use HTML5 video). Since the last update, Google Chrome Chrome has blocked auto-play and has not been able to programmatically play / pause video (element.playVideo () is not responding). (Everything is fine in other browsers)

The only way I found is this:

  • Go to Chrome Settings
  • Then click Show advanced settings ...
  • Then click Content Settings
  • then under Plugins select the 1st option Run all plugin content (or select a specific exception)

enter image description here

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

+8
javascript google-chrome flash youtube youtube-iframe-api
source share
2 answers

Two possible solutions to avoid auto-blocking in Chrome:

  • Download the Flash SWF file with the same domain name. You can consider proxying if this is your own infrastructure, but I think this is not possible for the Youtube api.

  • Download a player with a larger size (try different resolutions). It may seem naive, but Chrome believes that video games are larger in quality and do not block automatic playback.

+3
source share

As far as I know and think, this problem is related to the embedded Flash content from other domains

What I think

  • This is a security function from chrome, for example, launching IOS video, when a user needs to click somewhere on the page to start the video (there must be a real user event after the first video playback), so we assure the OS that we agree to play the video
  • I have almost the same problem, my flash player is embedded in another page using an iframe, and to start the video I have to click on the place for the flash player again and let chrome know that as a simple user, I agree to play this content that comes from another domain.

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

+1
source share

All Articles