Widevine aarch64, input wanted

I am trying to add seamless widevine support for aarch64 and have created a pull request. I do need some extra input from the community on how to implement this in Firefox, as well as some other minor things. I’d like to hear some opinions from more knowledgeable folks. My mine points are described in the pr, but I’ll paste them here as well.

Adds support for arm64 widevine using code from widevine-installer. The package builds and outputs the relevant files in the same locations as the x64 version, although I cannot test it because I don’t know how to make chromium.enableWideVine select a local version, it tries to install the x64 one (please help me on this one :).

There are also some things I would like input on from someone else:

  1. Versioning between the two builds. Currently arm is using an older version, it’s probably a good idea to make them the same, but without being able to test, I can’t do that, because I don’t know if newer versions exist and can be successfully patched for arm. List of chromeos images containing arm64 widevine here.
  2. Firefox support. Shouldn’t be hard to implement if we come up with a system. Chromium has the enableWideVine flag that as I’m aware does not exist for Firefox. All that Firefox needs are some options as well as one env variable, refer to this. I could build this into the package but that would mean installing the package would configure Firefox automatically, which is different from the behavior that exists with Chromium (where enableWideVine needs to be set).

Edit: after some googling I see that Firefox drm works out of the box for x64, but for arm the changes linked above are still necessary.

Edit 2: What I don’t understand is why Firefox doesn’t need a seperate flag for widevine like chromium, is it because Firefox only installs widevine if drm is explicitly enabled and chromium auto installs it on launch? Could it also have something to do with licenses, why isn’t Firefox unfree when it has widevine and chromium is?

3 Likes

Many issues in nixpkgs. This might just be an omission…

Doesn’t Firefox contain code that downloads the widevine support at runtime? I think with chromium, we actually have to package it in, which means it has to be unfree because we’re packaging proprietary binaries. If I’m understanding correctly, nixpkgs isn’t shipping widevine in Firefox.

1 Like

AFAIK both browsers download widevine at runtime but chromium did so without asking the user first which arguably made the package unfree, so a solution had to be found. Widevine was packaged anyways for some other purpose, so the chromium wrapper gained a flag (off by default) to provide our packaged widevine.

Firefox shows a prompt to download widevine when a website tries to use it but the wording is very tight on details and I doubt any mugglenon-technical user reasonably understands the implications when they press “Enable DRM”.

That’s what I’m understanding as well, which makes it kind of difficult to implement this in Firefox cleanly. Patching Firefox to download from nixpkgs instead of their official way would probably be quite difficult (let me know if wrong). So I can’t really think of a clean solution.