From 572c879bb7b220de9a4bfdcd70da3e4899fc28a9 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Thu, 20 May 2021 14:33:08 +0200 Subject: [PATCH] add click handler for chromecast --- frontend/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/script.js b/frontend/script.js index 9c83a16..3a0c1d3 100644 --- a/frontend/script.js +++ b/frontend/script.js @@ -37,12 +37,12 @@ source.type = ctype; source.src = upstream; player.src(source); - let Button = videojs.getComponent("Button"); + let Button = videojs.getComponent("ChromecastButton"); let cbutton = {}; + let button = new Button(player, cbutton); cbutton.clickHandler = (ev) => { - videojs.log("clicked"); + player.trigger("chromecastRequested"); } - let button = new Button(player, cbutton); button.addClass("fab"); button.addClass("fa-chromecast"); button.addClass("vjs-control");