@camstack/ui-library 1.1.16 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composites/cap-settings/CoverageTrack.d.ts +12 -1
- package/dist/contexts/recorded-playback.d.ts +23 -0
- package/dist/index.cjs +514 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +502 -9
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/recorded-control-protocol.d.ts +54 -0
- package/dist/lib/scrub-controller.d.ts +115 -0
- package/package.json +1 -1
|
@@ -7,6 +7,17 @@ interface CoverageTrackProps {
|
|
|
7
7
|
readonly playheadMs: number | null;
|
|
8
8
|
/** Called with the absolute ms a click maps to within the window. */
|
|
9
9
|
readonly onSeek: (clickMs: number) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Drag-scrub callbacks (R9, frame-push mode). When `onScrubEnd` is
|
|
12
|
+
* provided the track switches to pointer-driven scrubbing: pointer-down
|
|
13
|
+
* begins a drag, moves report the hovered epoch, release commits it —
|
|
14
|
+
* a motionless press+release behaves like a seek. `onSeek` is then
|
|
15
|
+
* suppressed (the pointer flow owns the gesture). Omit all three for the
|
|
16
|
+
* classic click-to-seek behaviour.
|
|
17
|
+
*/
|
|
18
|
+
readonly onScrubStart?: () => void;
|
|
19
|
+
readonly onScrubMove?: (ms: number) => void;
|
|
20
|
+
readonly onScrubEnd?: (ms: number) => void;
|
|
10
21
|
}
|
|
11
|
-
export declare function CoverageTrack({ windowFrom, windowTo, spans, playheadMs, onSeek, }: CoverageTrackProps): import("react").JSX.Element;
|
|
22
|
+
export declare function CoverageTrack({ windowFrom, windowTo, spans, playheadMs, onSeek, onScrubStart, onScrubMove, onScrubEnd, }: CoverageTrackProps): import("react").JSX.Element;
|
|
12
23
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RecordedControlCommand, RecordedPlaybackMode } from '../lib/recorded-control-protocol';
|
|
3
|
+
export interface RecordedPlaybackContextValue {
|
|
4
|
+
/**
|
|
5
|
+
* Host-side binding for the player's `onControlChannel` prop. `null` in the
|
|
6
|
+
* inert default — a StreamPanel outside the provider passes `undefined` to
|
|
7
|
+
* the player and no datachannel is created (behaviour unchanged).
|
|
8
|
+
*/
|
|
9
|
+
readonly bindControlChannel: ((channel: RTCDataChannel) => void) | null;
|
|
10
|
+
/** True while a bound channel is open — frame-push control is available. */
|
|
11
|
+
readonly channelOpen: boolean;
|
|
12
|
+
/** Last server-reported playback mode (`live` until told otherwise). */
|
|
13
|
+
readonly mode: RecordedPlaybackMode;
|
|
14
|
+
/** Last server-reported playback position (~1 Hz), or null while live. */
|
|
15
|
+
readonly positionMs: number | null;
|
|
16
|
+
/** Send a control command. Returns false when the channel isn't open. */
|
|
17
|
+
readonly send: (cmd: RecordedControlCommand) => boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function RecordedPlaybackProvider({ children }: {
|
|
20
|
+
readonly children: ReactNode;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
/** @returns the recorded-playback control surface (inert outside a provider). */
|
|
23
|
+
export declare function useRecordedPlayback(): RecordedPlaybackContextValue;
|