测试 Widevine CDM
Widevine Content Decryption Modules (CDMs) are how streaming services protect content using HTML5 video to web browsers without relying on an NPAPI plugin like Flash or Silverlight. Widevine support is an alternative solution for streaming services that currently rely on Silverlight for playback of DRM-protected video content. It will allow websites to show DRM-protected video content in Firefox without the use of NPAPI plugins. The Widevine CDM runs in an open-source CDM sandbox providing better user security than NPAPI plugins.
VMP 说明
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 to be signed using a license obtained from itself.
Per Widevine:
To enable video playback with this new restriction, has created a fork that has implemented the necessary changes to enable Widevine to be played in an Electron application if one has obtained the necessary licenses from widevine.
Open in Chrome browser, find Widevine Content Decryption Module
and make sure it is up to date, then you can find the library files from the application directory.
The library file widevinecdm.dll
will be under Program Files(x86)/Google/Chrome/Application/CHROME_VERSION/WidevineCdm/_platform_specific/win_(x86|x64)/
directory.
在 macOS 中
Note: Make sure that chrome version used by Electron is greater than or equal 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 file with --widevine-cdm-path
command line switch, and the library’s version with switch. The command line switches have to be passed before the ready
event of app
module gets emitted.
示例代码:
To verify whether widevine works, you can use following ways:
- 打开 https://shaka-player-demo.appspot.com/ 加载一个使用
Widevine
的 manifest。 - 打开
bitdash uses Widevine in your browser
,然后播放 video。