fix glitch

This commit is contained in:
bkfox 2020-11-08 14:59:46 +01:00
parent 80a238094f
commit b07840b623
3 changed files with 12 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -178,8 +178,8 @@ export default {
this.$refs[p].unselect(); this.$refs[p].unselect();
}, },
/// Play a playlist's sound (by playlist name, and sound index) /// Load a sound from playlist or live
play(playlist=null, index=0) { load(playlist=null, index=0) {
let src = null; let src = null;
// from playlist // from playlist
@ -213,7 +213,10 @@ export default {
audio.src = src; audio.src = src;
} }
audio.load(); audio.load();
audio.play(); },
play(playlist=null, index=0) {
this.load(playlist, index);
audio.play().catch(e => console.error(e)) audio.play().catch(e => console.error(e))
}, },
@ -276,6 +279,10 @@ export default {
}, },
}, },
mounted() {
this.load();
},
components: { Playlist, Progress }, components: { Playlist, Progress },
} }
</script> </script>