最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Chrome update block flash autoplay - how avoid it? - Stack Overflow

programmeradmin1浏览0评论

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 )

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

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 )

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

Share Improve this question asked Sep 23, 2015 at 14:31 Damien RomitoDamien Romito 10.1k13 gold badges71 silver badges84 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

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.

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 es from another domain.

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

发布评论

评论列表(0)

  1. 暂无评论