Ultrawidify and Edge (2020 edition)

It’s been a nice autumn evening when my phone buzzes. One new email, says the notification. It’s github. Ultrawidify doesn’t work on Edge at all. Not on youtube, not on Netflix, nowhere. Curious, I think to myself and wow to not take the Valve strategy this time around. Which, of course, happens anyway because it turns out that my weekends are considerably less free than I thought they would be (Not to mention that my brain sometimes works the way Beinoff, Weiss and DeBlois say it should — something something kinda forgot). Recent reviews on Chrome Web Store seem to echo that issue (I’m at least 99.7% sure at least one, but likely more, of recent one-star reviews came from an Edge user, who has absolutely no business leaving reviews on CWS), though the majority is about issues that can be reproduced in Chrome.

So let’s see why Ultrawidify is broken on Edge, and why I pulled it from the Edge’s extension store, and why Edge users are getting this big ass red popup when they try to watch their Netflix.

Oh yea, spoiler alert: Ultrawidify is not broken on Edge. Edge is broken on Edge.

ELI3: Webdev 101

Long story extremely short: websites are just a bunch of rectangles. Sometimes said rectangles are inside each other, sometimes they’re next to each other, and it’s developer’s job to tell them where they should be and how big should they be.

Webdev: you don’t think it be like this, but (sometimes) it do

And this is what Ultrawidify does, ultimately: it tells one of the boxes to get bigger.

The Player and the Video

Ultrawidify only cares about two of these rectangles: the player and the video. The video is a special kind of rectangle: you can control its size, but it’s kind of a black box. You can’t control anything inside it, and it’s the browser’s job to handle displaying things inside the box.

In normal, functional browsers, things look like this:

Blue rectangle is the player, red rectangle is the video.

And when we encounter a video with black bars, things look like this:

This time, the video element also gets a blue tint.

As you can see, two things happen:

  • Red square gets taller than the blue square
  • Browser makes video fit the red square

But if you open youtube in Edge, you’ll find that youtube behaves in exactly the same way as it does in Firefox and Chrome. How come Netflix and the likes don’t?

Turns out: same reason why autodetection doesn’t work on Netflix (and Hulu and Disney and everything else).

Secret Ingredient: DRM

There’s lots of money spent on making movies. So much, in fact, that most movies never make a profit to the point Disney cannot even afford to pay writers their dues.

Obviously, the studios try to make as much of their money back as possible. And that brings us to a problem. Once the movie is on the internet for free, it gets a bit harder to make money off it. After all, why would you pay for Netflix or Hulu or Disney+ when you can just get a browser extension that records (or even downloads!) the movie or show you want to watch, subscribe to the Netflix’ one month free trial, download everything you want and then cancel before you start getting billed.

This is why streaming sites attempt to ensure that recording and downloading the shows and movies they host is as difficult as possible. And while such DRM measures are not very effective — as new movie and show releases very quickly find their way to thepiratebay, YIFY, whatever’s the tracker of the hour right now — the DRM measures still raise the tech barrier significantly enough to be worth it.

DRM magic happens inside the <video> tag (or the red square), and it’s up to browser to handle it. Different browsers handle DRM differently, which is why Edge gets 4K netflix while Firefox and Chrome don’t.

Which Brings us to Microsoft Edge

Yeah, Edge’s DRM implementation is completely broken.

Okay, it’s not completely broken. If the video element (red square) fits completely within the player (blue square), things will display correctly:

BTW, remember the thing about “DRM measures aren’t very effective?” Yeah, through the magic of RDP from Linux machine you can screenshot Netflix videos as much as you want.

However, the moment the video (red rectangle) becomes taller or wider than the inside of the browser window (in this case, also dashed blue square) … Well.

Height of the video is set to 132%, and the video element itself appears to respect that. Video stream, on the other hand, is a different story.

Remember: red square (top and bottom are outside the window boundaries in this example) is the video tag. We cannot control how things inside the red square appear, at all.

It appears that internally, Edge thinks that video (the red square) cannot be bigger than what’s displayed on the screen. This becomes super-evident when we push the video 25% off-screen:

Notice how the black bar on the top is of the same thickness as the black bar on the bottom.

Both the player and the video are pushed 25% towards the bottom. This means that the bottom 25% of the video should be cropped off — however, as you can see by the size of the top and letterbox, Edge simply resized the video so no cropping occurs.

The same thing happens if you push the video 25% over the top edge: edge will resize the video to 75% of the original size so no cropping occurs … except it’ll also align the stream with the top of the video tag / red box, meaning you’re now getting twice the cropping.

All in all, I see Microsoft’s acquisition of Bethesda is already paying dividends.

2 thoughts on “Ultrawidify and Edge (2020 edition)”

  1. Stop bitching and work around it, or contact Microsoft and get the issue fixed. Giving you 1 star on every platform with every account I have until it is fixed.

    1. And I’ve reported your every rating for spam/breaking google’s ToS, which it does.

      Secondly, learn to read. There’s nothing that can be done about it (short of hacking into Microsoft and rewriting their broken implementation).

      Third, go ahead and try to contact Microsoft. Go on?
      Here’s the first pro tip of the day for you: I already did, about half a dozen times. The thing about reporting things to Microsoft is that they only notice issues that get reported a lot, which is why I have provided not just the instructions on how to report the problem, but what to report in order to be effective. Not once, but twice (although the latter example is now outdated). And since I don’t always have access to a windows machine with Edge, I also kinda rely on people telling me when Edge fixes their shit. The popup is a necessity.

      Fourth: if you think it’s possible to work around this problem, go ahead and try it. PRs are always open on Github.
      Pro tip: you won’t because you can’t.

      As for me, I reckon wasting three days of my end-of-year vacation on trying to figure this out was more than enough work — especially given I’m not getting paid for this.

      Last but not least: Chrome Web Store is a place for Chrome extensions. If you install the extension from Chrome Web Store in a browser that’s not Google Chrome and the extension doesn’t work, that’s not my problem, or the problem of this extension. If you don’t use a supported browser — and the list of supported browsers can be found here, at the top of the page — you’ve got zero rights to complain when things don’t work, especially in the extension reviews. Those are for people who use Chrome. If you’re using Edge, your place is Edge’s extension store. The place for your ratings is there. (Except that, since the issue is impossible for me to fix, I pulled the extension from Edge’s extension store — though later than I should have).

      Now stop being an entitled cockhead and I hope that your Christmas tree catches on fire while your place of employment buries you under a thousand “URGENT — YOU MUST FIX THIS FIVE MINUTES AGO” emails.

      Honestly, get fucked,
      — Tam

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.