Use bowser[browser name] for detection
Also, fix detection of IE so it works. Apparently bowser.name !== 'IE' on IE with bowser. bowser.msie works though.
This commit is contained in:
1 parent
317f11ed92
commit
c8182dd5bf
2 files changed
+4
-5
No files matched your search
@@ -2,7 +2,7 @@ import StartAudioContext from 'startaudiocontext';
|
||||
import bowser from 'bowser';
|
||||
|
||||
let AUDIO_CONTEXT;
|
||||
if (bowser.name !== 'IE') {
|
||||
if (!bowser.msie) {
|
||||
AUDIO_CONTEXT = new (window.AudioContext || window.webkitAudioContext)();
|
||||
|
||||
StartAudioContext(AUDIO_CONTEXT);
|
||||
|
||||
@@ -5,10 +5,9 @@ import bowser from 'bowser';
|
||||
* @returns {boolean} False if the platform is definitely not supported.
|
||||
*/
|
||||
export default function () {
|
||||
if (bowser.name === 'IE' ||
|
||||
bowser.name === 'Opera' ||
|
||||
bowser.name === 'Opera Mini' ||
|
||||
bowser.name === 'Silk') {
|
||||
if (bowser.msie ||
|
||||
bowser.opera ||
|
||||
bowser.silk) {
|
||||
return false;
|
||||
}
|
||||
// @todo Should also test for versions of supported browsers
|
||||
|
||||
Reference in new issue
Block a user