mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 17:18:52 +00:00
13 lines
310 B
JavaScript
13 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;
|
|
}
|
|
});
|
|
|