ungoogled-software / ungoogled-chromium-debian

Debian, Ubuntu, and others packaging for ungoogled-chromium
386 stars 49 forks source link

Widevine not working in unportable #182

Closed Eloston closed 2 years ago

Eloston commented 3 years ago

Widevine doesn't work in unportable version, even if I place WidevineCdm in /usr/lib/chromium and see the version show up in chrome://components. It also doesn't work in ~/.local/lib, which was my setup for Chromium 84 on Debian stretch.

Maybe we need to add the patch for the Widevine version like there was in Chromium 84?

lfom commented 3 years ago

I was able to get it working after creating a sym-link from ~/.local/lib/WidevineCdm to ~/.config/chromium/WidevineCdm/_versionnumber, where _versionnumber is the version of the plugin that can be found in manifest.json. The next time Chromium is run, it should automatically create a file named latest-component-updated-widevine-cdm that is a plain text file with the path that points to the sym-linked folder, and the version number is shown in chrome://components.

Eloston commented 3 years ago

Hmm, that works for me too. Do you know when the symlink requirement was introduced? I wonder how this works on Windows...

EDIT: Actually, creating the symlink then launching the browser will create a latest-component-updated-widevine-cdm that points to the symlink, which doesn't work. I have to ensure the path recorded in that file points to a real directory. EDIT2: Even after editing the path manually, relaunching the browser will cause Chromium to update the path to the symlink again, causing Widevine to break again... EDIT3: The problem described in EDIT2 does not happen if WidevineCdm is placed under /usr/lib/chromium

lfom commented 3 years ago

Hmm, that works for me too. Do you know when the symlink requirement was introduced? I wonder how this works on Windows...

I don't know, I got to this looking at another Chromium-based browser for Linux called Flashpeak Slimjet, it comes with Widewine enabled, but it has an actual folder with the Windevine components, even with some kind of signature. But as I already had the files in ~/.local/lib, I first tried to install the latest version from the latest official Chrome .deb build, and as it didn't work, I created the link to replicate what Slimjet has, and finally tried without the "latest-component" file and noticed that it was created automatically.

Eloston commented 3 years ago

Hmm, looks like the widevine-locations.patch needs to be updated to look for WidevineCdm in ~/.local/lib when creating the latest-component file.

Eloston commented 2 years ago

Placing WidevineCdm from Google Chrome in /usr/lib/chromium works for me for at least several unportable versions. Not sure if placing it in the home directory works.

Resolving as this is good enough for me.