mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-24 02:36:00 +00:00
13 lines
336 B
JavaScript
13 lines
336 B
JavaScript
Browser = {
|
|
isCompatible: function() {
|
|
return this._supportsAudioApi() && this._supportsCanvas();
|
|
},
|
|
|
|
_supportsAudioApi: function() {
|
|
return !!(window.AudioContext || window.webkitAudioContext);
|
|
},
|
|
_supportsCanvas: function() {
|
|
return !!document.createElement('canvas').getContext;
|
|
}
|
|
};
|
|
|