electron-releases icon indicating copy to clipboard operation
electron-releases copied to clipboard

Inquiry about 'widevine-cdm-path' in Castlabs Electron with custom path

Open ranjithrr opened this issue 2 years ago • 6 comments

I am currently working with Electron 17 and 21, and I'm trying to set a custom path for the Widevine CDM using the 'widevine-cdm-path' argument. However, I'm facing issues with this configuration, and I would appreciate your guidance.

My specific question is whether Castlabs Electron supports the 'widevine-cdm-path' argument for specifying a custom path for the Widevine CDM. If it does, I would like to know the steps and best practices for configuring it to load the Widevine.dll from a custom-defined path.

I have reviewed the documentation, but I couldn't find clear instructions for this particular use case, so any assistance or pointers you can provide would be immensely helpful.

My Code :


const {app, components, BrowserWindow} = require('electron');

function createWindow () {
  const mainWindow = new BrowserWindow();
  mainWindow.loadURL('https://shaka-player-demo.appspot.com/');
}

app.whenReady().then(async () => {
  await components.whenReady();
  console.log('components ready:', components.status());
  app.commandLine.appendSwitch('widevine-cdm-path', 'WidevineCdm/4.10.2710.0/_platform_specific/win_x64/widevinecdm.dll');
  app.commandLine.appendSwitch('widevine-cdm-version','4.10.2710.0');
  createWindow();
});

ranjithrr avatar Nov 07 '23 15:11 ranjithrr

I am currently working with Electron 17 and 21

These releases are both out of the official CDM support window, and may not be able to get a CDM at all. Because of how the Component Updater works you will unfortunately not receive an error when this happens (see #169). This has been fixed in the most recent supported versions, v25-v28.

My specific question is whether Castlabs Electron supports the 'widevine-cdm-path' argument for specifying a custom path for the Widevine CDM.

No, ECS does not support this, it only supports CDMs through the Component Updater. I'm not sure what you are trying to do, but the main point of ECS is that it automatically gets an updated CDM.

khwaaj avatar Nov 08 '23 00:11 khwaaj

Context behind this question: We would like to continue the support for Windows 7 as good number of our customers are still on Windows 7. Looks like Electron 22 is the last version to support it. And as per your comment in other thread - CDM support is available only for last 11 months electron 22 - 27. I assume after few months, Electron 22 also will be not supported by the CDM.

We are evaluating the below option - If component updater downloading the CDM is the only issue, can we prebundle the CDM dll along with our application and make it load the dll from the custom path. We remember there used to be a chromium command line switch - widevine-cdm-path. We would like to know if this is still supported.

sudharsans85 avatar Nov 08 '23 06:11 sudharsans85

This problem with Windows 7/8 support is actually a question I've already raised with Google to see their stance on, but I'm yet to receive an answer. I'll try to get back to you once I do, but for now you'd probably need to assume it will fall out of the supported CDM window soon.

No, this is not possible in the current implementation. There are also legal implications with bundling the CDM, and warnings from Google not to do it:

You may not host the Widevine CDM for redistribution due to Google licensing obligations. Failure to adhere to these requirements may incur MPEG licensing fees for your application and/or implementation.

khwaaj avatar Nov 08 '23 08:11 khwaaj

Thanks for the clarification. Please let us know whenever theres any revert from Google on extended support of Windows 7 As it stands currently, any idea of till when electron 22 will be supported by CDM

sudharsans85 avatar Nov 08 '23 09:11 sudharsans85

There are no plans to extend support for Windows 7/8.1 beyond what was already done. Both of these Windows versions are out of support, and have been for some time, so they will not receive security updates or any form of technical assistance, effectively making them security disasters waiting to happen.

Out of curiosity, how large of a footprint of your users are still on these kinds of old systems?

As it stands currently, any idea of till when electron 22 will be supported by CDM.

I have no exact data, I can just point to the Google policy of one year of support.

khwaaj avatar Nov 12 '23 01:11 khwaaj

@ranjithrr @khwaaj Electron 22 still works just fine, and the latest Widevine works just fine both in Electron and Chromium M109. The component updater in both Electron and Chromium is still fetching the latest Widevine, and the latest Widevine still works with Win 7/8/8.1. Many of my Electron apps, including 2 that use this Castlabs fork, are on Electron 22.3.27 specifically to still support old Windows. Google will provide Widevine binaries compatible with Win7/8/8.1 until at least October 2024 (Due to Server 2012 R2 and POSReady 7 ESU updates), but possibly longer.

Even after that date, it should still continue to work for a long while, as evidenced by the fact that CastLabs Electron 15.x and higher still work with widevine encrypted content, and versions 16.x and higher still work with their VMP signing service. This is because, 15.x moved to the component updating model, rather than shipping the widevine binary bundled with Electron, and 16.x and above support the latest 4.10.x.x widevine versions, and so work with their VMP signing script.

Basically, don't worry. By the time CastLabs Electron 22.3.27 stops working on Win NT 6.x.x, noone will be using it outside of legacy hardware/legacy game enthusiasts.

Alex313031 avatar Apr 04 '24 05:04 Alex313031