save-and-restore-progress-for-audio fix #10 #16

Merged
artem merged 8 commits from save-and-restore-progress-for-audio into main 2023-09-19 16:34:57 +02:00
Showing only changes of commit 8248073a4d - Show all commits

View File

@ -65,9 +65,12 @@ export default {
this.audio.play();
},
pause() {
if (!this.audio.paused) {
this.audio.pause();
}
this.audio.pause();
window.clearInterval(this.intervalProgress);
window.clearInterval(this.intervalHistory);
this.progress = this.audio.currentTime;
},
durationChanged() {
this.duration = this.audio.duration;
@ -180,7 +183,7 @@ export default {
return;
}
if (!this.audio.paused) {
this.audio.pause();
this.pause();
} else if (this.audio.src != "") {
this.audio.play();
}