mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-18 15:41:05 +00:00
30 lines
796 B
JavaScript
30 lines
796 B
JavaScript
/*!
|
|
{
|
|
"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;
|
|
});
|
|
});
|