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