Skip to content

Commit

Permalink
Updated for v8.4.0-wvvmp
Browse files Browse the repository at this point in the history
  • Loading branch information
khwaaj committed Jul 8, 2020
1 parent 93b19c1 commit 598a88b
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 30 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# castLabs Electron v8.3.4 for Content Security
# castLabs Electron v8.4.0 for Content Security

Check out the [Wiki](https://github.com/castlabs/electron-releases/wiki) for general news and other updates.

Expand All @@ -12,7 +12,7 @@ The provided builds are VMP-signed for development use, i.e. using Widevine UAT

The sections below will describe the additions to the Electron APIs, for anything else refer to the regular Electron documentation:

[Electron README](https://github.com/electron/electron/blob/v8.3.4/README.md)
[Electron README](https://github.com/electron/electron/blob/v8.4.0/README.md)

> **NOTE**: The section about Widevine DRM in the regular Electron documentation does not apply to this fork of Electron since the Widevine components are now automatically installed and configured.
Expand All @@ -30,11 +30,11 @@ becomes:

```
"dependencies": {
"electron": "https://github.com/castlabs/electron-releases#v8.3.4-wvvmp"
"electron": "https://github.com/castlabs/electron-releases#v8.4.0-wvvmp"
}
```

The `#v8.3.4-wvvmp` part of the URL references a specific release tag for Electron for Content Security, if it is left out the master branch will be tracked instead.
The `#v8.4.0-wvvmp` part of the URL references a specific release tag for Electron for Content Security, if it is left out the master branch will be tracked instead.

## Migrating from an earlier castLabs Electron for Content Security release

Expand Down Expand Up @@ -66,7 +66,7 @@ Widevine CDM verification/installation/update is normally automatically triggere
### `app.verifyWidevineCdm([options])`

* `options` Object (optional)
* `session` [Session](https://github.com/electron/electron/blob/v8.3.4/docs/api/session.md) (optional)
* `session` [Session](https://github.com/electron/electron/blob/v8.4.0/docs/api/session.md) (optional)
* `disableUpdate` boolean (optional)

Initiates asynchronous Widevine CDM verify/install/update procedure and returns no value. Once initiated Widevine related events will be emitted as necessary, namely `widevine-ready`, `widevine-update-pending` & `widevine-error`. Unless the `no-verify-widevine-cdm` command line parameter is set this API is automatically triggered on startup and should not be called manually. If customized options are necessary `no-verify-widevine-cdm` should be set and the API call made once, very early, after the app has received the `ready` event (but before loading any media-related content to avoid potentially requiring a restart).
Expand Down
111 changes: 87 additions & 24 deletions electron.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for Electron 8.3.4
// Type definitions for Electron 8.4.0
// Project: http://electronjs.org/
// Definitions by: The Electron Team <https://github.com/electron/electron>
// Definitions: https://github.com/electron/electron-typescript-definitions
Expand Down Expand Up @@ -607,8 +607,21 @@ You should call `event.preventDefault()` if you want to handle this event.
webContents: WebContents,
moduleName: string) => void): this;
/**
* Emitted when the renderer process of `webContents` crashes or is killed.
*/
* Emitted when the renderer process unexpectedly dissapears. This is normally
* because it was crashed or killed.
*/
on(event: 'render-process-gone', listener: (event: Event,
webContents: WebContents,
details: Details) => void): this;
once(event: 'render-process-gone', listener: (event: Event,
webContents: WebContents,
details: Details) => void): this;
addListener(event: 'render-process-gone', listener: (event: Event,
webContents: WebContents,
details: Details) => void): this;
removeListener(event: 'render-process-gone', listener: (event: Event,
webContents: WebContents,
details: Details) => void): this;
on(event: 'renderer-process-crashed', listener: (event: Event,
webContents: WebContents,
killed: boolean) => void): this;
Expand Down Expand Up @@ -3494,6 +3507,9 @@ This cannot be called when `titleBarStyle` is set to `customButtonsOnHover`.
*
* Get a set of category groups. The category groups can change as new code paths
* are reached. See also the list of built-in tracing categories.
*
* > **NOTE:** Electron adds a non-default tracing category called `"electron"`.
* This category can be used to capture Electron-specific tracing events.
*/
getCategories(): Promise<string[]>;
/**
Expand Down Expand Up @@ -3789,7 +3805,12 @@ Sets a cookie with `details`.
* Event parameters defined by the 'parameters' attribute in the remote debugging
* protocol.
*/
params: any) => void): this;
params: any,
/**
* Unique identifier of attached debugging session, will match the value sent from
* `debugger.sendCommand`.
*/
sessionId: string) => void): this;
once(event: 'message', listener: (event: Event,
/**
* Method name.
Expand All @@ -3799,7 +3820,12 @@ Sets a cookie with `details`.
* Event parameters defined by the 'parameters' attribute in the remote debugging
* protocol.
*/
params: any) => void): this;
params: any,
/**
* Unique identifier of attached debugging session, will match the value sent from
* `debugger.sendCommand`.
*/
sessionId: string) => void): this;
addListener(event: 'message', listener: (event: Event,
/**
* Method name.
Expand All @@ -3809,7 +3835,12 @@ Sets a cookie with `details`.
* Event parameters defined by the 'parameters' attribute in the remote debugging
* protocol.
*/
params: any) => void): this;
params: any,
/**
* Unique identifier of attached debugging session, will match the value sent from
* `debugger.sendCommand`.
*/
sessionId: string) => void): this;
removeListener(event: 'message', listener: (event: Event,
/**
* Method name.
Expand All @@ -3819,7 +3850,12 @@ Sets a cookie with `details`.
* Event parameters defined by the 'parameters' attribute in the remote debugging
* protocol.
*/
params: any) => void): this;
params: any,
/**
* Unique identifier of attached debugging session, will match the value sent from
* `debugger.sendCommand`.
*/
sessionId: string) => void): this;
/**
* Attaches the debugger to the `webContents`.
*/
Expand All @@ -3839,7 +3875,7 @@ Sets a cookie with `details`.
*
Send given command to the debugging target.
*/
sendCommand(method: string, commandParams?: any): Promise<any>;
sendCommand(method: string, commandParams?: any, sessionId?: string): Promise<any>;
}

interface DesktopCapturer {
Expand Down Expand Up @@ -5677,6 +5713,8 @@ Starts recording network events to `path`.
removeListener(event: 'on-battery', listener: Function): this;
/**
* Emitted when system is resuming.
*
* @platform linux,win32
*/
on(event: 'resume', listener: Function): this;
once(event: 'resume', listener: Function): this;
Expand All @@ -5696,6 +5734,8 @@ Starts recording network events to `path`.
removeListener(event: 'shutdown', listener: Function): this;
/**
* Emitted when the system is suspending.
*
* @platform linux,win32
*/
on(event: 'suspend', listener: Function): this;
once(event: 'suspend', listener: Function): this;
Expand Down Expand Up @@ -6652,7 +6692,7 @@ Clears the host resolver cache.
* `session`. Returning `true` will allow the permission and `false` will reject
* it. To clear the handler, call `setPermissionCheckHandler(null)`.
*/
setPermissionCheckHandler(handler: ((webContents: WebContents, permission: string, requestingOrigin: string, details: Details) => boolean) | (null)): void;
setPermissionCheckHandler(handler: ((webContents: WebContents, permission: string, requestingOrigin: string, details: PermissionCheckHandlerHandlerDetails) => boolean) | (null)): void;
/**
* Sets the handler which can be used to respond to permission requests for the
* `session`. Calling `callback(true)` will allow the permission and
Expand Down Expand Up @@ -7091,7 +7131,11 @@ Returns an object with system animation settings.
* consent for `microphone` and `camera` access. macOS 10.15 Catalina or higher
* requires consent for `screen` access.
*
* @platform darwin
* Windows 10 has a global setting controlling `microphone` and `camera` access for
* all win32 applications. It will always return `granted` for `screen` and for all
* media types on older versions of Windows.
*
* @platform win32,darwin
*/
getMediaAccessStatus(mediaType: 'microphone' | 'camera' | 'screen'): ('not-determined' | 'granted' | 'denied' | 'restricted' | 'unknown');
/**
Expand Down Expand Up @@ -9042,6 +9086,18 @@ The usage is the same with the `login` event of `app`.
moduleName: string) => void): this;
removeListener(event: 'remote-require', listener: (event: IpcMainEvent,
moduleName: string) => void): this;
/**
* Emitted when the renderer process unexpectedly dissapears. This is normally
* because it was crashed or killed.
*/
on(event: 'render-process-gone', listener: (event: Event,
details: Details) => void): this;
once(event: 'render-process-gone', listener: (event: Event,
details: Details) => void): this;
addListener(event: 'render-process-gone', listener: (event: Event,
details: Details) => void): this;
removeListener(event: 'render-process-gone', listener: (event: Event,
details: Details) => void): this;
/**
* Emitted when the unresponsive web page becomes responsive again.
*/
Expand Down Expand Up @@ -11509,21 +11565,9 @@ See webContents.sendInputEvent for detailed description of `event` object.

interface Details {
/**
* The security orign of the `media` check.
* The reason the render process is gone. Possible values:
*/
securityOrigin: string;
/**
* The type of media access being requested, can be `video`, `audio` or `unknown`
*/
mediaType: ('video' | 'audio' | 'unknown');
/**
* The last URL the requesting frame loaded
*/
requestingUrl: string;
/**
* Whether the frame making the request is the main frame
*/
isMainFrame: boolean;
reason: ('clean-exit' | 'abnormal-exit' | 'killed' | 'crashed' | 'oom' | 'launch-failure' | 'integrity-failure');
}

interface DidChangeThemeColorEvent extends Event {
Expand Down Expand Up @@ -12504,6 +12548,25 @@ See webContents.sendInputEvent for detailed description of `event` object.
quantity: number;
}

interface PermissionCheckHandlerHandlerDetails {
/**
* The security orign of the `media` check.
*/
securityOrigin: string;
/**
* The type of media access being requested, can be `video`, `audio` or `unknown`
*/
mediaType: ('video' | 'audio' | 'unknown');
/**
* The last URL the requesting frame loaded
*/
requestingUrl: string;
/**
* Whether the frame making the request is the main frame
*/
isMainFrame: boolean;
}

interface PermissionRequestHandlerHandlerDetails {
/**
* The url of the `openExternal` request.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"node": ">= 8.6"
},
"name": "electron",
"version": "8.3.4-wvvmp",
"version": "8.4.0-wvvmp",
"repository": "https://github.com/castlabs/electron-releases",
"description": "Build cross platform desktop apps with JavaScript, HTML, CSS, and Widevine DRM protection",
"license": "MIT",
Expand Down

0 comments on commit 598a88b

Please sign in to comment.