ignore AbortError from audio.play()
This commit is contained in:
parent
92bead8b6b
commit
8229276683
@ -69,7 +69,15 @@ export class AudioController {
|
|||||||
this.audio.volume = 0.0
|
this.audio.volume = 0.0
|
||||||
|
|
||||||
if (options.paused !== true) {
|
if (options.paused !== true) {
|
||||||
|
try {
|
||||||
await this.audio.play()
|
await this.audio.play()
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name === 'AbortError') {
|
||||||
|
console.warn(error)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
throw error
|
||||||
|
}
|
||||||
this.fadeIn()
|
this.fadeIn()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user