Widget:Plyr

This widget allows you to embed Plyr on your wiki page.

Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy the [ full source code] of this page to your wiki as page . // Lazy load video document.addEventListener("DOMContentLoaded", function { var lazyVideos = [].slice.call(document.querySelectorAll("video.lazy"));

if ("IntersectionObserver" in window) { var lazyVideoObserver = new IntersectionObserver(function(entries, observer) {     entries.forEach(function(video) { if (video.isIntersecting) { for (var source in video.target.children) { var videoSource = video.target.children[source]; if (typeof videoSource.tagName === "string" && videoSource.tagName === "SOURCE") { videoSource.src = videoSource.dataset.src; }         }

video.target.load; video.target.classList.remove("lazy"); lazyVideoObserver.unobserve(video.target); }     });    });

lazyVideos.forEach(function(lazyVideo) {     lazyVideoObserver.observe(lazyVideo);    }); } });  