add click handler for chromecast
This commit is contained in:
parent
409edcd6c7
commit
572c879bb7
@ -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 = {};
|
||||||
cbutton.clickHandler = (ev) => {
|
|
||||||
videojs.log("clicked");
|
|
||||||
}
|
|
||||||
let button = new Button(player, cbutton);
|
let button = new Button(player, cbutton);
|
||||||
|
cbutton.clickHandler = (ev) => {
|
||||||
|
player.trigger("chromecastRequested");
|
||||||
|
}
|
||||||
button.addClass("fab");
|
button.addClass("fab");
|
||||||
button.addClass("fa-chromecast");
|
button.addClass("fa-chromecast");
|
||||||
button.addClass("vjs-control");
|
button.addClass("vjs-control");
|
||||||
|
Loading…
Reference in New Issue
Block a user