Giter Site home page Giter Site logo

liufeigit / audion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlechrome/audion

1.0 3.0 0.0 1.92 MB

Audion (Web Audio Inspector) is a Chrome extension that adds a Web Audio panel to Developer Tools. This panel visualizes the web audio graph in real-time and lets users inspect nodes.

Home Page: https://chrome.google.com/webstore/detail/web-audio-inspector/cmhomipkklckpomafalojobppmmidlgl

License: Apache License 2.0

JavaScript 94.18% HTML 3.54% CSS 1.46% Python 0.83%

audion's Introduction

Web Audio Inspector

Web Audio Inspector is a Chrome extension that adds a "Web Audio" panel to Developer Tools. This panel visualizes the AudioNode graph generated by Web Audio API JavaScript. Install the extension from its Chrome Web Store page.

Web Audio Inspector

The wiki details how to use Web Audio Inspector.

No Support for ES6 Classes at the Moment

This extension breaks ES6 classes that extend subclasses of AudioNode. See issue #73. Web Audio Inspector's logic for overriding AudioNode constructors disallows classes from extending those constructors. We are trying to resolve this issue.

Development

Build Dependencies

Contribution

We welcome contributions. See the issues list, or suggest ideas. For starters, we currently have some usability and visualization issues that need owners.

  1. Review CONTRIBUTING.md. Note that Google requires contributors to sign a Contributors License Agreement.
  2. Set up 2-factor authentication for Github (as Google requires).
  3. Clone the repository with the git@ address. The https address does not work with 2-factor authentication.

Build and run

Run the following commands in the project root directory.

npm install   # Install Node modules
gulp          # Build the extension

Then load the build directory as an unpacked Chrome extension.

Code Layout

This project uses the Google Closure JavaScript library and Google's JavaScript style guide.

The extension comprises of several scripts. Each script corresponds to a Closure entry point (JS file) within js/entry-points.

  • tracing.js: The tracing code is run before any scripts of a web page run. It adds tracking code to functions of the Web Audio API.
  • inject-tracing.js: This script injects the tracing code (above) into a web page. It is a content script.
  • background.js: The background script routes messages to and from various scripts. For instance, web audio updates from content scripts are routed to the corresponding dev tools scripts.
  • dev-tools.js: The dev tools script is run when the user opens Chrome Developer Tools. The script adds a Web Audio panel to Developer Tools. It routes messages to logic within the panel.
  • panel.js: This script manages the UI for the panel within Developer Tools. It uses JointJS for rendering graphs and dagre for layout.
  • tab-page-changed.js: This simple script detects when the URL within a tab changes.

Testing

Tests reside in the tests directory and use Closure's jsunit library. Tests run in a web browser. Each test has a _test.html file (which sets up DOM elements required by the test) and a _test.js file (which contains the bulk testing logic). To run all tests at once,

  1. Run npm install to update dependencies if you have not done so.
  2. Run gulp test to start a static server. This command also uses your default browser (preferably Google Chrome) to open a web page (pictured below) for running all tests at once.

Web Audio Inspector

To run tests individually, you can use that UI as well, or you could visit the path to that test's _test.html file.

audion's People

Contributors

chihuahua avatar hoch avatar

Stargazers

van avatar

Watchers

James Cloos avatar van avatar  avatar

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.