In Electron you can use the Widevine CDM plugin shipped with Chrome browser.
Thanks for the tutorial, works a treat! I've been meaning to do this myself some time ago and gave up shortly. I got as far as changing the user-agent and using the Chrome-variant of libwidevinecdm.so, but totally missed that Netflix stores cookies pertaining Silverlight. Once the initial download is complete, it will restart the Guild Wars application and start the actual data download. Below you will find a screenshot of what it looks like. Once you reach this point, you can either leave the installation to download the minimum required files to start the game, or, if you have a complete Gw.dat file, you can. Go to Google Chrome User Data and scroll down, then you will find WidevineCdm folder from the list. Right click the folder and select Delete. Open task manager, right-click on Chrome entries and select End task. Then follow the steps in Solution 1 to update the plugin. Restart your computer and check if the problem gets. End all Chrome tasks by right-clicking on Chrome entries and select “End task”. Now head over to method one and update the plugin using the steps mentioned. The module should update correctly and your Chrome might restart. Restart your computer and try playing any video. Hopefully, the problem will be solved. Solution 5: Reinstalling Chrome.
Getting the plugin
Electron doesn't ship with the Widevine CDM plugin for license reasons, to getit, you need to install the official Chrome browser first, which should matchthe architecture and Chrome version of the Electron build you use.
Note: The major version of Chrome browser has to be the same with the Chromeversion used by Electron, otherwise the plugin will not work even thoughnavigator.plugins
would show it has been loaded.
Windows & OS X
Open chrome://components/
in Chrome browser, find WidevineCdm
and makesure it is up to date, then you can find all the plugin binaries from theAPP_DATA/Google/Chrome/WidevineCDM/VERSION/_platform_specific/PLATFORM_ARCH/
directory.
APP_DATA
is system's location for storing app data, on Windows it is%LOCALAPPDATA%
, on OS X it is ~/Library/Application Support
. VERSION
isWidevine CDM plugin's version string, like 1.4.8.866
. PLATFORM
is mac
orwin
. ARCH
is x86
or x64
.
On Windows the required binaries are widevinecdm.dll
andwidevinecdmadapter.dll
, on OS X they are libwidevinecdm.dylib
andwidevinecdmadapter.plugin
. You can copy them to anywhere you like, but theyhave to be put together.
Linux
On Linux the plugin binaries are shipped together with Chrome browser, you canfind them under /opt/google/chrome
, the filenames are libwidevinecdm.so
andlibwidevinecdmadapter.so
.
Using the plugin
Widevinecdm Download Chrome Mac
After getting the plugin files, you should pass the widevinecdmadapter
's pathto Electron with --widevine-cdm-path
command line switch, and the plugin'sversion with --widevine-cdm-version
switch.
Note: Though only the widevinecdmadapter
binary is passed to Electron, thewidevinecdm
binary has to be put aside it.
The command line switches have to be passed before the ready
event of app
module gets emitted, and the page that uses this plugin must have pluginenabled.
Example code:
Verifying the plugin
To verify whether the plugin works, you can use following ways:
Widevinecdm Plugin Chrome Download
- Open devtools and check whether
navigator.plugins
includes the WidevineCDM plugin. - Open https://shaka-player-demo.appspot.com/ and load a manifest that uses
Widevine
. - Open http://www.dash-player.com/demo/drm-test-area/, check whether the pagesays
bitdash uses Widevine in your browser
, then play the video.