add chromecast button if devices are available
This commit is contained in:
parent
ae37908d64
commit
19532ee690
@ -51,9 +51,11 @@
|
||||
button.addClass("vjs-control");
|
||||
button.addClass("vjs-button");
|
||||
button.addClass("vjs-big-chromecast");
|
||||
player.addChild(button);
|
||||
player.one("play", (ev) => {
|
||||
player.removeChild(button);
|
||||
player.one("chromecastDevicesAvailable", () => {
|
||||
player.addChild(button);
|
||||
player.one("play", () => {
|
||||
player.removeChild(button);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user