YePpHa / YouTubeCenter

YouTube Center is a userscript designed to expand the functionality of YouTube. It includes the ability to download the video you're watching, auto selecting your preferred video quality and much more.
MIT License
2.89k stars 520 forks source link

Prevent autoplay doesn't always prevent autoplay #684

Open nanoblack opened 10 years ago

nanoblack commented 10 years ago

Using the userscript (GM 2.0) build 352 in FF 30, videos (not playlists, just standalone videos) will sometimes still autoplay when "Prevent auto-play" is enabled. I haven't figured out a way to consistently reproduce it, it seems entirely random. My wild guess would be maybe it has something to do with video ads.

If the debug log would have anything relevant in it, I can pastebin it the next time it happens if that would help.

nanoblack commented 10 years ago

Just happened a few minutes ago after opening a video in a new background tab: http://pastebin.com/5ZC8sj3i

ViperCode7 commented 10 years ago

It happens constantly when loading background tabs.

I use the yt subscription page, and from there I load 2 or 3 in the background. They all start to autoplay 1 second.

The stange part is that player type is set to aggressive flash, and normally it should not behave like this. I believe, YePpHa, that something changed in the HTML5 code which makes the aggressive metod not disable the HTML5 player as it was done previously.

Just now I did check this, and yes, the HTML5 player loads first. The way is to load it in the background but not switch to it imediately, just catch it after it renders. If the tab gets focus right after initiation, it prevents the HTML5 player from showing. If the tab gets focus when the title changes, so when the rendering starts, the player doesn't have the Flash right click menu, but the plain Chrome right click menu, for 1 second, or 2, then it changes to Flash and stops.

Chrome 36, Win 7, YTC dev 354.

Tried to reinstall, I've saved the settings (thanks for the usefule feature not many exts have), removed the dev build, restarted, installed the latest dev build, reloaded settings and tested => same issues.

MarinoKadame commented 10 years ago

I hate when the video autoplay mostly when it's an external video on a forum, blog, etc. They start autoplaying even if I have everything on preventing it.

It only happen when using Flash or Aggressive Flash. On HTML5 it won't auto-play but I will have the issue of the video going mute after watching too much video and the need to restart the browser to get back the sound ( It kind of do the same thing as loading Flash after HTML5 but then cut the sound )