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.src = upstream;
player.src(source);
let Button = videojs.getComponent("Button");
let Button = videojs.getComponent("ChromecastButton");
let cbutton = {};
cbutton.clickHandler = (ev) => {
videojs.log("clicked");
}
let button = new Button(player, cbutton);
cbutton.clickHandler = (ev) => {
player.trigger("chromecastRequested");
}
button.addClass("fab");
button.addClass("fa-chromecast");
button.addClass("vjs-control");