UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

30 lines (28 loc) 796 B
/*! { "name": "Web Audio API", "property": "webaudio", "caniuse": "audio-api", "polyfills": ["xaudiojs", "dynamicaudiojs", "audiolibjs"], "tags": ["audio", "media"], "builderAliases": ["audio_webaudio_api"], "authors": ["Addy Osmani"], "notes": [{ "name": "W3C Spec", "href": "https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html" }] } !*/ /* DOC Detects the older non standard webaudio API, (as opposed to the standards based AudioContext API) */ define(['Modernizr'], function(Modernizr) { Modernizr.addTest('webaudio', function() { var prefixed = 'webkitAudioContext' in window; var unprefixed = 'AudioContext' in window; if (Modernizr._config.usePrefixes) { return prefixed || unprefixed; } return unprefixed; }); });