mirror of
https://github.com/captbaritone/webamp.git
synced 2026-11-10 10:01:32 -10:00
14 lines
310 B
JavaScript
14 lines
310 B
JavaScript
define({
|
|
isCompatible: function() {
|
|
return this._supportsAudioApi() && this._supportsCanvas();
|
|
},
|
|
|
|
_supportsAudioApi: function() {
|
|
return !!(window.AudioContext || window.webkitAudioContext);
|
|
},
|
|
_supportsCanvas: function() {
|
|
return !!document.createElement('canvas').getContext;
|
|
}
|
|
});
|
|
|