Skip to content

Commit 83517f5

Browse files
authored
WebUI Fixes (#10608)
* Fix camera with - * Fix not playing player after making slight adjustment * Fix hovering getting stuck
1 parent df6c3b1 commit 83517f5

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

web/src/components/player/PreviewPlayer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ function PreviewFramesPlayer({
352352
}
353353

354354
return previewFrames.map((frame) =>
355-
parseFloat(frame.split("-")[1].slice(undefined, -5)),
355+
// @ts-expect-error we know this item will exist
356+
parseFloat(frame.split("-").slice(undefined, -5)),
356357
);
357358
}, [previewFrames]);
358359

web/src/components/player/PreviewThumbnailPlayer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default function PreviewThumbnailPlayer({
171171
{...swipeHandlers}
172172
>
173173
{playingBack && (
174-
<div className="absolute inset-0 animate-in fade-in">
174+
<div className="absolute inset-0 animate-in fade-in pointer-events-none">
175175
<PreviewContent
176176
review={review}
177177
relevantPreview={relevantPreview}
@@ -486,10 +486,10 @@ function VideoPreview({
486486
);
487487

488488
return (
489-
<div className="relative size-full aspect-video bg-black">
489+
<div className="relative size-full aspect-video bg-black pointer-events-none">
490490
<video
491491
ref={playerRef}
492-
className="size-full aspect-video bg-black"
492+
className="size-full aspect-video bg-black pointer-events-none"
493493
autoPlay
494494
playsInline
495495
preload="auto"
@@ -500,7 +500,7 @@ function VideoPreview({
500500
</video>
501501
<Slider
502502
ref={sliderRef}
503-
className="absolute inset-x-0 bottom-0 z-30"
503+
className="absolute inset-x-0 bottom-0 z-30 pointer-events-none"
504504
value={[progress]}
505505
onValueChange={onManualSeek}
506506
onValueCommit={onStopManualSeek}
@@ -654,7 +654,7 @@ function InProgressPreview({
654654
}
655655

656656
return (
657-
<div className="relative size-full flex items-center bg-black">
657+
<div className="relative size-full flex items-center bg-black pointer-events-none">
658658
<img
659659
className="size-full object-contain"
660660
src={`${apiHost}api/preview/${previewFrames[key]}/thumbnail.webp`}
@@ -681,8 +681,8 @@ function PreviewPlaceholder({ imgLoaded }: { imgLoaded: boolean }) {
681681
}
682682

683683
return isSafari ? (
684-
<div className={`absolute inset-0 bg-gray-300`} />
684+
<div className={`absolute inset-0 bg-gray-300 pointer-events-none`} />
685685
) : (
686-
<Skeleton className={`absolute inset-0`} />
686+
<Skeleton className={`absolute inset-0 pointer-events-none`} />
687687
);
688688
}

web/src/components/player/dynamic/DynamicVideoController.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export class DynamicVideoController {
4242
}
4343
}
4444

45+
play() {
46+
this.playerController.play();
47+
}
48+
4549
pause() {
4650
this.playerController.pause();
4751
}

web/src/views/events/RecordingView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ export function RecordingView({
147147
} else {
148148
updateSelectedSegment(currentTime, true);
149149
}
150+
} else {
151+
mainControllerRef.current?.play();
150152
}
151153
}
152154
// we only want to seek when current time doesn't match the player update time

0 commit comments

Comments
 (0)