TamsPlayPosition type
One end of a TAMS play range.
A bare string is an absolute timestamp on the TAMS timeline, in the wire form "{sign?}{seconds}:{nanoseconds}". The relative forms are resolved against the flow’s own timerange, once, when the input starts — so they save the caller fetching the flow, reading its timerange, subtracting and formatting TAI, during which the live edge has moved anyway.
The relative forms are in milliseconds rather than TAMS' nanoseconds because seeking is segment-granular regardless: you land on the segment containing the position, so a millisecond is already finer than the request can be honoured. Absolute positions keep full precision, where it is real.
Signature:
export type TamsPlayPosition = string
/** Offset forward from the start of the flow's timerange. */
| {
afterStartMs: number;
}
/**
* Offset back from the end of the flow's timerange — the live edge, on a live
* flow.
*
* `0` is the live edge exactly. That is legal, but playback is realtime-paced,
* so it waits for the next segment to be written and looks stalled until then;
* allow a few segments of headroom unless that is really what you want.
*/
| {
beforeEndMs: number;
};