mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
cleanup webpack
This commit is contained in:
parent
6d29acb7eb
commit
ecbe543b15
10 changed files with 44 additions and 68 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import window from 'window';
|
||||
import { bMobileDevice, bSafari } from 'Common/Globals';
|
||||
import * as Links from 'Common/Links';
|
||||
import * as Events from 'Common/Events';
|
||||
|
||||
|
|
@ -16,7 +15,8 @@ class Audio {
|
|||
constructor() {
|
||||
this.player = this.createNewObject();
|
||||
|
||||
this.supported = !bMobileDevice && !bSafari && !!this.player && !!this.player.play;
|
||||
// Safari can't play without user interaction
|
||||
this.supported = !!this.player && !!this.player.play;
|
||||
if (this.supported && this.player && this.player.canPlayType) {
|
||||
this.supportedMp3 = !!this.player.canPlayType('audio/mpeg;').replace(/no/, '');
|
||||
this.supportedWav = !!this.player.canPlayType('audio/wav; codecs="1"').replace(/no/, '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue