diff --git a/client-vue/src/components/vod/VodItem.vue b/client-vue/src/components/vod/VodItem.vue index 792ac1ee..f14cd1bf 100644 --- a/client-vue/src/components/vod/VodItem.vue +++ b/client-vue/src/components/vod/VodItem.vue @@ -451,13 +451,22 @@ function openPlayer(): void { hash += `&video_path=${props.vod.webpath}/${props.vod.basename}_vod.mp4`; } + // stream pauses are cut out of the captured video, chat and chapters need to be synced to it + const syncToVideo = playerSettings.value.vodSource == "captured" && props.vod.needs_video_sync; + if (playerSettings.value.chatSource == "captured") { - hash += `&chatfile=${props.vod.webpath}/${props.vod.basename}.chatdump`; + if (syncToVideo) { + hash += `&chatfile=${store.cfg("basepath", "")}/api/v0/vod/${props.vod.uuid}/synced.chatdump`; + } else { + hash += `&chatfile=${props.vod.webpath}/${props.vod.basename}.chatdump`; + } } else { hash += `&chatfile=${props.vod.webpath}/${props.vod.basename}_chat.json`; } - hash += `&chapters=${props.vod.chapters?.map((c) => `${c.offset}:${encodeURIComponent(c.title.replaceAll(":", "").replaceAll(";", ""))}`).join(";")}`; + hash += `&chapters=${props.vod.chapters + ?.map((c) => `${syncToVideo ? c.video_offset : c.offset}:${encodeURIComponent(c.title.replaceAll(":", "").replaceAll(";", ""))}`) + .join(";")}`; // url.searchParams.set("offset", this.playerSettings.offset.toString()); // window.open(url.toString(), "_blank"); diff --git a/client-vue/src/components/vod/VodItemChapters.vue b/client-vue/src/components/vod/VodItemChapters.vue index e6e5b38c..deea1d0f 100644 --- a/client-vue/src/components/vod/VodItemChapters.vue +++ b/client-vue/src/components/vod/VodItemChapters.vue @@ -42,8 +42,8 @@ }" > - - {{ chapter.offset !== undefined ? humanDuration(chapter.offset) : "Unknown" }} + + {{ chapter.video_offset !== undefined ? humanDuration(chapter.video_offset) : "Unknown" }} @@ -58,15 +58,15 @@ -