ultrawidify icon indicating copy to clipboard operation
ultrawidify copied to clipboard

Disney+ not responding to ultrawidify

Open MazelTovCocktail opened this issue 4 years ago • 23 comments

the addon won't crop in on disney+ content and doesnt seem to respond in any way.

MazelTovCocktail avatar Dec 14 '19 17:12 MazelTovCocktail

It's like I wrote the template for nothing.

  • Which browser
  • What's the addon version

Troubleshooting (since disney+ is geoblocked for me)

Open console while on Disney+. Press F12, you should get something like this:

this

Paste the following and press enter, what do you get (please respond with the screenshot)?

var v = document.getElementsByTagName('video')[0];
var e = v; 
console.log("————————————————————————————————————————[ element sizes ]————————————————————————————————————————");
console.log(`window size: ${window.innerWidth} x ${window.innerHeight}`)
while (e) {
  console.log( `size (offset): ${e.offsetWidth} x ${e.offsetHeight} | size (client): ${e.clientWidth} x ${e.clientHeight}`, "element:", e,);
  e = e.parentNode;
}
console.log("————————————————————————————————————————[ end element sizes ]————————————————————————————————————————");

function equalish(a,b, tolerance) {
  return a > b - tolerance && a < b + tolerance;
}

function findPlayer() {
  let video = document.getElementsByTagName("video")[0];
  let element = video.parentNode;
  const videoWidth = video.offsetWidth, videoHeight = video.offsetHeight;
  const elementQ = [];
  let scorePenalty = 0;
  let score;

  if(! element ){
    if(element) {
      const ths = this;
    }
    element = undefined;
    dimensions = undefined;
    return;
  }

    // try to find element the old fashioned way

  while (element){    
    // odstranimo čudne elemente, ti bi pokvarili zadeve
    // remove weird elements, those would break our stuff
    if ( element.offsetWidth == 0 || element.offsetHeight == 0){
      element = element.parentNode;
      continue;
    }

    // element je player, če je ena stranica enako velika kot video, druga pa večja ali enaka. 
    // za enakost dovolimo mala odstopanja
    // element is player, if one of the sides is as long as the video and the other bigger (or same)
    // we allow for tiny variations when checking for equality
    if ( (element.offsetWidth >= videoWidth && equalish(element.offsetHeight, videoHeight, 2))
      || (element.offsetHeight >= videoHeight && equalish(element.offsetWidth, videoHeight, 2))) {

      // todo — in case the match is only equalish and not exact, take difference into account when 
      // calculating score

      score = 100;

      score -= scorePenalty++; // prefer elements closer to <video>

      elementQ.push({
        element: element,
        score: score,
      });
    }

    element = element.parentNode;
  }

  if (elementQ.length) {
    // return element with biggest score
    const playerElement = elementQ.sort( (a,b) => b.score - a.score)[0].element;
    console.log("elementQ:", elementQ);
    console.log(`best match | offset: ${playerElement.offsetWidth} x ${playerElement.offsetHeight} | client: ${playerElement.clientWidth} x ${playerElement.clientHeight} | element:`, playerElement); 
  } else {
    console.log("NO PLAYER ELEMENT FOUND!");
  }
}

console.log("———————————————————————————————[ will find player element ]———————————————————————————————");
findPlayer();
console.log("———————————————————————————————[      f i n i s h e d     ]———————————————————————————————");

You should be seeing something like this (if you combined both of the following screenshots together). This example is from youtube.

1 2

tamius-han avatar Dec 15 '19 23:12 tamius-han

Found this issue and I believe this is the info you needed. I am using Firefox v72b7. Extension 4.4.2

Annotation 2019-12-17 002136

EvilPaul2012 avatar Dec 17 '19 05:12 EvilPaul2012

I think I had not refreshed the page after I clicked enable for the plugin on that page, it seems to be working for me, @MazelTovCocktail might want to try that.

EvilPaul2012 avatar Dec 17 '19 05:12 EvilPaul2012

@EvilPaul2012 was ultrawidify disabled on disney+ by default?

tamius-han avatar Dec 17 '19 20:12 tamius-han

I think it might have been or nothing selected. I was trying a lot of settings and forget what it was originally, sorry.

EvilPaul2012 avatar Dec 17 '19 21:12 EvilPaul2012

Ok then. Does the extension continue to work if you close the tab and reopen it again, or if you close or repoen the browser? Or do you have to enable the extension from the plugin every time?

I ask because there's two options:

  • my fix for disney+ works,¹ the problem is somewhere else (I have my suspicions)
  • ... well fuck (though the screenshot hints to one possible option. Thanks for the printout/screenshot, btw)

¹ "Disney+ not working" was reported by someone via a different channel already. This version (4.4.2) was supposed to have a fix for this problem, buut ... well, judging by this issue, it wasn't very effective.

tamius-han avatar Dec 17 '19 23:12 tamius-han

Sorry for the delay. I tried again and on the same movie and I could not get it to work again. Pressing shortcut keys didnt do anything either.

EvilPaul2012 avatar Jan 03 '20 04:01 EvilPaul2012

Try opening the popup, go to site settings (or extension settings) and try doing either of these things and DO NOT RELOAD THE PAGE AT ANY POINT — that's important:

  • Under 'Enable extension [for ]', click 'Disable' and then 'Enable' (or default) again.
  • Under 'Autodetection settings [for ]', click 'Disable' and then 'Enable' (or default) again.

For the time being, it doesn't matter which of these four options you follow (as long as you click 'disable' and then 'enable').

After you do that, wait a few seconds. If autodetection is enabled (it should be by default), did extension crop the video (assuming the video can be cropped)? If not, can you crop the video using popup buttons or keyboard shortcuts?

: :

If the answer to both of these is no — refresh the page with Ctrl + F5, open the popup, go to 'Advanced settings' and uncheck the 'detect automatically' checkbox. Then check it again. (Someone told me that this worked for them) Wait a few seconds. Did autodetection kick in? If not, can you crop the video using popup buttons or keyboard shortcuts?

tamius-han avatar Jan 03 '20 14:01 tamius-han

I've just pushed an update that might be able to solve this issue. It's out for Firefox, it'll take up to a week for Chrome.

Once you get the update for v4.4.3, please tell me whether it fixes the issue or not.

tamius-han avatar Jan 04 '20 02:01 tamius-han

Tried your suggestions with the new version and couldn't get it to work. I even uninstalled and reinstalled the plugin. I can't seem to change the size with keyboard shortcuts either. They do work on youtube. Disney+ does have shortcuts for A and D already for fast forward and rewind. I wish I knew what I did to get it to work before. I'll try again tomorrow.

EvilPaul2012 avatar Jan 05 '20 05:01 EvilPaul2012

Okay sorry for delays, but this extension has been having a bit of problems lately (and I was a bit busy with IRL stuff).

If you're using Firefox, go to disney plus, open the popup and click Advanced settings tab, uncheck Detect automatically checkbox under Player Detection Settings and enter .btn-media-clients (with the dot) in the Query selectors box. Then click outside the box (but still on popup), close popup and refresh. Is disney+ working now?

Pic for reference, because my instructions are a bit crap:

image

tamius-han avatar Mar 09 '20 22:03 tamius-han

No worries, I understand it is a side project for you.

Sorry but no luck for me :( I tried what you said a few times, I tried messing with some settings to see if that would work. I also removed and reinstalled the plugin, did the instructions, and then tested again.

I do run FF beta but when I first test it seemed like the v74 release and there was an update when I checked which was the v75b.

EvilPaul2012 avatar Mar 10 '20 12:03 EvilPaul2012

Hi, for me it's working on Chrome (Version 80.0.3987.149, Plugin Version 4.4.7). The only thing is, that videos are directly set to fit width as soon as i go full screen and when i press the shortcut for "fit width" it zooms in. Maybe that helps?

mprangenberg avatar Mar 29 '20 19:03 mprangenberg

@EvilPaul2012 FYI, Ultrawidify works with Disney+ out of the box (didn't need the workaround detailed above) for me on Firefox Dev 76.0b1.

eviltak avatar Apr 07 '20 19:04 eviltak

Hi, using Win10 / Firefox 84.0.2 / Ultrawidify 4.5.1 it doesn't work for me on Disney+. I even stepped through the different player node parent indices, but none could get the crop mode to work correctly (the video was either tiny or too large on my ultrawide screen, for which I wanted to use a 21:9 setting). I have used the plugin before on Chrome on another computer and there it seemed to work with Disney+. It is also working on Netflix/Youtube under Firefox. Thank you for the plugin btw!

ocinon avatar Jan 06 '21 19:01 ocinon

@ocinon Can I ask you a favour?

  1. Install this extension
  2. Start playing a movie or something, wait a minute or two just to ensure the page is loaded for reals
  3. Right click on the Save Tabs WE icon in the whatever's the extension toolbar called, save selected tabs → standard items slika
  4. (optionally but suggested) Open the resulting HTML page with notepad or something, CTRL+F for the following:
  • your email or username
  • your name and if you find it, replace those with your favourite fictional character or something.
  1. Drag the HTML file into your comment. I think github should support attaching HTML files with your comment.

You need to use this extension to save the webpage because this extension includes all dynamically rendered page elements and CSS (and saving the page with ctrl+s doesn't).

Thanks in advance.

tamius-han avatar Jan 06 '21 19:01 tamius-han

Sure. See the file attached. There were 2 objects the extension couldn't save, but the html page still seems to load fine. Github does not support html filetypes, but they do support zip files...

ocinon avatar Jan 06 '21 21:01 ocinon

Thanks.

Try this:

  1. Open Extension popup
  2. Click 'Advanced settings' on the right
  3. Set player detection back to automatic and paste the following in the "Additional CSS" box:
.hudson-container {
  height: 100%;
}

Does that fix the issue?

tamius-han avatar Jan 06 '21 21:01 tamius-han

That fixed the issue! Thanks so much

ocinon avatar Jan 07 '21 19:01 ocinon

Looks like they changed the CSS to:

.btm-media-client-element

Parent 1

jwannebo avatar May 22 '21 02:05 jwannebo

Looks like they changed the CSS to:

.btm-media-client-element

Parent 1

Hi, sorry for long time no reply & thanks for providing some info.

Just a quick question, though. With parent set to 1 and query set to .btm-media-client-element, disney+ works regardless of whether Player is n-th parent of video checkbox is checked or not?

tamius-han avatar Jun 07 '21 20:06 tamius-han

Just a quick question, though. With parent set to 1 and query set to .btm-media-client-element, disney+ works regardless of whether Player is n-th parent of video checkbox is checked or not?

Checkbox needs to be checked

Or actually, just setting the video** to be "btm-media-client-element" manually works. Sadly it looks like the captions are baked into the player

jwannebo avatar Jun 12 '21 19:06 jwannebo

Ok thanks, I'll try to have an update out soon.

tamius-han avatar Jun 12 '21 20:06 tamius-han

Had this problem recently, this setting worked for me (Samsung 49" 1440p) Also, it does not affect the overlay controls which is nice. .btm-media-client { scale: 130% 130%; }

Uttamkr avatar Dec 09 '22 00:12 Uttamkr

Closing becasue this problem appears to have been fixed and unfixed a few times, latest iteration was #211

tamius-han avatar Apr 19 '23 13:04 tamius-han