Youtubecenter: Aggressive Flash no longer works due to YouTube change today

Created on 28 Jul 2017  路  20Comments  路  Source: YePpHa/YouTubeCenter

At least in some browsers (SeaMonkey on Linux here) YT has started blocking Flash as of earlier today:

https://productforums.google.com/d/msg/youtube/CUaTWvKhAuE/Z9ONjZ-xAgAJ

Maybe just a matter of some JavaScript tweaks to get it back, though?

Most helpful comment

@digideth @Xan-Kun @Leifman27 @thinkpad4 The script in this post of the above thread _does_ work, at least for me. In YouTube Center settings make sure External Players > Player Type is set to Aggressive Flash then add this userscript to Greasemonkey or whatever:

// ==UserScript==
// @name          YouTube Force Flash via Embed
// @namespace     YT_forceflashembed
// @description   Force Flash player by embedding YouTube in YouTube. From: https://productforums.google.com/d/msg/youtube/CUaTWvKhAuE/q6P1m1kpAwAJ
// @version 1
// @include       *.youtube.com/*
// @grant         GM_addStyle
// ==/UserScript==
// Notes:
//   * is a wildcard character
//   .tld is magic that matches all top-level domains (e.g. .com, .co.uk, .us, etc.)
/* ____80_character_separator________________________________________________ */
window.setTimeout(function() {
  var embedFrame = document.createElement("iframe");
  embedFrame.src = location.href.replace("watch?v=", "embed/");
  embedFrame.style = "width: 100%; height: 100%;";
  var player = document.getElementById("player-api");
  player.innerHTML = "";
  player.appendChild(embedFrame);
},
3000);

Note that all of your other "External Players" YT Center preferences will now be in effect on YouTube itself (autoplay, default resolution, etc.) so you can't have a separate set of prefs for embedded YT videos anymore.

All 20 comments

I hope @YePpHa adds a option to disable this html5 change

yes :( i can confirm.. cannot watch youtube in flash on firefox. aggressive flash = black video box. and normal flash ends up in just being html5 :'( sad sad day.
as i prefer to watch youtube with flash on firefox, and on chrome with html5 for 60fps videos.. so now i don't have that option anymore :'(

I can confirm, tested in FF, Opera and Chrome. With addon and user-script.
It seems flash is gone for good.

I did notice that it still works in _embedded_ videos, however...

@dinsdalepiranha can you elaborate? I just tried with the standard (YT generated) html code and still end up with a nasty CPU killing \

@Xan-Kun With this code:
<div style="margin-top:3px;"> <iframe width="620" height="350" src="//www.youtube.com/embed/5r0Sh1--Hc4?rel=0&wmode=transparent" frameborder="0" allowfullscreen></iframe> </div>

Embedded: http://i.imgur.com/Tb2DQtg.png
Same video directly on YouTube: http://i.imgur.com/7zXMZex.png

I doubt if there is anything that can be done.
There is a userscript on that google forum link above that supposedly embeds the video on the youtube page you are on so the flashplayer loads but I couldn't get it to work.

@dinsdalepiranha What Broser is that and which plugin/addon? I tried your code and still got to html5.
Did you load it from an actual server or was it a file:// url?

@digideth @Xan-Kun @Leifman27 @thinkpad4 The script in this post of the above thread _does_ work, at least for me. In YouTube Center settings make sure External Players > Player Type is set to Aggressive Flash then add this userscript to Greasemonkey or whatever:

// ==UserScript==
// @name          YouTube Force Flash via Embed
// @namespace     YT_forceflashembed
// @description   Force Flash player by embedding YouTube in YouTube. From: https://productforums.google.com/d/msg/youtube/CUaTWvKhAuE/q6P1m1kpAwAJ
// @version 1
// @include       *.youtube.com/*
// @grant         GM_addStyle
// ==/UserScript==
// Notes:
//   * is a wildcard character
//   .tld is magic that matches all top-level domains (e.g. .com, .co.uk, .us, etc.)
/* ____80_character_separator________________________________________________ */
window.setTimeout(function() {
  var embedFrame = document.createElement("iframe");
  embedFrame.src = location.href.replace("watch?v=", "embed/");
  embedFrame.style = "width: 100%; height: 100%;";
  var player = document.getElementById("player-api");
  player.innerHTML = "";
  player.appendChild(embedFrame);
},
3000);

Note that all of your other "External Players" YT Center preferences will now be in effect on YouTube itself (autoplay, default resolution, etc.) so you can't have a separate set of prefs for embedded YT videos anymore.

@dinsdalepiranha Just wanted to say thanks for that script. It works perfectly and has saved me from the many HTML5-induced FF crashes I have been suffering through.

@dinsdalepiranha oh wow... it actually worked 0__0
THANK YOU.

@dinsdalepiranha Thanks a lot, I got it to work! The trick for me was, to remove the ".user" part from the file name.

Does anyone have a pointer for me where to start reading when I want to understand what's actually going on? I am really curious why it is so hard to deactivate the YT-auto-detection with an early (before page load) userscript.

I was waiting for an update, but it seems that we'll have to wait a bit more, thanks for sharing a workaround.

There's an update for the script thats posted above, it seems playlists weren't working: change:
embedFrame.src = location.href.replace("watch?v=", "embed/");
to
embedFrame.src = location.href.replace(/watch\?v=([^&]*).*/, "embed/$1");

and add
unsafeWindow.spf.dispose();
after
player.appendChild(embedFrame);

Also follow this link for another more complete script based on the above one. (don't know how it behaves with Youtube Center)

thank you @Maurogch that totally fixed it, an issue i noticed but had no idea how to fix :)

Hey mates.
How to use that script for Opera 12.18 browser?

@MasterBLB I just put it in the "User Javascript Folder" and make sure, it ends only with ".js". As a ".user.js" extension will not have sufficient rights.

The workaround seems to have stopped working, anyone else have a workaround?

Same here.

:'( yep can confirm doesn't work anymore

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pquerner picture pquerner  路  4Comments

zenwarr picture zenwarr  路  10Comments

HyphenSam picture HyphenSam  路  8Comments

sdsucks picture sdsucks  路  10Comments

BobBobBobBobBobBobBobBobBob picture BobBobBobBobBobBobBobBobBob  路  26Comments