add click handler for chromecast

This commit is contained in:
Roy Olav Purser 2021-05-20 14:33:08 +02:00
parent 409edcd6c7
commit 572c879bb7
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -37,12 +37,12 @@
source.type = ctype; source.type = ctype;
source.src = upstream; source.src = upstream;
player.src(source); player.src(source);
let Button = videojs.getComponent("Button"); let Button = videojs.getComponent("ChromecastButton");
let cbutton = {}; let cbutton = {};
let button = new Button(player, cbutton);
cbutton.clickHandler = (ev) => { cbutton.clickHandler = (ev) => {
videojs.log("clicked"); player.trigger("chromecastRequested");
} }
let button = new Button(player, cbutton);
button.addClass("fab"); button.addClass("fab");
button.addClass("fa-chromecast"); button.addClass("fa-chromecast");
button.addClass("vjs-control"); button.addClass("vjs-control");