0.3.0 • Published 1 year ago

media-offset v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

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"></script>
  <video
    data-offset="5 8"
    src="https://stream.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/low.mp4"
    muted
    autoplay
    loop
  ></video>

Related