-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devtools-page: connect to and process webaudio debugger events (#97)
* devtools-page: connect to and process webaudio debugger events Connect to WebAudio chrome debugger protocol domain and collect events into a larger AudioContext "graph". This object is collects the events into a current representation of WebAudio graphs in the inspected window. A graphlib graph will be derived from this information in a future change. - Add and test some internal utilities - Observer - Observer.throttle Used to limit the frequency of WebAudio representations to later process steps. - invariant - Add and test some types to process events - DevtoolsGraphPanel Create a chrome devtools panel and post graph updates to the panel. - WebAudioEventObserver Attach to chrome debugger api and forward WebAudio domain events. - WebAudioGraphIntegrator Collect WebAudio events into a current representation. * fixup! devtools-page: connect to and process webaudio debugger events * fixup! devtools-page: connect to and process webaudio debugger events * fixup! devtools-page: connect to and process webaudio debugger events * fixup! devtools-page: connect to and process webaudio debugger events * fixup! devtools-page: connect to and process webaudio debugger events * fixup! devtools-page: connect to and process webaudio debugger events * fixup! devtools-page: connect to and process webaudio debugger events * fixup! devtools-page: connect to and process webaudio debugger events
- Loading branch information
Showing
32 changed files
with
2,126 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,21 @@ | ||
This is a new branch for the Web Audio DevTools extension V2. | ||
# Audion: A Web Audio Inpsector | ||
|
||
## Development and Installation | ||
|
||
#### Build and test the extension | ||
|
||
1. Install NodeJS 14 or later. | ||
2. Install dependencies with `npm ci` or `npm install`. | ||
3. Run `npm test` to build and test the extension. | ||
|
||
#### Install the development copy of the extension | ||
|
||
1. Open `chrome://extensions` in Chrome. | ||
2. Turn on `Developer mode` if it is not already active. | ||
3. Load an unpacked extension with the `Load unpacked` button. In the file modal that opens, select the `audion` directory inside of the `build` directory under the copy of this repository. | ||
|
||
#### Use and make changes to the extension | ||
|
||
1. Open the added Web Audio panel in an inspector window with a page that uses the Web Audio api. | ||
2. Make changes to the extension and rebuild with `npm test` or `npm run build`. | ||
3. Open `chrome://extensions`, click `Update` to reload the rebuilt extension. Close and reopen any tab and inspector to get the rebuilt extension's panel. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// <reference path="./Debugger.js" /> | ||
/// <reference path="./DevTools.js" /> | ||
/// <reference path="./Runtime.js" /> | ||
|
||
/** | ||
* Top level chrome extension API type. Contains references of each accessible | ||
* extension api. | ||
* | ||
* @typedef Chrome.API | ||
* @property {Chrome.Debugger} debugger | ||
* @property {Chrome.DevTools} devtools | ||
* @property {Chrome.Runtime} runtime | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/// <reference path="Types.js" /> | ||
|
||
/** | ||
* [Chrome extension api][1] to the [Chrome Debugger Protocol][2]. Used by this | ||
* extension to access the [Web Audio domain][3]. | ||
* | ||
* [1]: https://developer.chrome.com/docs/extensions/reference/debugger/ | ||
* [2]: https://chromedevtools.github.io/devtools-protocol/ | ||
* [3]: ChromeDebuggerWebAudioDomain.html | ||
* | ||
* @typedef Chrome.Debugger | ||
* @property {function( | ||
* Chrome.DebuggerDebuggee, string, function(): void | ||
* ): void} attach | ||
* @property {function(Chrome.DebuggerDebuggee, function(): void): void} detach | ||
* @property {Chrome.Event<function(): void>} onDetach | ||
* @property {Chrome.Event<Chrome.DebuggerOnEventListener>} onEvent | ||
* @property {function(Chrome.DebuggerDebuggee, string): void} sendCommand | ||
* @see https://developer.chrome.com/docs/extensions/reference/debugger/ | ||
* @see https://chromedevtools.github.io/devtools-protocol/ | ||
*/ | ||
|
||
/** | ||
* A debuggee identifier. | ||
* | ||
* Either tabId or extensionId must be specified. | ||
* | ||
* @typedef Chrome.DebuggerDebuggee | ||
* @property {string} [extensionId] | ||
* @property {string} [tabId] | ||
* @property {string} [targetId] | ||
* @see https://developer.chrome.com/docs/extensions/reference/debugger/#type-Debuggee | ||
*/ | ||
|
||
/** | ||
* Arguments passed to Debugger onEvent listeners. | ||
* | ||
* @callback Chrome.DebuggerOnEventListener | ||
* @param {Chrome.DebuggerDebuggee} source | ||
* @param {string} method | ||
* @param {*} [params] | ||
* @return {void} | ||
*/ |
Oops, something went wrong.