Home

Awesome

media-group

Resurrection of the mediagroup attribute and MediaController API (but renamed) which can be used to sync and control multiple audio / video elements.

⚠️ This library is designed as a polyfill but note that MediaController is renamed to MediaGroupController and the mediagroup attribute is renamed to just group to avoid any issues with Safari where the original API is still implemented (while not working properly).

Example (CodeSandbox)

<script type="module" src="https://cdn.jsdelivr.net/npm/media-group"></script>

<video
  group="madmax"
  src="https://stream.mux.com/ibw0201Usmvp9fcDyXRzGwCu01IZXiT5duks8OoO3OQ01e00/low.mp4"
  controls
  playsinline
  muted
></video>

<audio
  group="madmax"
  src="https://stream.mux.com/0201RDkkUbY3501qR9fYuqOd8UXQNNyO3JLNcMG9kW4rpA/audio.m4a"
  controls
  playsinline
></audio>

Related