Clone the Media Fragment from the page's URL to any embedded media on the page
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
clone-media-fragment.js

README.md

Clone Media Fragment

This is a quick way to support URLs such as YouTube's time offset URLs. This snippet of Javascript will clone the page's Media Fragment to any embedded media on the page.

This is written in plain Javascript, and has no external dependencies.

Usage: Just include this Javascript file on your site. It will find any <video> and <audio> tags and set up the necessary event listeners.

Background: https://aaronparecki.com/2017/02/19/4/day-61-media-fragments