Git Product home page Git Product logo

electron-releases's Introduction

Electron for Content Security

Check out the Wiki for general news, guides, and other updates.

⚠️ The v16 series of Electron for Content Security, labeled wvcus, moves to using the Component Updater Service to handle installation of the Widevine CDM, and has incompatible API updates compared to the previous wvvmp releases.

See additional updates in the sections below, and please report any issues you find!

Electron for Content Security (ECS) is a fork of Electron created by castLabs to facilitate the use of Google's Widevine Content Decryption Module (CDM) for DRM-enabled playback within Electron, including support for Verified Media Path (VMP) and persistent license storage. It is intended to be used as a drop-in replacement for stock Electron and currently has full support for Windows and macOS platforms, with partial support for Linux (which lacks support for persistent licenses due to VMP limitations on the platform).

The sections below will describe the features/modifications that ECS provides, for anything else refer to the regular Electron documentation.

How does it work?

To achieve Widevine support the Widevine CDM will be installed on first launch and enabled as an option for playback of DRM protected content using common EME APIs. Subsequent launces will trigger a backround update check. If an update is available it will be downloaded and applied on next launch.

The provided builds are VMP-signed for development and can be used with Widevine UAT or other servers accepting development clients. For production use you can sign up for our EVS service, to obtain production VMP signing capabilities. Previously a license agreement with Google Widevine was required to get your own VMP signing certificate, but with EVS this is no longer necessary.

Installing

To install prebuilt ECS binaries, use npm. The preferred method is to install ECS as a development dependency in your app:

npm install "https://github.com/castlabs/electron-releases#v29.0.0+wvcus" --save-dev

Since ECS is not published in the npm package index a GitHub URL is used instead to reference a particular release, just modify the # tag at the end to the version you want to use.

⚠️ The above command is just an example, use a release of a currently supported version to make sure you have the latest features and security updates!

Using

Using ECS is very similar to using stock Electron, the main difference being that you should wait for the Widevine CDM installation to complete before opening your BrowserWindow. This can be achieved using the new components API:

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());
  createWindow();
});

Extensions to Electron

The only visible extensions provided is the new components API.

Widevine CDM installation

Component installation/updates are always automatically triggered unless the Component Updater is disabled, e.g. by passing --disable-component-update. This is always done on a delay timer, even if there is no version of a component installed.

To make sure the Widevine CDM is promptly installed the components.whenReady() API can be used (see example above). This forces immediate installation if there isn't already a version of the Widevine CDM available.

Legal notice / Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. UPDATES, INCLUDING SECURITY UPDATES, WILL BE PROVIDED ON A BEST-EFFORT BASIS.

electron-releases's People

Contributors

alexanderturinske avatar khwaaj avatar nexxai avatar obecny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-releases's Issues

Unable to identify the device in case of Widevine DRM requests from windows electron application

Hi
We are using shaka player in our windows electron application to play Widevine DRM protected content. We need to identify the device uniquely to manage content access. In case of our android app, we are getting device_id in DRM license response but that is not the case with our electron application. Is there any way we can identify the device that is running our electron application ?

Symbols

We're using crashReporter to send crashes to an external server and to be able to see where the crashes occurred we need to upload the symbols to our crash server. Can we use the symbols provided in the regular Electron releases, or can we get them from you?

Widevine events don't exists

Hello,

I've been trying to develop with widevine since 2 days but I couldn't find what's wrong with me.
I havd replaced the stock electron with yours but when I start none of the widevine events fired. When I printed the app variable from my require('electron') I figured out that the events doesn't exists.

_events: { login: [Function], 'certificate-error': [Function], 'select-client-certificate': [Function], quit: [Function], 'web-contents-created': [Function], 'session-created': [Function], 'will-quit': [Function], ready: [ [Object], [Object], [Function] ], 'window-all-closed': [Function] }

I am using the latest version of your electron. May I missed something important to have widevine working ? Do I have to build it in order to test it ? Thanks

Apple Notarization

To prepare for macOS 10.15 I've worked through Apple's notarization and got our app (v5.0.5-wvvmp) working for hardened runtime (although not actually tested on macOS 10.15 yet). This boiled down working out what entitlement to add. Using:

<key>com.apple.security.cs.disable-library-validation</key>
true/>

seemed to be enough.

Originally the expectation was that the app would just crash if it there was a violation. Without the above entitlement it didn't. What would happen is that cdm was reported as loaded but then accessing it threw an error.

This leaves me wondering about stability, and that future releases of the CDM might require alternative entitlements. When they're upgraded to the results could be problematic. Or it could be that I'm denying the current cdm access to something it needs and the right circumstances haven't arisen for me to see it error.

So it seemed sensible to ask if there's any known notarisation issues? I imagine that if there are plans for the CDM's to also be signed/notarized then we won't have to worry?

Building for Mac with electron-builder

We are building our app using electron-builder, signing it for distribution outside the MAS and notarizing it.
As per the instructions in the readme we are VMP-signing before code-signing. We do this by using the afterPack hook which just calls your python script from a JS function. This hook should run before code-signing and by looking at electron-builder's output the order seems to be fine.
The problem is that when running the app for some reason Widevine doesn't seem to work.
Just by simply disabling the code-signing like this we get a working build which is able to use Widevine.
Anyone knows what we're missing here?

v4.0.1 fails to start on OS X 10.10 and 10.11

I haven't been able to confirm this as I don't have access to machines running the relevant versions of OSX, but our latest build (based on v4.0.1) has been reported as failing to start on OS X 10.10 and 10.11. Later versions are fine. Using your Electron binary directly the same failure is noted - a system dialog advising the user to contact the developer because there's been a problem.

This looks like the most relevant section from the OS report on the failure:

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
Symbol not found: _kSecAttrKeyTypeECSECPrimeRandom
Referenced from: /Applications/BBC iPlayer Downloads.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework
Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
in /Applications/BBC iPlayer Downloads.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework

First licence request after upgrade to 4.0.2-wvvmp failing with system code 75 error

When refreshing content with existing licenses on CDM upgrade the first request for an license results in the error:

License failed InvalidStateError: Rejected with system code (75) {"stack":"Error: Rejected with system code (75)"}

All subsequent requests work fine (although not necessarily for the same piece of media that fails - but this may be a problem in our app which behaves as though the license is there but won't play the content).

I don't think this is limited to 4.0.2 and affects all 3x and 4x versions as they show the same behaviour as I've downgraded whilst reproducing this.

electron-v1.8.2-vmp1010-win32-ia32 crashing

  • Electron version: v1.8.2-vmp1010
  • Operating system: Windows 10 Pro x64 (1709)
  • Node version: v8.9.4

# Expected behaviour
Electron should run normally

# Actual behavior
It crashes when running on the electron-quick-start example.
Exit status is 3221225595

# How to reproduce
Tested using a slighlty modified electron-quick-start example.
Performed this change on the example: https://github.com/tbeloqui/electron-quick-start/commit/433c12467888e9cdfff804fdcbcc969cd1d1e544

git clone https://github.com/tbeloqui/electron-quick-start
cd electron-quick-start
npm install
npm start

Widevine signing issue with electron build

After creating an electron build using 'nmp run release' and then VMP signing that .exe following the instructions here: https://github.com/castlabs/electron-releases#verified-media-path-vmp I can open the .exe but the videos fail to play. With the console open we can what look to be various code signing issues.

At this point we just don't know enough about the system to begin debugging. Is there any way to tell that the VMP signing was successful? Is there a way that we can troubleshoot our widevine certificate?

To be clear, our use case is that a user will download content with an internet connection, and then later play that content without an internet connection.
unnamed

Thanks,
Ben

Widevine license

Hi! I have an issue with getting widevine license
I did request to getting the license from widevine, on Linux all works correctly but on windows in the second request I getting "malformed" response, but in Chrome got the correct response.

Installer problems when building against v1.8.2-vmp1010

Our app uses the built in Electron updater which means we run it through the windows-installer tool to build the binaries we ship. When we use the win32 x64 build of v1.8.2-vmp1010 the installer and setup binaries are built without error, however on running the setup.exe it warns of a missing VCRuntime140.dll file:

install-problem-small

This doesn't happen with the vanilla build of Electron v1.8.2, nor with the 32bit version of v1.8.2-vmp1010. There's not much in the way of help in the Squirrel logs so I'm at a loss as to why we get the error - as the file looks to get bundled.

One thing I've noticed is that if I md5 the x64 .dll files in the Castlabs build and compare against the vanilla Electron build there are 2 files that are the same - vcruntime140.dll being one of them.

Any thoughts would be appreciated, I'll comment if I find anymore info or a resolution.

Widevine components don't install if proxy is configured but not available

OS: macOs, High Sierra, 10.13.6
Version of electron-releases: 3.0.2-wvvmp

Use Case:

  • A user has a proxy configured with a Proxy Configuration File, but the proxy becomes unreachable.
  • In our application we have logic that sets the proxy settings for the electron application if it is configured AND available.
  • If the proxy is configured and NOT available, the app runs without doing this extra work and runs as if the proxy isn't there
  • If the proxy is configured and NOT available, Widevine errors with the error code Error: net::ERR_MANDATORY_PROXY_CONFIGURATION_FAILED

Steps to reproduce

  • Download the newest version of the application
  • Open the terminal and clear out Library/Application\ Support/APP_NAME (rm -rf ~/Library/Application\ Support/APP_NAME)
  • Open up the System Preferences -> Network -> Wi-Fi
  • Ensure the lock in the lower left-hand corner is unlocked to make changes
  • Click Advanced -> Proxies
  • Check the Automatic Proxy Configuration box and put in a bogus URL (http://localhost:8080/foo.pac)
  • Save/Apply the changes
  • Install the application
  • Open the application
    • EXPECTED: The application installs and loads the login page
    • ACTUAL: An error occurs, Error: net::ERR_MANDATORY_PROXY_CONFIGURATION_FAILED, and the application closes
  • Close the application if it hasn't closed already
  • Remove the Automatic Proxy Configuration
  • Open the application
    • EXPECTED/ACTUAL: The application loads the login page

Proposed solution:

  • is it possible to have to opt into using the proxy for downloading the Widevine components, thus not using the proxy by default? Instead of defaulting to using the proxy and erroring if it is not available?

Hopefully all of this makes sense; if not, or if I am missing something, please let me know.

Relates to #31

Issues with release build and VMP signing

After creating an electron build using 'nmp run release' and then VMP signing that .exe following the instructions here: https://github.com/castlabs/electron-releases#verified-media-path-vmp I can open the .exe but the videos fail to play. With the console open we can what look to be various code signing issues.

At this point we just don't know enough about the system to begin debugging. Is there any way to tell that the VMP signing was successful? Is there a way that we can troubleshoot our widevine certificate?

To be clear, our use case is that a user will download content with an internet connection, and then later play that content without an internet connection.

unnamed

Thanks,
Ben

castlabs electron version is missing the typescript .d.ts file

Run a standard electron-quick-start app, and npm install it.

Look inside node_modules/electron

notice the electron.d.ts file.

Removing this makes it significantly harder to "plug and play" the swap out of electron, as now my app will not compile into javascript.

Application relaunches on first open attempt

Description

Electron version: v1.8.7-hpcp-vmp1010
Node version: v6.14.3
Operating system: MacOS High Sierra

Issue

When opening an electron application for the first time (without any locally cached app files found on the system) with electron version pointing to https://github.com/castlabs/electron-releases#v1.8.7-hdcp-vmp1010", the app will proceed to launch, quit, then relaunch. This only happens on the first attempt.

To reproduce

  1. Point electron version to "https://github.com/castlabs/electron-releases#v1.8.7-hdcp-vmp1010" and run npm install
  2. Clear locally cached files from built electron app, if any rm -rf ~/Library/Application\ APP_NAME_HERE
  3. Build the electron application.
  4. Open the application - it will proceed to start up, send a "quit" event and relaunch the app. This only happens when launching the app for the first time, and if there are no previously cached app files present.

Questions

After seeing this issue, I switched the electron version to v1.8.7, reinstalled the dependencies, and removed the application files that were cached on my system; the issue no longer occurs. Could this potentially have to do with missing plugin dlls when the application is initially launched?

"Unknown Error" when loading persistent license

Windows 10
Using this release: https://github.com/castlabs/electron-releases.git#v1.8.7-hdcp-vmp1010
Building with electron-builder

My app does this:

  • Load a widevine-encrypted dash video, with a persistent license.
  • Get playback
  • Unload the video
  • Load the same dash video, reusing the same session
  • Get playback.

This works when my app is started with electron ., but when I build the app into an executable using electron-builder, it fails at the final step. It can never replay the video using the saved session.

Instead I get this error: Could not load session (C6898B8297A8EA31040DB3E6E5A74E4C)! UnknownError

after doing: mediaKeys.createSession(sessionType).load(sessionId)

Electron 7.0.0 - wrong mirrorOptions url in install.js

Hi,

I am trying to install electron v7.0.0-wvvmp using package.json :

"electron": "git+https://github.com/castlabs/electron-releases#v7.0.0-wvvmp"

But installation failed :
node install.js

(node:15582) UnhandledPromiseRejectionWarning: RequestError: connect ECONNREFUSED 140.82.118.4:443
at ClientRequest.request.once.error (....

Using electron 6.1.x, in install.js script, the mirrorOptions is "https://github.com/castlabs/electron-releases/releases/download/v" whereas for electron 7.0.0 it is "https://github.com/castlabs/electron-releases/releases/download/"

Can you check please

Jérémie

Is Mac 10.9 supported?

A week ago we started shipping our app based on v1.8.3-vmp1010 to Mac users. We've since received a number of complaints from users saying that they're unable to run the app and are getting a message advising them to check the app is compatible with their version of the OS (Mac 10.9).

More technical users have supplied logs, which suggests the app is looking for, and not finding, the CoreBluetooth.framework (which is referenced from the Electron Framework, and I think Mac 10.10 and above only):

Dyld Error Message: Library not loaded: /System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth

A little digging in the Electron v1.8.x branch (ie brightray.gyp) didn't highlight any references to the framework. Before I dug any deeper I wanted to make sure that the CoreBluetooth library wasn't a requirement for the Castlabs Electron build.

Installation with Yarn does not work since v3.0.0

Since version 3.0.0, electron-releases can no longer be installed using Yarn.

An example with v3.0.2: the URL used by Yarn to download the dependency on MacOs is https://github.com/castlabs/electron-releases/releases/download/vv3.0.2-wvvmp/electron-vv3.0.2-wvvmp-darwin-x64.zip. Note the double v in the URL before the version number.

Is it due to the value of the version key in package.json? In version 1.8.8, the value is 1.8.8-vmp1010. In version 3.0.0-wvvmp-beta.9, the value is v3.0.0-wvvmp-beta.9. The value now starts with a v.

Suggestion: Add Widevine-specific events to Electron.App type definitions

It would be nice if the Electron.App type definitions included the extra Widevine events.

interface App extends EventEmitter {

on(event: 'widevine-error', listener: (error: Error) => void): this;
once(event: 'widevine-error', listener: (error: Error) => void): this;

on(event: 'widevine-ready', listener: (version: string) => void): this;
once(event: 'widevine-ready', listener: (version: string) => void): this;

on(event: 'widevine-update-pending', listener: (currentVersion: string, pendingVersion: string) => void): this;
once(event: 'widevine-update-pending', listener: (currentVersion: string, pendingVersion: string) => void): this;

Code signing failure using electron-vmp

Hi

We use this version of electron to build an application able to play downloaded streams (using downstream-electron) with persistent licence.
In dev, it is OK.
But when we want to build the application, using electron-builder, there is an error with code signing. This error doesn't occurs with the official electron release.

In the file I give, you will find 2 files packages.json, one pointing to your electron release, one pointing to official release. The sample is based upon electron-vue sample

test_castlabs.zip

I have the error on MacOsx. To reproduce, you'll have to create a code signing certificate usig xcode (https://developer.apple.com/support/code-signing/), then try to build the application :
npm install
npm run build

Jérémie

Is controlling when the CDM upgrades possible?

For rights reasons we geo ip block out of country downloads, this includes license issue. However we support download in country and watch anywhere (with persistent licenses) but users are getting tripped up by CDM upgrades requiring license reissue. In one case a charity worker arrived abroad with enough content to cover the 3 months they were away to find they couldn't watch it.

Obviously there's going to be scenarios where the CDM needs upgrading regardless. However I don't know what the policy actually is, so might there be some room for being able to control when an upgrade happens?

Linux Snap Packing

Hello,
I am the developer on a project called Electron Player and I recently moved to use your package for the Linux version of the app (couldn't get Mac working but that's another problem). I package the app using electron-builder and for one of my publishing platforms, I am using snapcraft as it is popular on Linux. I had to pull the update changing to your package as I noticed it would not launch and after some debugging, I am pretty sure the cause is your package. It works outside of the snap environment but inside it does not. Snapcraft sandboxes applications running in it and looking at the logs it is blocking a sysctl call. I assume whatever this call is it is being blocked and is causing everything after to fail and hence the app to never launch. Is there a possible fix for this? My codebase is linked above and the error it is showing in the snap developer logs when starting the application is below. I also need to try and fix this as fast as possible as I moved to your package as a fix to the broken Netflix player, one of the main functions of the application.

= AppArmor =
Time: Jun 18 19:22:14
Log: apparmor="DENIED" operation="open" profile="snap.electronplayer.electronplayer" name="/proc/11538/setgroups" pid=11538 comm="electronplayer" requested_mask="w" denied_mask="w" fsuid=1000 ouid=1000
File: /proc/11538/setgroups (write)
Suggestion:
* adjust program to not access '@{PROC}/@{pid}/setgroups'

All your help will be appreciated

Unable to create the CDM for the key system com.widevine.alpha

I've been trying to activate our widevine implementation based on shaka player, but I've been getting this error from the browser:

Unable to create the CDM for the key system com.widevine.alpha

I haven't got a publicly accessible version of the problem, but this site displays the same issue:

https://bitmovin.com/mpeg-dash-hls-drm-test-player/

It works fine on Chrome, but since the error message is coming from the browser, there's not much I can do to debug it.

Clarifying behaviour when widevine-ready fires after upgrade to v3

I'm working on our next release which sees us moving up to Electron v3. Reading your docs on widevine-ready I understood the event fires once it's possible to use the CDM. However it always fires during upgrade scenarios where the older, existing 1.4.8 version of the CDM is loaded into v3, this isn't something I'd anticipated. As all our licences are persistent this leaves us with content that doesn't play (as expected).

The widevine-update-pending then fires shortly after and on restarting the app and re-fetching the licences all is well again.

As this leaves users without the ability to play content in the interim period I've got a few questions:

  • If licenses are re-fetched with v3 and 1.4.8 will they work, are they restricted ie online only?
  • I'm expecting widevine-update-pending to fire at any point the app is running, are the actual cases more restricted than that?
  • Are clients expected to maintain a compatible list of CDM versions based on the features they want then fail to holding/error states until a suitable widevine-update-pending event fires? If so what are the rules?

When packing apps for the Windows Store, Widevine is not correctly loaded

When you package an app for the windows store the folder:

%USERPROFILE%\AppData\Roaming\<app name>

Is virtualized in

%USERPROFILE%\AppData\Local\Pacakges\<windows package name>LocalCache\Roaming\<app name>

The WidevineCDM directory is then created under the virtulized folder, and on some computer, this makes widevine to not initialize corretly: the event ready is received but it is impossible to use any DRM protected content (e.g. Spotify SDK).

Manually moving the WidevineCDM directory from the virtualized folder to the "real" folder solves the issue.
This didn't happened with previous versions of Widevine/Electron (we used 4.1.5 without any issue; the problem started moving to electron 7.X).

Is it possible to configure the path to use for downloading the Widevine files, so that the access to that is direct and not somehow virtualized?

ARM Linux support

Hi,
I would like to develop a Widevine enabled player for Linux based OS and ARM architecture. I would like to know if such combination of operating system and architecture is supported by electron.
In case it is not supported, are you planning to add it in future?
Best regards,
Roberto

Playback stuttering issue / Electron update

Hello,
We are experiencing some playback stuttering for audio streaming using your latest release and Shaka player on both Mac and Windows. This seems to happen when the browser thread is very busy, like with navigating to or scrolling heavy pages. The same set-up works fine in current Chrome (68).

We have tested older Chrome versions, and it seems this issue was fixed between Chrome 63 and 64, so my question is: will you soon provide a build based on Electron 3.0? (as that is based on Chromium 66) I realize that is still in beta, but figured it might be worth to ask :-)

Mac build of v1.8.7-hdcp-vmp1010 fails Gatekeeper acceptance

During our build we use spctl --ignore-cache --no-cache --assess --type execute "$APP_DIR" to verify Gatekeeper will be ok with the release.

With v1.8.7-hdcp-vmp1010 this fails with rejected (invalid destination for symbolic link in bundle). The link is Electron.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries, so it's easy to remove.

To be honest I don't know enough about Gatekeeper to be sure of the effect of leaving the link in the app bundle. It might mean users would have to lower the security level to allow apps downloaded from anywhere - but it might mean it's just not valid for the app store and not be relevant.

This is more to document the issue than request a fix so please just close this unless you think I've missed something.

Building applications with electron-packager results in an error

Context

  • Electron version: v1.8.7-hpcp-vmp1010
  • Operating system: MacOS High Sierra
  • Node version: v6.13
  • electron-packager 12.0.1 to build the Mac application (I see electron-release is using "^3.0.1")
  • electron-winstaller to build the Win application

Questions

  1. Do I need to build the unsigned version of my application with castlabs/electron-releases?
  2. Can I build the unsigned version of my app with electron/electron and then sign it using the script provided by castlabs/electron-releases?
  3. What is the recommended way to build the unsigned versions of the app? Or documentation regarding it?

What I have tried

  • I tried building with electron: "1.8.7", but then when I run your python script, it completes without an error and without creating signed applications
  • When I try to build the unsigned applications with v1.8.7-hpcp-vmp1010, electron-packager fails with an error because it creates the wrong url Downloading tmp-13310-0-electron-v1.8.7-hdcp-vmp1010-win32-x64.zip Error: GET https://github.com/electron/electron/releases/download/v1.8.7-hdcp-vmp1010/electron-v1.8.7-hdcp-vmp1010-win32-x64.zip returned 404. This is obviously the wrong url.
  • I am debugging into electron-packager, but I thought I would ask in parallel to doing that
    EDIT:
  • Ah, get baseUrl () { return process.env.NPM_CONFIG_ELECTRON_MIRROR || process.env.npm_config_electron_mirror || process.env.ELECTRON_MIRROR || this.opts.mirror || 'https://github.com/electron/electron/releases/download/v' }, environment variables to change where the download comes from.

Updates

  • Got the app building with "electron": "https://github.com/castlabs/electron-releases#v1.8.7-hdcp-vmp1010" with electron-packager by setting one of those environment variables (export NPM_CONFIG_ELECTRON_MIRROR=https://github.com/castlabs/electron-releases/releases/download/v
  • the signing only works for the Window .exes because electron-packager chose to download https://github.com/castlabs/electron-releases/releases/download/v1.8.7-hdcp-vmp1010/electron-v1.8.7-hdcp-vmp1010-win32-ia32.zip' and not the darwin one, so now I am debugging that
  • the signing creates a .sig file, which I assume is going to get picked up by Widevine in the application by the .sig being in the same folder as the .exe, is that correct?
  • Writing this all here to help future engineers

Video's dont play

Maybe i am doing this wrong but i cant seem to get netflix videos to play using a BrowserView.
This is the code that i use:
let browser = new BrowserView({ webPreferences: { plugins: true }}); const toolbarHeight = Platform.isWindows()? 75 : 65; browser.setAutoResize({width: true, height: true}); mainWindow.addBrowserView(browser);

I added this to my package.json:

"electron": "https://github.com/castlabs/electron-releases#v7.1.14-wvvmp"

The widevine-ready event is triggered.
The widevine-error event is not triggered

Incorrect version for node type definitions

I believe this is the same issue as #16, but now this project's node type definitions are pinned to 8 and Electron has been on Node.js 10+ since v3.

"@types/node": "^8.0.24",

https://electronjs.org/releases/stable?version=3&page=6#3.0.0

error TS4090: Conflicting definitions for 'node' found at '.../node_modules/@types/node/index.d.ts' and '.../node_modules/electron/node_modules/@types/node/ts3.2/index.d.ts'. Consider installing a specific version of this library to resolve the conflict.

It might be easier to use "@types/node": "*" so that it uses the same version as the application instead of bringing in its own potentially conflicting version.

Electron 6.1.3 - missing SHASUM256.txt file

Hi,

Using npm, electron 6.1.3 cannot be installed, because SHASUM256.txt is missing:

Here is the log :
node install.js

Downloading tmp-15326-0-SHASUMS256.txt-6.1.3-wvvmp
Error: GET https://github.com/castlabs/electron-releases/releases/download/v6.1.3-wvvmp/SHASUMS256.txt returned 404

/Users/jeremie/Documents/01-Taf/01-Dev/PlayerJavascript/gitlab/LVO/sources/node_modules/electron/install.js:54
throw err
^

Error: Failed to find Electron v6.1.3-wvvmp for darwin-x64 at https://github.com/castlabs/electron-releases/releases/download/v6.1.3-wvvmp/electron-v6.1.3-wvvmp-darwin-x64.zip

Jérémie

Incorrect version for node type definitions

The package.json has type definitions for Node.js 7, I believe coming from here:

"@types/node": "^7.0.18",

But Electron 1.8.1+ uses Node.js 8

https://electronjs.org/releases#1.8.1

This causes warnings when you try to use this package with an application that has a dependency on the Node.js 8 type definitions.

error TS4090: Conflicting definitions for 'node' found at '.../node_modules/@types/node/index.d.ts' and '.../node_modules/electron/node_modules/@types/node/index.d.ts'. Consider installing a specific version of this library to resolve the conflict.

Support for bundling Widevine into the installation package

It appears that currently the Widevine components are retrieved from the network and installed when our application is first launched. This is causing permission issues for us in a centralized deployment scenario on Windows, where the application is installed by IT admins but run by users in a locked-down environment. Is there any way to ensure that the Widevine components are available for a user as part of the installation process?

We're currently using 3.0.2-wvvmp

Unable to use vmp-resign.py

Windows 10
Python 3.6.5
pip 9.0.3

After doing:

pip install cryptography
pip install macholib
pip install file-magic

I try to do:
vmp-resign.py -h

and I get:

\node_modules\electron>vmp-resign.py -h
Traceback (most recent call last):
  File "C:\Users\XXXX\Desktop\Projects\XXXX\XXXX-electron\node_modules\electron\vmp-resign.py", line 16, in <module>
    import magic
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\magic.py", line 23, in <module>
    _libraries['magic'] = _init()
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\magic.py", line 20, in _init
    return ctypes.cdll.LoadLibrary(find_library('magic'))
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python36-32\lib\ctypes\__init__.py", line 426, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\XXXX\AppData\Local\Programs\Python\Python36-32\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None

And if I do

python vmp-resign.py -h

I get

Traceback (most recent call last):
  File "vmp-resign.py", line 6, in <module>
    from cryptography.hazmat import backends
ImportError: No module named cryptography.hazmat

Also, I found a widevine certificate at https://storage.googleapis.com/wvdownload/cert_license_widevine.tgz from widevine's news page: https://www.widevine.com/product_news.html

I see that the tool also takes a "key", which is a required parameter. What is this key? Can you direct me towards a resource that can help me create one, for developer purposes?

Thanks

Help understanding migration docs

I'm having trouble understanding what is meant to be done to mitigate the issues that can be caused by migration:

Due to a changes in the key system id used between major and/or certain vulnerable versions of the Widevine CDM previously persisted licenses cannot be automatically migrated when such a CDM upgrade occurs. The recommended workaround is to listen for the widevine-ready event and then trigger a manual re-fetch of all persisted licenses in case an update was applied, i.e. if lastVersion is not null and not equal to version (or at least verify the loadability of previously persisted licenses). Also, the first request for a new license, temporary or persistent, after such an upgrade will fail with the CDM error Rejected with system code (75) (the same error as when trying to load a session persisted with the previous CDM). This happens because the CDM needs to update the storage to match the new system id. The suggested solution is to simply retry the request in such cases, as all subsequent requests should work as usual.

How can I achieve the bolded? Does relaunching the app in the widevine-ready event trigger a manual re-fetch or is there another method?

Mouse select event hides is considered like a click event

Hello,
I face a problem since passing to electron castlabs 7.1.7.
In fact, the mouse event when selecting the text on the input, is considered like a click event, when the cursor passes over the dimmer (the black zone around the modal). (see attached video with electron 7.1.7).
That works fine with electron 4.1.5 (see attached video with electron 4.1.5)
Anyone have any ideas about this please ?
Thanks.
Dhouha.

with Electron 7.1.7.zip
with Electron 4.1.5.zip

Widevine not appearing as a plugin

I have taken the quick start repo from electron and used the documented string for electron dependency in package.json and console says widevine loads correctly but console.dir(navigator.plugins) returns an empty array and trying to play drm content fails.

Here is the code in main.js

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

app.on('widevine-ready', createWindow)

And console shows
Widevine 1.4.9.1088 is ready to be used!

But widevine content does not play.

Failing on certain versions of MacOS

I am facing the following issue (seems identical to this issue) but on castlabs release v5) reported on certain macOS versions. Yosemite, El Capitan, Sierra and Mojave. Only High Sierra has had no failures reported so far (which is also the macOS version that I built and signed the app on, but that may be coincidental.) I have access to a Mojave system, and the problem is not reproducible there.

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
Symbol not found: _kSecAttrKeyTypeECSECPrimeRandom
Referenced from: /Applications/indee.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework
Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
in /Applications/indee.app/Contents/MacOS/../Frameworks/Electron Framework.framework/Electron Framework

Is this an issue with the castlabs electron-fork? How do I resolve this? Thank you.

CDM not loading on Windows 10 networked appdata folders

We've received the following from a user who is trying to upgrade a few machines to use the latest version of our app. It's based on v7.1.9-wvvmp v7.1.1-wvvmp and trying to load v4.10.1582.2 v4.10.1582.1 of the CDM. The user is running Windows 10 1809, and their logs don't show anywidevine- events.

I believe the app has a problem because when running as a user without appdata re-directed, all the appdata is stored in c:\users\user\appdata eg \local\BBCiPlayerDownloads \roaming\BBCiPlayerDownloads
when the user (even an admin user) has their home folder re-directed, they have split appdata
so c:\users\user\appdata\local\BBCiPlayerDownloads and \network_path\user\appdata\BBCiPlayerDownloads app (for roaming)
It looks to me maybe that the app doesn't like this split, as the same computer will run BBCiPlayerDownloads app on a user logged in without folder redirection.

This looks as though it's in the same area as #50 with the CDM being affected by filesystem virtualisation/redirection. Does this sound reasonable? The difference being that widevine-ready doesn't fire, and versions of Windows pre-dates the version expected to cause problems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.