Polyfill for 'AudioContext' of Web Audio API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

AudioContext-Polyfill

Bower version devDependency Status

Polyfill for AudioContext and its parties on Web Audio API

Installation

Bower

Download via Bower.

bower install --save audiocontext-polyfill

Or add audiocontext-polyfill to the bower.json of your project and run bower install.

{
  "dependencies": {
    "audiocontext-polyfill": "latest"
  }
{

Standalone

Download the script file directly.

Usage

Load audiocontext-polyfill.js before any scripts else related to Web Audio API.

After it loaded, you can use Web Audio API without any vendor prefixes or deprecated methods.

For example, you can create an audio context with new AudioContext() instead of new webkitAudioContext(), or play sounds with .start(0) instead of old API .noteOn(0).

Supported API

Clean API name deprecated or vendor-prefixed
AudioContext webkitAudioContext
OfflineAudioContext webkitOfflineAudioContext
start noteOn
stop noteOff
createGain createGainNode
createDelay createDelayNode
createScriptProcessor createJavaScriptNode

License

Copyright (c) 2013 - 2014 Shinnosuke Watanabe

Licensed under the MIT license.