Skip to content
Snippets Groups Projects
Commit c4fd666c authored by onny's avatar onny
Browse files

further fixes chapter playing animation

parent 0786eb86
No related branches found
No related tags found
No related merge requests found
......@@ -179,7 +179,6 @@ export default {
},
seekEpisode(context, startTime) {
console.log(startTime)
context.commit('seekEpisode', startTime)
},
},
......
......@@ -71,7 +71,7 @@
</td>
<td class="titleColumn">
<PlayAnimation
v-show="chapterPlaying === idx"
v-show="episodeLoaded(episode.id) && chapterPlaying === idx"
:paused="isPaused(episode.id)"
style="margin-right: 8px;" />
{{ chapter.title }}
......@@ -118,6 +118,7 @@ export default {
computed: {
...mapGetters([
'episodePlaying',
'episodeLoaded',
'isPaused',
'getSeek',
]),
......@@ -159,12 +160,13 @@ export default {
const vm = this
const arr = this.episode.chapters
for (const [index, chapter] of arr.entries()) {
if (vm.episode.chapters.length === index + 1) {
return index
}
if (parseInt(vm.getSeek) >= parseInt(chapter.start_ms / 1000)
&& parseInt(vm.getSeek) <= parseInt(arr[index + 1].start_ms / 1000)) {
return index
if (parseInt(vm.getSeek) >= parseInt(chapter.start_ms / 1000)) {
if (vm.getSeek && arr.length === index + 1) {
return index
}
if (parseInt(vm.getSeek) < parseInt(arr[index + 1].start_ms / 1000)) {
return index
}
}
}
return false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment