mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-12 18:17:36 +03:00
ensure play prop is passed down
This commit is contained in:
parent
82d75b244f
commit
0ebc9a2e92
@ -201,7 +201,7 @@ type ReviewGroupProps = {
|
|||||||
review: ReviewSegment;
|
review: ReviewSegment;
|
||||||
id: string;
|
id: string;
|
||||||
config: FrigateConfig;
|
config: FrigateConfig;
|
||||||
onSeek: (timestamp: number) => void;
|
onSeek: (timestamp: number, play?: boolean) => void;
|
||||||
isActive?: boolean;
|
isActive?: boolean;
|
||||||
onActivate?: () => void;
|
onActivate?: () => void;
|
||||||
onOpenUpload?: (e: Event) => void;
|
onOpenUpload?: (e: Event) => void;
|
||||||
@ -325,7 +325,7 @@ function ReviewGroup({
|
|||||||
type EventCollapsibleProps = {
|
type EventCollapsibleProps = {
|
||||||
event: Event;
|
event: Event;
|
||||||
effectiveTime?: number;
|
effectiveTime?: number;
|
||||||
onSeek: (ts: number) => void;
|
onSeek: (ts: number, play?: boolean) => void;
|
||||||
onOpenUpload?: (e: Event) => void;
|
onOpenUpload?: (e: Event) => void;
|
||||||
};
|
};
|
||||||
function EventCollapsible({
|
function EventCollapsible({
|
||||||
@ -450,9 +450,7 @@ function EventCollapsible({
|
|||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
<ObjectTimeline
|
<ObjectTimeline
|
||||||
eventId={event.id}
|
eventId={event.id}
|
||||||
onSeek={(ts) => {
|
onSeek={onSeek}
|
||||||
onSeek(ts);
|
|
||||||
}}
|
|
||||||
effectiveTime={effectiveTime}
|
effectiveTime={effectiveTime}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -492,7 +490,9 @@ function LifecycleItem({ event, isActive, onSeek }: LifecycleItemProps) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
onClick={() => onSeek?.(event.timestamp ?? 0, false)}
|
onClick={() => {
|
||||||
|
onSeek?.(event.timestamp ?? 0, false);
|
||||||
|
}}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex cursor-pointer items-center gap-2 text-sm text-primary-variant",
|
"flex cursor-pointer items-center gap-2 text-sm text-primary-variant",
|
||||||
isActive
|
isActive
|
||||||
@ -518,7 +518,7 @@ function ObjectTimeline({
|
|||||||
effectiveTime,
|
effectiveTime,
|
||||||
}: {
|
}: {
|
||||||
eventId: string;
|
eventId: string;
|
||||||
onSeek: (ts: number) => void;
|
onSeek: (ts: number, play?: boolean) => void;
|
||||||
effectiveTime?: number;
|
effectiveTime?: number;
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation("views/events");
|
const { t } = useTranslation("views/events");
|
||||||
@ -548,7 +548,7 @@ function ObjectTimeline({
|
|||||||
Math.abs((effectiveTime ?? 0) - (event.timestamp ?? 0)) <= 0.5;
|
Math.abs((effectiveTime ?? 0) - (event.timestamp ?? 0)) <= 0.5;
|
||||||
return (
|
return (
|
||||||
<LifecycleItem
|
<LifecycleItem
|
||||||
key={`${event.timestamp}-${event.source_id ?? idx}`}
|
key={`${event.timestamp}-${event.source_id ?? ""}-${idx}`}
|
||||||
event={event}
|
event={event}
|
||||||
onSeek={onSeek}
|
onSeek={onSeek}
|
||||||
isActive={isActive}
|
isActive={isActive}
|
||||||
|
|||||||
@ -290,7 +290,7 @@ export function RecordingView({
|
|||||||
setCurrentTime(time);
|
setCurrentTime(time);
|
||||||
|
|
||||||
if (currentTimeRange.after <= time && currentTimeRange.before >= time) {
|
if (currentTimeRange.after <= time && currentTimeRange.before >= time) {
|
||||||
mainControllerRef.current?.seekToTimestamp(time, !play);
|
mainControllerRef.current?.seekToTimestamp(time, play);
|
||||||
} else {
|
} else {
|
||||||
updateSelectedSegment(time, true);
|
updateSelectedSegment(time, true);
|
||||||
}
|
}
|
||||||
@ -1005,7 +1005,9 @@ function Timeline({
|
|||||||
) : timelineType == "detail" ? (
|
) : timelineType == "detail" ? (
|
||||||
<DetailStream
|
<DetailStream
|
||||||
currentTime={currentTime}
|
currentTime={currentTime}
|
||||||
onSeek={(timestamp) => manuallySetCurrentTime(timestamp, true)}
|
onSeek={(timestamp, play) =>
|
||||||
|
manuallySetCurrentTime(timestamp, play ?? true)
|
||||||
|
}
|
||||||
reviewItems={mainCameraReviewItems}
|
reviewItems={mainCameraReviewItems}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user