mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Small improvements
This commit is contained in:
parent
19d3b559da
commit
0c38f42197
13 changed files with 54 additions and 83 deletions
|
|
@ -44,15 +44,19 @@ class Audio {
|
|||
}
|
||||
|
||||
createNewObject() {
|
||||
const player = window.Audio ? new window.Audio() : null;
|
||||
if (player && player.canPlayType && player.pause && player.play) {
|
||||
player.preload = 'none';
|
||||
player.loop = false;
|
||||
player.autoplay = false;
|
||||
player.muted = false;
|
||||
}
|
||||
try {
|
||||
const player = window.Audio ? new window.Audio() : null;
|
||||
if (player && player.canPlayType && player.pause && player.play) {
|
||||
player.preload = 'none';
|
||||
player.loop = false;
|
||||
player.autoplay = false;
|
||||
player.muted = false;
|
||||
}
|
||||
|
||||
return player;
|
||||
return player;
|
||||
} catch (e) {} // eslint-disable-line no-empty
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
paused() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue