Type skippable playback segments
Narrow a playback-segment union to currently active skippable variants with deterministic overlap ordering.Description
Requirements
Export getSkippablePlaybackSegments from src/App.tsx.
Include intro, recap, and credits segments while excluding chapters.
Include segments where start is at or before at and end is strictly after at.
Ignore segments with nonfinite times or end at or before start.
Sort active segments by start, end, then kind without widening the return type.
Return an observably equivalent result for equivalent inputs without reading time, randomness, network, storage, or DOM globals.
Do not mutate input objects, arrays, nested records, or values retained in the returned result.
Intro
at 30 inside intro 0-90
The intro returns as a SkippableSegment
Include intro, recap, and credits segments while excluding chapters.
End boundary
at equals intro end
The intro is not active
Include segments where start is at or before at and end is strictly after at.
Constraints
Implement a pure synchronous function with no external side effectsTreat every input collection and nested record as read-onlyReturn JSON-compatible data except where the declared TypeScript API explicitly uses bigint
Hints
Hint 1
Start with the narrows-skippable-kinds behavior and make its observable result deterministic.
Hint 2
Model active-half-open-range independently before combining it with the remaining states.
Hint 3
Verify the boundary described by orders-overlaps without changing caller-owned input.