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

Fill Screen (resize) no longer working. #1844

Closed crzyflyinazn closed 9 years ago

crzyflyinazn commented 9 years ago

Running developer build 525 and this issue just popped up today. I haven't touched any of my settings in the extension or in chrome.

yt

Rauvagol commented 9 years ago

Broken in firefox too, no changes made by me

pscho commented 9 years ago

Firefox:

imgur

LunNova commented 9 years ago

Confirmed on Safari 8.0.6 with build 525.

subnomo commented 9 years ago

Ditto. Chrome 44.0.2403.9 dev-m.

hoboX10 commented 9 years ago

Same issue, wonder what YouTube changed this time, sigh...

Cephsus commented 9 years ago

Wish thouse YT updates were optional.

TetraSky commented 9 years ago

Not just in "fullscreen", changing the player size with YTC result in what the OP posted. But, this is only when using the HTML5 player. If you force Flash with YTC, the video is properly sized. Firefox 38.0.1 / YTC dev build 525

megascorcher commented 9 years ago

Same in Chrome 43.0.2357.81 m imgur

guiaurelio commented 9 years ago

Same in Chrome 43.0.2357.81 m YTC Developer Version 525

rayman89 commented 9 years ago

Happens with html5 with flash at least in my case doesn't happen. Try the flash option if you have predefined instead.

BTW does anyone know if you can hide the header forever unless you go to the top of the page isntead of just when it's playing?

guiaurelio commented 9 years ago

Even if works fine with Flash, this is a issue that needs to be fixed, isn't it? :)

rayman89 commented 9 years ago

Yeah but any info helps to the dev to be able to allocate the problem and also gives people interested a quick fix.

guiaurelio commented 9 years ago

I agree :+1:

ButchDeLoria commented 9 years ago

Firefox 38.0.1 YTC Dev Build 525 Also getting this with HTML5 video enabled. Google must have released another update just to screw up extensions.

crzyflyinazn commented 9 years ago

Yup, forcing flash fixes the issue. But my HTML 5 D:

allexradu commented 9 years ago

I've got the same problem. fit to=content

You can view all my debugging information here http://pastebin.com/TjEzLrcr

Yes, aggressive flash works, but I had back bars. To get rid of black bars if you're using "Fit to Content" size, go to YouTube Center Settings > Player > Player Size > Fit to Content and change the height to 590px

fit to content

If you're using any other size than "Fit to content" than use this tool to calculate the equivalent height for your size and subtract 10 pixels.

CaptainLeChimp commented 9 years ago

Same bug with Fullscreen Top Player function Version 43.0.2357.81 m (64-bit) latest userscript

ytcbug_scrolltowindow-

evieluvsrainbows commented 9 years ago

Another stupid YouTube change, as usual. @YePpHa please fix it.

SuperSajuuk commented 9 years ago

It appears that the fix originally created by @Yonezpt is now not loading as it should. Probably a YT change that broke parts of it, but I have noticed that it does sometimes load, but not consistently.

This bug is probably related to another one relating to ratings bars not being greyed out on videos where ratings are disabled.

evieluvsrainbows commented 9 years ago

@SuperSajuuk Maybe you could try fixing it?

SuperSajuuk commented 9 years ago

@KamranMackey Sorry, I don't know the codebase for this extension. I know JS and things like that, but nowhere near enough to fix bugs in extensions. You'll need to wait for @YePpHa or @Yonezpt to see the ticket and create the fix. Sorry!

megascorcher commented 9 years ago

@allexradu entering a height for the Fit to Content preset doesn't fix anything for me.

Cellane commented 9 years ago

The new HTML5 player doesn't seem to be affected by this (judging by my tiny amount of testing and all of the screenshots above using the old HTML5 player), you can enable it here as a temporary fix/workaround, I guess.

Primeey commented 9 years ago

Yup Cellane is correct. Using the new player fixes the issue.

Seraphex45 commented 9 years ago

Running on Firefox Aurora x64 and getting this issue as well.

SuperSajuuk commented 9 years ago

@Cellane Good to know, but I despise the new player because it removes 40px in height and everything is oversized unnecessarily. I would prefer a fix on the older player, but thanks I guess..

ghost commented 9 years ago

@Cellane Thanks, it fixed the issue. I also like the new progress bar's transparency.

Yonezpt commented 9 years ago

My fix is still working correctly, but for some reason it is not being applied as/when it should. Using the flash player or the new html5 player are alternative fixes at least until a fix for this specific problem can be created.

rayman89 commented 9 years ago

@Yonezpt What about using a timer?

BTW the new html5 doesnt work with prevent video load nor autoplay. It stays black and doesnt load anything.

Yonezpt commented 9 years ago

@rayman89 A timer won't work, it needs to hijack the code responsible for the player creation when the player is about to be created, otherwise my fix will not be used if it is injected after the player is already created. The other two issues you mentioned are not related to this one and should be posted in the respective issue or create a new one for them if needed.

MammothJerk commented 9 years ago

waterfox 38.0

evieluvsrainbows commented 9 years ago

@MammothJerk Switch to the new player, it fixes the problem. Click here to enable it.

MammothJerk commented 9 years ago

does not fix it, the player is just black with no options now

evieluvsrainbows commented 9 years ago

@MammothJerk Try resetting your YouTube Center settings, because it's working just fine for me in the latest dev build of Google Chrome.

Yonezpt commented 9 years ago

@KamranMackey he probably has autoplay disabled which has been buggy lately.

evieluvsrainbows commented 9 years ago

@Yonezpt Probably. Anyway, do you think you could probably fix the issue in the old HTML5 player? While I like the new one and the transparency of the player bar, the player bar is just too big when in fullscreen.

Seraphex45 commented 9 years ago

I've confirmed that disable auto-play is what's causing the player to be a black box using Cellane's solution with the new HTML5 player on Firefox Dev 64-bit.

Yonezpt commented 9 years ago

It seems that my fix is no longer working, although it looked like it was working for me, I'll try to find a new method.

Yonezpt commented 9 years ago

@YePpHa It looks like they finally ditched that horrible hardcoded system they had before and replaced with the one being used in the new transparent player which is regulated by the matchMedia method. Setting it to false works just as great.

Regulating function is the following one:


f.wb = function() {
    var a = this.app.X();
    if (window.matchMedia) { // <- Here's the beautiful condition, so much better for us developers!
        if ((a.jb || a.$a) && window.matchMedia("(width: " + window.innerWidth + "px) and (height: " + window.innerHeight + "px)").matches)
            return new H(window.innerWidth, window.innerHeight);
        if (DK(a) && "blazer" != a.j && !a.$a) {
            a = a.experiments.V;
            if (window.matchMedia(m8.C).matches)
                return new H(426, a ? 280 : 240);
            var b = this.app.ka;
            if (window.matchMedia(b ? m8.o : m8.j).matches)
                return new H(1280, a ? 760 : 720);
            if (b || window.matchMedia(m8.A).matches)
                return new H(854, a ? 520 : 480);
            if (window.matchMedia(m8.B).matches)
                return new H(640, a ? 400 : 360)
        }
    }
    return new H(this.element.clientWidth, this.element.clientHeight)
};

To everyone here, just be patient until YePpHa has time to evaluate and apply the fix, until then make use of the suggested temporary fixes: either use the flash player or the new transparent player with autoplay disabled.

To the YouTube team member that might be watching this issue forum; thank you for making it easier for us to develop software for your service.

SleepyPrince commented 9 years ago

I wrote a Stylish script to fix that temporarily

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("youtube.com") {
  .video-stream.html5-main-video{
    width: 100% !important;
    height: auto !important;
  }
}
Yonezpt commented 9 years ago

@SleepyPrince That will only make the video fill the space, but all of the annotations and the seek bar will not work/display correctly.

allexradu commented 9 years ago

@megascorcher

HOW TO FIX IT: Step 1: Settings > Player > General (1st tab) > Player Type > Aggressive Flash Step 2: Settings > Player > Player Size > Fit to Content : Width: 1066 Height: 595

ghost commented 9 years ago

@Yonezpt Allowing autoplay didn't solve the black screen issue. Firefox 38.0.1

Yonezpt commented 9 years ago

@SnowGabe I suggested two temporary workarounds, if one didn't work for you then try the other. A third one is to disable resizing.

YePpHa commented 9 years ago

@Yonezpt I see. For the new HTML5 player I have simply resolved to remove the matchMedia API for YouTube. However, as this is a kind of brutal way of doing it (removing browser API) I resolved to only do it for the new HTML5 player:

function fixPlayerSize() {
    if (isNewPlayer()) {
        window.matchMedia = null;
    } else {
        patchDetour();
    }
}

The solution to this is to always remove the matchMedia API. However, before I can do this I just need to setup my new computer to be able to compile Safari extensions.

Yonezpt commented 9 years ago

Correct, since both player versions now use the same condition, the solution for the new player now works for the default player, so you don't even have to check which player the user has, simply nuking matchMedia will solve all of our resizing problems.

rayou commented 9 years ago

@Seraphex45 try press spacebar if you have black box with new player.

ghost commented 9 years ago

@Yonezpt I'm using the new HTML5 player, doesn't work. I won't go back to Flash because of privacy issues, I don't even have Flash Player installed. "layers.offmainthreadcomposition.enabled" is set to true.

Apparently MSE & WebM VP9 isn't supported by Firefox yet.

AndrewTheWookiee commented 9 years ago

The only way I got it to work with the new HTML5 player was disabling "Prevent auto-play" and "Prevent auto-buffering."

ghost commented 9 years ago

@AndrewTheWookie Thank you, I forgot to turn off "prevent auto-buffering". I hope that the inoperative settings will be fixed.