mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-28 19:06:52 +03:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user