From 0245ee0c67bc381367912dcc13a0a69119bf66d2 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Sat, 20 Jan 2024 20:47:30 -0500 Subject: [PATCH] Brave Browser: make widevine available see https://github.com/brave/brave-core/pull/21040 available in brave browser in 1.63.x+ --- apps/Brave/install-64 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/Brave/install-64 b/apps/Brave/install-64 index b171f16531..2d0d557f75 100755 --- a/apps/Brave/install-64 +++ b/apps/Brave/install-64 @@ -16,3 +16,23 @@ if [ $? != 0 ]; then error "Failed to install brave-browser." fi fi + +#detect if Widevine can be enabled +if package_available libwidevinecdm0;then + description="Make Widevine DRM (for Netflix, Spotify) available to Brave? + +You will still need to enable Widevine inside of Brave in brave://settings/extensions" + userinput_func "$description" "Yes, make Widevine DRM available" "No, do not make Widevine DRM available." + if [ "$output" == "Yes, make Widevine DRM available" ]; then + install_packages libwidevinecdm0 || exit 1 + fi +fi + +# make widevine available if it is installed +if [ -d /opt/chromium.org/chromium/WidevineCdm ]; then + sudo rm -rf /opt/brave.com/brave/WidevineCdm + sudo ln -s /opt/chromium.org/chromium/WidevineCdm /opt/brave.com/brave/WidevineCdm || error "Could not create WidevineCdm symlink" +elif [ -d /opt/WidevineCdm ]; then + sudo rm -rf /opt/brave.com/brave/WidevineCdm + sudo ln -s /opt/WidevineCdm /opt/brave.com/brave/WidevineCdm || error "Could not create WidevineCdm symlink" +fi