In Electron you can use the Widevine CDM library shipped with Chrome browser.
Widevine Content Decryption Modules (CDMs) are how streaming services protectcontent using HTML5 video to web browsers without relying on an NPAPI pluginlike Flash or Silverlight. Widevine support is an alternative solution forstreaming services that currently rely on Silverlight for playback ofDRM-protected video content. It will allow websites to show DRM-protected videocontent in Firefox without the use of NPAPI plugins. The Widevine CDM runs in anopen-source CDM sandbox providing better user security than NPAPI plugins.
As of Electron v1.8.0 (Chrome v59)
,the below steps are may only be some of the necessary steps to enable Widevine;any app on or after that version intending to use the Widevine CDM may need tobe signed using a license obtained from Widevineitself.
WIDEVINECDM.DLL is regarded as a hijack virus injected in potentially unwanted program (PUP), which is acquired when you download and introduce freeware from dark sites. You can’t know about this when it is going on. Widevinecdm Plugin Chrome Download. Step (4): Now from the list of programs and features, right-click on the Google Chrome and then select Uninstall option. Step (5): Once Google Chrome is successfully uninstalled, restart your computer and then visit the Google.
Per Widevine:
Chrome 59 (and later) includes support for Verified Media Path (VMP). VMPprovides a method to verify the authenticity of a device platform. For browserdeployments, this will provide an additional signal to determine if abrowser-based implementation is reliable and secure.
The proxy integration guide has been updated with information about VMP andhow to issue licenses.
Widevine recommends our browser-based integrations (vendors and browser-basedapplications) add support for VMP.
To enable video playback with this new restriction,castLabs has created afork that has implemented thenecessary changes to enable Widevine to be played in an Electron application ifone has obtained the necessary licenses from widevine.
Open chrome://components/
in Chrome browser, find Widevine Content Decryption Module
and make sure it is up to date, then you can find the library files from theapplication directory.
The library file widevinecdm.dll
will be underProgram Files(x86)/Google/Chrome/Application/CHROME_VERSION/WidevineCdm/_platform_specific/win_(x86|x64)/
directory.
The library file libwidevinecdm.dylib
will be under/Applications/Google Chrome.app/Contents/Versions/CHROME_VERSION/Google Chrome Framework.framework/Versions/A/Libraries/WidevineCdm/_platform_specific/mac_(x86|x64)/
directory.
Note: Make sure that chrome version used by Electron is greater than orequal to the min_chrome_version
value of Chrome's widevine cdm component.The value can be found in manifest.json
under WidevineCdm
directory.
After getting the library files, you should pass the path to the filewith --widevine-cdm-path
command line switch, and the library's versionwith --widevine-cdm-version
switch. The command line switches have to bepassed before the ready
event of app
module gets emitted.
Example code:
To verify whether widevine works, you can use following ways:
Widevine
.bitdash uses Widevine in your browser
, then play the video.