feat(playback): handle audio play errors
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2469>
This commit is contained in:
parent
6b31cba294
commit
2aca2f18d5
|
@ -131,7 +131,12 @@ export class HTMLSound implements Sound {
|
||||||
}
|
}
|
||||||
|
|
||||||
async play () {
|
async play () {
|
||||||
return this.#audio.play()
|
try {
|
||||||
|
await this.#audio.play()
|
||||||
|
} catch (err) {
|
||||||
|
console.error('>> AUDIO PLAY ERROR', err, this)
|
||||||
|
this.isErrored.value = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async pause () {
|
async pause () {
|
||||||
|
|
Loading…
Reference in New Issue