YouTubeCenter icon indicating copy to clipboard operation
YouTubeCenter copied to clipboard

Aggressive Flash no longer works due to YouTube change today

Open dinsdalepiranha opened this issue 7 years ago • 20 comments

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?

dinsdalepiranha avatar Jul 28 '17 00:07 dinsdalepiranha

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

thinkpad4 avatar Jul 28 '17 02:07 thinkpad4

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

Xan-Kun avatar Jul 28 '17 07:07 Xan-Kun

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

dinsdalepiranha avatar Jul 28 '17 14:07 dinsdalepiranha

@dinsdalepiranha can you elaborate? I just tried with the standard (YT generated) html code and still end up with a nasty CPU killing <video> tag. :-)

Xan-Kun avatar Jul 28 '17 19:07 Xan-Kun

@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

dinsdalepiranha avatar Jul 29 '17 01:07 dinsdalepiranha

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.

digideth avatar Jul 29 '17 05:07 digideth

@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?

Xan-Kun avatar Jul 29 '17 12:07 Xan-Kun

@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 avatar Jul 29 '17 13:07 dinsdalepiranha

@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.

Chazzen avatar Jul 29 '17 17:07 Chazzen

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

Xan-Kun avatar Jul 31 '17 16:07 Xan-Kun

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.

Xan-Kun avatar Jul 31 '17 17:07 Xan-Kun

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)

Maurogch avatar Aug 11 '17 19:08 Maurogch

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

MasterBLB avatar Aug 26 '17 23:08 MasterBLB

@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.

Xan-Kun avatar Aug 31 '17 13:08 Xan-Kun

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

thinkpad4 avatar Sep 13 '17 06:09 thinkpad4

Same here.

Xan-Kun avatar Sep 13 '17 10:09 Xan-Kun