add error handling

This commit is contained in:
Thomas Amland
2020-07-31 14:55:21 +02:00
parent 66678c5dee
commit 29c695bbc6
5 changed files with 46 additions and 2 deletions
+3
View File
@@ -124,4 +124,7 @@ export function connectAudioToStore(store: Store<any>) {
audio.onended = (event) => {
store.dispatch("player/playNext");
}
audio.onerror = (event) => {
store.commit("setError", audio.error);
}
}