From cb797223ed73c4d034f3c5389808b333e11ac7fb Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 16 Jun 2025 12:07:39 +0530 Subject: [PATCH] fix: time markers on video slider for quiz --- frontend/src/components/VideoBlock.vue | 47 ++++++++++++++++++-------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/VideoBlock.vue b/frontend/src/components/VideoBlock.vue index 889968eb..0465a1d3 100644 --- a/frontend/src/components/VideoBlock.vue +++ b/frontend/src/components/VideoBlock.vue @@ -64,15 +64,28 @@ - + +
+ + +
+
+
+
+ {{ formatSeconds(currentTime) }} / {{ formatSeconds(duration) }} @@ -288,6 +301,13 @@ const toggleFullscreen = () => { videoContainer.value.requestFullscreen() } } + +const getQuizMarkerStyle = (time) => { + const percentage = ((time - 5) / Math.ceil(duration.value)) * 100 + return { + left: `${percentage}%`, + } +}