add cast button
This commit is contained in:
parent
560928bc6e
commit
99ba95bd25
@ -54,6 +54,14 @@
|
|||||||
bigCastButton.addClass("vjs-control");
|
bigCastButton.addClass("vjs-control");
|
||||||
bigCastButton.addClass("vjs-button");
|
bigCastButton.addClass("vjs-button");
|
||||||
bigCastButton.addClass("vjs-big-chromecast");
|
bigCastButton.addClass("vjs-big-chromecast");
|
||||||
|
player.addChild(bigCastButton);
|
||||||
|
|
||||||
|
player.on("play", () => {
|
||||||
|
bigCastButton.hide();
|
||||||
|
});
|
||||||
|
player.on("pause", () => {
|
||||||
|
bigCastButton.show();
|
||||||
|
});
|
||||||
|
|
||||||
const smallCastButton = new Button(player, cbutton);
|
const smallCastButton = new Button(player, cbutton);
|
||||||
smallCastButton.addClass("fab");
|
smallCastButton.addClass("fab");
|
||||||
@ -61,13 +69,6 @@
|
|||||||
smallCastButton.addClass("vjs-control");
|
smallCastButton.addClass("vjs-control");
|
||||||
smallCastButton.addClass("vjs-button");
|
smallCastButton.addClass("vjs-button");
|
||||||
|
|
||||||
player.on("play", () => {
|
|
||||||
player.removeChild(bigCastButton);
|
|
||||||
});
|
|
||||||
player.on("pause", () => {
|
|
||||||
player.addChild(bigCastButton);
|
|
||||||
});
|
|
||||||
|
|
||||||
player.on("chromecastConnected", () => {
|
player.on("chromecastConnected", () => {
|
||||||
console.log(player.chromecastSessionManager.remotePlayer.volumeLevel);
|
console.log(player.chromecastSessionManager.remotePlayer.volumeLevel);
|
||||||
if(player.volume() > 0.3) {
|
if(player.volume() > 0.3) {
|
||||||
|
Loading…
Reference in New Issue
Block a user