Vinyl is an HTML5 playback engine designed for high-performance streaming of DASH and HLS content. The architecture follows a modular design with clear separation of concerns, enabling extensibility through dependency injection.
+-------------+
| VinylPlayer |
+------+------+
|
+--------------+-----------------+
| | |
v v v
+---------------+ +----------+ +----------------+
|TrackController| |Playback | |DrmController |
| | |Controller| | |
+-------+-------+ +----+-----+ +-------+--------+
| | |
v v v
+---------------+ +-----------+ +-----------+
| Track | | Media | | EME |
| (Dash/Hls) | | Element | | (Browser) |
| | | (Browser) | | |
+-------+-------+ +-----------+ +-----------+
| |
| +----------------------+
v v
+-------------------+ +----------------+
|BufferingController| |SourceBuffer |
| | |Controller |
+----------+--------+ +--------+-------+
| |
v v
+-------------------+ +----------------+
|SegmentController | |SourceBuffer |
| | |(Browser) |
+----------+--------+ +----------------+
|
v
+-------------------+
|SegmentProvider |
| |
+-------------------+
Main entry point that orchestrates all streaming components and provides the public API.
Manages the lifecycle of streaming tracks and maintains a playback queue.
Controls the HTML5 media element and manages playback state transitions.
Handles encrypted content by managing DRM licenses and key exchanges.
Protocol-specific implementation that coordinates manifest parsing and media streaming.
Manages the MediaSource buffer by coordinating segment appending and buffer health.
Manages segment caching and prioritization while coordinating with providers for media locations.
Resolves media segment locations and handles the actual fetching of segment data.
Determines optimal playback quality based on network conditions.
Parses and manages streaming manifests, handling updates and transformations.