diff --git a/webui/src/components/display/blobs/VideoViewer.svelte b/webui/src/components/display/blobs/VideoViewer.svelte
index 9701aae..4212e03 100644
--- a/webui/src/components/display/blobs/VideoViewer.svelte
+++ b/webui/src/components/display/blobs/VideoViewer.svelte
@@ -17,7 +17,7 @@
let videoEl: HTMLVideoElement;
const seek = throttle((progress: number) => {
- if (state === State.PREVIEWING) {
+ if (state === State.PREVIEWING && videoEl.duration) {
videoEl.currentTime = videoEl.duration * progress;
}
}, 100);
@@ -39,8 +39,10 @@
}
function startPlaying() {
- state = State.PLAYING;
- videoEl.play();
+ if (detail) {
+ state = State.PLAYING;
+ videoEl.play();
+ }
}
@@ -49,6 +51,7 @@
(state = State.PREVIEW)}
@@ -78,11 +81,23 @@