Miscellaneous fixes (#22924)

* apply annotation offset to frigate+ submission frame time

* fix broken docs links with hash fragments that resolve wrong on reload

* undo

* use recording snapshot for frigate+ frame submission from VideoControls

rather than a canvas grab/paint, which may not always align with an ffmpeg snapshot due to keyframes

* add more docs links

- display docs link for main sections on collapsible fields

* dialog button consistency
This commit is contained in:
Josh Hawkins
2026-04-20 07:19:09 -06:00
committed by GitHub
parent 043c746a8b
commit 1a5d15ba81
14 changed files with 147 additions and 30 deletions
@@ -53,6 +53,7 @@ type HlsVideoPlayerProps = {
onSeekToTime?: (timestamp: number, play?: boolean) => void;
setFullResolution?: React.Dispatch<React.SetStateAction<VideoResolutionType>>;
onUploadFrame?: (playTime: number) => Promise<AxiosResponse> | undefined;
getSnapshotUrl?: (playTime: number) => string | undefined;
toggleFullscreen?: () => void;
onError?: (error: RecordingPlayerError) => void;
isDetailMode?: boolean;
@@ -78,6 +79,7 @@ export default function HlsVideoPlayer({
onSeekToTime,
setFullResolution,
onUploadFrame,
getSnapshotUrl,
toggleFullscreen,
onError,
isDetailMode = false,
@@ -331,6 +333,13 @@ export default function HlsVideoPlayer({
videoRef.current.playbackRate = rate;
}
}}
getSnapshotUrl={() => {
const frameTime = getVideoTime();
if (!frameTime || !getSnapshotUrl) {
return undefined;
}
return getSnapshotUrl(frameTime);
}}
onUploadFrame={async () => {
const frameTime = getVideoTime();