OptionaladdSubscribe to player events. The adapter uses metadataadded + metadata
for in-stream ID3 and emsg for DASH event boxes. Optional.
Attach the player to a <video> element; the adapter calls this from load() when needed.
OptionalinitializeMediaSource: booleanOptionalconfigureSet one configuration key by dotted path. Optional; used to suspend ABR around a
quality pin. Shaka documents an explicit undefined value as restoring the default.
Optionalvalue: unknownRelease the player.
OptionaldetachStop streaming and release the media element. Optional: older builds may not expose it.
OptionalgetThe URI Shaka is playing. Optional: older builds may not expose it.
OptionalgetLive config lives under streaming; read defensively, shapes vary by version.
Optionalabr?: { enabled?: boolean }Whether adaptive selection is on — snapshotted so a quality pin can be undone exactly.
Optionalenabled?: booleanWhether ABR is enabled.
Optionalstreaming?: {The streaming section of the Shaka configuration.
OptionalliveSync?: { enabled?: boolean; targetLatency?: number; targetLatencyTolerance?: number }Shaka's live-latency controller settings.
Optionalenabled?: booleanWhether Shaka adjusts playback rate to hold the target latency.
OptionaltargetLatency?: numberThe latency it holds, in seconds.
OptionaltargetLatencyTolerance?: numberHow far latency may drift before Shaka corrects it, in seconds.
OptionalsafeSeekEndOffset?: numberHow far from the live edge Shaka keeps seeks, in seconds.
The parsed manifest (shaka.extern.Manifest), or null before content loads.
OptionalgetThe element the player is currently attached to, where the build exposes it.
OptionalgetThe selectable variants. Optional; absent before content loads.
OptionalisTrue for a dynamic/live presentation. Optional: guarded at every call site.
Load a stream URL, optionally starting at startTime. A number is seconds into the
presentation; a Date is a wall-clock start for live streams.
OptionalstartTime: number | Date | nullOptionalremoveRemove a listener added with addEventListener. Optional.
OptionalseekThe seekable window Shaka will honour, in seconds. Optional.
End of the window, in seconds.
Start of the window, in seconds.
OptionalselectSelect one variant. Optional.
clearBuffer is deliberately never passed by this adapter: Shaka documents the default
as taking effect once buffered content has played, which is the non-interrupting switch
the caller requires.
OptionalclearBuffer: booleanOptionalsafeMargin: numberOptionalunloadUnload the current stream and release the decoder. initializeMediaSource=false keeps
the MediaSource closed so re-attach stays cheap. Optional: older builds may not expose it.
OptionalinitializeMediaSource: boolean
Minimum surface of
shaka.Playerthat ShakaAdapter depends on. A realshaka.Playerfromshaka-playersatisfies this interface.