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");