Skip to content

✂️ Configures a media element to lock playback to a defined segment of the media

Notifications You must be signed in to change notification settings

muxinc/media-offset

Repository files navigation

media-offset

Configures a media element to lock playback to a defined segment of the media. The user will not be able to seek to the outside parts of the video.

Usage (Codesandbox)

This video will autoplay muted and loop through the segment from 5s to 8s.

  <script type="module" src="https://cdn.jsdelivr.net/npm/media-offset/+esm"></script>
  <video
    data-offset="5 8"
    src="https://stream.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/low.mp4"
    muted
    autoplay
    loop
  ></video>

Related

About

✂️ Configures a media element to lock playback to a defined segment of the media

Topics

Resources

Stars

Watchers

Forks