Fix:Mark as finished once media has ended #635

This commit is contained in:
advplyr 2022-06-02 16:31:52 -05:00
parent c3b33ea37a
commit 1bd657f07d
2 changed files with 1 additions and 5 deletions

View File

@ -62,10 +62,6 @@ export default {
{ {
value: 'podcast', value: 'podcast',
text: 'Podcasts' text: 'Podcasts'
},
{
value: 'video',
text: 'Videos'
} }
] ]
} }

View File

@ -91,7 +91,7 @@ class MediaProgress {
var timeRemaining = this.duration - this.currentTime var timeRemaining = this.duration - this.currentTime
// If time remaining is less than 5 seconds then mark as finished // If time remaining is less than 5 seconds then mark as finished
if ((this.progress >= 1 || (!isNaN(timeRemaining) && timeRemaining < 5)) && !this.isFinished) { if ((this.progress >= 1 || (!isNaN(timeRemaining) && timeRemaining < 5))) {
this.isFinished = true this.isFinished = true
this.finishedAt = Date.now() this.finishedAt = Date.now()
this.progress = 1 this.progress = 1