Fix android/chrome seeking on previews (#10512)

This commit is contained in:
Nicolas Mowen
2024-03-17 18:53:47 -06:00
committed by GitHub
parent bb6f153e2e
commit 880bae1eb2
4 changed files with 47 additions and 19 deletions

View File

@@ -18,10 +18,10 @@ type DynamicVideoPlayerProps = {
timeRange: { start: number; end: number };
cameraPreviews: Preview[];
startTimestamp?: number;
isScrubbing: boolean;
onControllerReady: (controller: DynamicVideoController) => void;
onTimestampUpdate?: (timestamp: number) => void;
onClipEnded?: () => void;
isScrubbing: boolean;
};
export default function DynamicVideoPlayer({
className,
@@ -29,10 +29,10 @@ export default function DynamicVideoPlayer({
timeRange,
cameraPreviews,
startTimestamp,
isScrubbing,
onControllerReady,
onTimestampUpdate,
onClipEnded,
isScrubbing,
}: DynamicVideoPlayerProps) {
const apiHost = useApiHost();
const { data: config } = useSWR<FrigateConfig>("config");
@@ -192,6 +192,7 @@ export default function DynamicVideoPlayer({
timeRange={timeRange}
cameraPreviews={cameraPreviews}
startTime={startTimestamp}
isScrubbing={isScrubbing}
onControllerReady={(previewController) => {
setPreviewController(previewController);
}}