mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 19:13:54 +00:00
Check for Promise support
Fixes: https://sentry.io/share/issue/b9bbf4221e3e48f0906b6d57dbfde1a8/
This commit is contained in:
parent
ae2c51a734
commit
e357130e02
2 changed files with 4 additions and 3 deletions
|
|
@ -18,8 +18,8 @@
|
|||
<body>
|
||||
<div id='winamp2-js'></div>
|
||||
<div id='browser-compatibility'>
|
||||
<p>Your browser does not support the features we need</p>
|
||||
<p>Try using the most recent version of Chrome, Firefox, Safari or Edge</p>
|
||||
<p>Your browser does not support the features we need.</p>
|
||||
<p>Try using the most recent version of Chrome, Firefox, Safari or Edge.</p>
|
||||
</div>
|
||||
<p class='about'>
|
||||
by <a href='https://twitter.com/captbaritone'>@captbaritone</a> -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export default function(base) {
|
||||
const supportsAudioApi = !!(base.AudioContext || base.webkitAudioContext);
|
||||
const supportsCanvas = !!base.document.createElement("canvas").getContext;
|
||||
const supportsPromises = typeof Promise !== "undefined";
|
||||
|
||||
this.isCompatible = supportsAudioApi && supportsCanvas;
|
||||
this.isCompatible = supportsAudioApi && supportsCanvas && supportsPromises;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue