mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-28 02:18:57 +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:
@@ -181,6 +181,21 @@ export default function DynamicVideoPlayer({
|
||||
[camera, controller],
|
||||
);
|
||||
|
||||
const getSnapshotUrlForPlus = useCallback(
|
||||
(playTime: number) => {
|
||||
if (!controller) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const time = controller.getProgress(playTime);
|
||||
if (!time) {
|
||||
return undefined;
|
||||
}
|
||||
return `${apiHost}api/${camera}/recordings/${time}/snapshot.jpg?height=500`;
|
||||
},
|
||||
[apiHost, camera, controller],
|
||||
);
|
||||
|
||||
// state of playback player
|
||||
|
||||
const recordingParams = useMemo(
|
||||
@@ -312,6 +327,7 @@ export default function DynamicVideoPlayer({
|
||||
}}
|
||||
setFullResolution={setFullResolution}
|
||||
onUploadFrame={onUploadFrameToPlus}
|
||||
getSnapshotUrl={getSnapshotUrlForPlus}
|
||||
toggleFullscreen={toggleFullscreen}
|
||||
onError={(error) => {
|
||||
if (error == "stalled" && !isScrubbing) {
|
||||
|
||||
Reference in New Issue
Block a user