# RFC: Unified Media API ## Summary This RFC proposes a **unified media API** that extends the [HTMLMediaElement](https://html.spec.whatwg.org/multipage/media.html#htmlmediaelement) to support different media types (video, HLS, DASH, YouTube, etc.) in a consistent way. The API is designed to: - **Extend** the existing HTMLMediaElement surface rather than replace it. Implementations may expose the **full** HTMLMediaElement surface or a **subset** of it; the unified contract is "HTMLMediaElement-like" where the subset is sufficient for the integration (e.g. play/pause, currentTime, seekable). - **Support multiple integration points:** for HTML, web components that implement this API; for React and other frameworks, an API that extends `EventTarget` and exposes the same surface (full or subset). - **Add custom extensions** for behavior not covered by HTMLMediaElement, specifically: - **Stream type** — distinguish live vs. on-demand content. - **Live edge** — model the “live edge” of live streams (window, seekable end, seek-to-live). - **Renditions list** — discover and select video/audio quality levels (renditions) for HTTP Adaptive Streaming (HAS). ## Motivation ## Unified control across media types Players today deal with many sources: native `