Add functionality for 'end of chapter' sleep timer

This commit is contained in:
Greg Lorenzen 2024-07-11 17:37:02 +00:00
parent 41e3965467
commit cd902c0636
3 changed files with 61 additions and 24 deletions

View file

@ -72,6 +72,7 @@ export default {
type: Array,
default: () => []
},
currentChapter: Object,
bookmarks: {
type: Array,
default: () => []
@ -135,9 +136,6 @@ export default {
if (!duration) return 0
return Math.round((100 * time) / duration)
},
currentChapter() {
return this.chapters.find((chapter) => chapter.start <= this.currentTime && this.currentTime < chapter.end)
},
currentChapterName() {
return this.currentChapter ? this.currentChapter.title : ''
},