From 7c3cae3b3976b4c495de0bfc142b29e583b3bdaf Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 7 Jul 2023 20:54:20 +0200 Subject: [PATCH] fix videojs --- frontend/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/script.js b/frontend/script.js index 7840429..8e50054 100644 --- a/frontend/script.js +++ b/frontend/script.js @@ -27,7 +27,7 @@ const canPlayType = (canPlayTypeRaw === "maybe") || (canPlayTypeRaw === "probably"); if(canPlayType) { const Button = videojs.getComponent("Button"); - const DownloadButton = videojs.extend(videojs.getComponent("Component"), { + class DownloadButton extends videojs.getComponent("Component") { createEl: () => { const elem = document.createElement("a"); elem.href = info.download; @@ -38,7 +38,7 @@ elem.classList.add("vjs-big-download"); return elem; } - }) + } const cbutton = {}; cbutton.clickHandler = (ev) => {