Optionaloptions: Partial<SegmentControllerImplOptions>ReadonlycontentReadonlydepsReadonlylogA string prefix for all log statements made by this target.
ReadonlyoptionsThe time ranges currently fetched.
Gets the number of seconds currently prefetched.
The most recently requested quality metadata.
The most recently requested quality metadata.
Indicates that this segment provider is providing segments for an active track and should be prioritized accordingly. Time ranges to be prefetched will change to the active prefetch window.
Clears the cached segments. Currently pending segment promises will be rejected with an abort reason.
Configures this segment provider and initiates prefetching. This may be called multiple times, for example when re-using a cached track a new track priority and start time can be provided.
Deactivates the segment provider. This clears cached segments not within the inactive prefetch range. Time ranges to be prefetched will change to the inactive prefetch window.
Dispatches an event.
The key of the event within EventMap
If the passed event is read-only, then it may be re-used/cached. Otherwise, it should be a new event object every dispatch. If no target property is set on the event, the target will be set to this host.
Returns a Promise for a segment covering the given time, with quality chosen by
the configured QualitySelector. Resolves to null if no media exists at that
time. Negative time values are clamped to 0.
The lookup forward-snaps by SEGMENT_START_AFFORDANCE: if time falls within
that window before a segment's startTime, that segment is returned. This
absorbs sub-second segment-boundary differences across qualities so an ABR
switch doesn't replay or skip media at the boundary.
Calling this also blocks the prefetch queue until the returned promise settles, so the active request is prioritized over background prefetching.
The time, in seconds, the requested segment should span.
Optionalabort: ReadonlyAbort
Aborts the returned promise (rejecting with AbortError) and
releases the prefetch-queue lock. The underlying network request may continue
so its result can still populate the cache.
Returns true if the event host has any listeners.
Returns true if the event host has any listeners for the given type.
Adds an event handler for the given typed event.
The key representing the event type to listen for.
A callback to invoke when the event with the given type is dispatched.
Optionaloptions: SignalOptions
Options for changing listening behavior.
Returns a method, when invoked, removes the handler.
Resets failed segments to a pending state.
Default SegmentController implementation. Provides segments for a given time. Handles segment prefetching and caching.
Uses mediaTimelineTransformed to resolve segments directly from the MediaTimeline.