Playback Pipeline
The playback pipeline turns a parsed manifest into appended media segments. It is a hierarchy of controllers, each with a single responsibility.
The hierarchy
StreamController— owns the set ofStreamobjects (one per DASH period), performs period transitions and stream switching, decides which stream is active. See Multiperiod Streams.Stream— represents one period. Creates and manages oneStreamProcessorper media type present in the period (video, audio, text) and coordinates their activation.StreamProcessor— the workhorse for one media type. Owns the schedule/load/append loop and the associated controllers.
The schedule → load → append loop
For each media type the loop runs continuously:
ScheduleControllerdecides whether and when the next segment should be requested — based on the buffer target levels, the playback state and whether a quality/track switch is pending.DashHandler(dash layer) generates the concreteFragmentRequestfor the current Representation — resolving templates, timelines and byte ranges.FragmentController/FragmentLoaderexecute the request through the HTTP loading stack (streaming/net/), where request interceptors, CMCD reporting and retry handling are applied. See Network Interceptor.BufferControllerreceives the loaded bytes, tracks buffer levels and pruning, and hands the data toSourceBufferSink, which appends it to the Media Source ExtensionsSourceBuffer.- Metrics collected along the way (throughput, buffer level, dropped frames) feed
AbrControllerand its rules, whose decisions flow back into the next scheduling iteration.
Supporting controllers
PlaybackController— wraps the video element: play/pause/seek, live delay, playback rate.MediaSourceController— creates and manages theMediaSourceobject and its lifecycle.GapController— detects and jumps buffer gaps to prevent stalls.CatchupController— low-latency catchup: adjusts playback rate to hold the live delay target. See Low Latency Streaming.TimeSyncController— client/server clock synchronization for live streams. See Clock Synchronization.
