Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disney+ not responding to ultrawidify #84

Closed
MazelTovCocktail opened this issue Dec 14, 2019 · 26 comments
Closed

Disney+ not responding to ultrawidify #84

MazelTovCocktail opened this issue Dec 14, 2019 · 26 comments
Labels
bug Confirmed bug Chrome Issues affecting Chrome Firefox Issues affecting Firefox needs-info No but seriously, please provide some details.

Comments

@MazelTovCocktail
Copy link

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

@tamius-han tamius-han added the needs-info No but seriously, please provide some details. label Dec 14, 2019
@tamius-han
Copy link
Owner

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

@EvilPaul2012
Copy link

EvilPaul2012 commented Dec 17, 2019

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
Copy link

EvilPaul2012 commented Dec 17, 2019

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.

@tamius-han
Copy link
Owner

@EvilPaul2012 was ultrawidify disabled on disney+ by default?

@EvilPaul2012
Copy link

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

@tamius-han
Copy link
Owner

tamius-han commented Dec 17, 2019

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 tamius-han added bug Confirmed bug Chrome Issues affecting Chrome Firefox Issues affecting Firefox labels Dec 17, 2019
@EvilPaul2012
Copy link

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.

@tamius-han
Copy link
Owner

tamius-han commented Jan 3, 2020 via email

@tamius-han
Copy link
Owner

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.

@EvilPaul2012
Copy link

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.

@tamius-han
Copy link
Owner

tamius-han commented Mar 9, 2020

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

@EvilPaul2012
Copy link

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.

@mprangenberg
Copy link

mprangenberg commented Mar 29, 2020

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?

@eviltak
Copy link

eviltak commented Apr 7, 2020

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

@ocinon
Copy link

ocinon commented Jan 6, 2021

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!

@tamius-han
Copy link
Owner

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

@ocinon
Copy link

ocinon commented Jan 6, 2021

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

@tamius-han
Copy link
Owner

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?

@ocinon
Copy link

ocinon commented Jan 7, 2021

That fixed the issue! Thanks so much

@jwannebo
Copy link

Looks like they changed the CSS to:

.btm-media-client-element

Parent 1

@tamius-han
Copy link
Owner

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?

@jwannebo
Copy link

jwannebo commented Jun 12, 2021

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

@tamius-han
Copy link
Owner

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

@Uttamkr
Copy link

Uttamkr commented Dec 9, 2022

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%; }

@tamius-han
Copy link
Owner

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

@FiRem00
Copy link

FiRem00 commented Jun 19, 2024

still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug Chrome Issues affecting Chrome Firefox Issues affecting Firefox needs-info No but seriously, please provide some details.
Projects
None yet
Development

No branches or pull requests

9 participants