sylwesterdigital / AudioContext-Polyfill

Polyfill for 'AudioContext' of Web Audio API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Polyfill for 'AudioContext' of Web Audio API

License:MIT License


Languages

Language:JavaScript 97.1%Language:Shell 2.9%