community/firefox: plug-and-play widevine support
I got widevine to run on alpine natively (would be nicer without DRM but some things require it unfortunately):
Start firefox with MOZ_DISABLE_GMP_SANDBOX=1 firefox
. Open about:config
and enable media.gmp-widevinecdm.enabled
and media.gmp-widevinecdm.visible
. Then open a webpage that triggers a widevine install (eg. https://shaka-player-demo.appspot.com). In a terminal run:
apk add gcompat
patchelf --add-needed libgcompat.so.0 ~/.mozilla/firefox/*/gmp-widevinecdm/*/libwidevinecdm.so
Reload the tab and it should be able to Widevine DRM media.
It would be nice if we could patch firefox a bit to have widevine work without manual patching (as long as gcompat is installed). For example before libwidevinecdm.so
is loaded also load libgcompat.so.0
(which ether needs to be done before the sandbox is set up or we need to allow libgcompat.so.0
to be opened in the sandbox).