volume control test

This commit is contained in:
Roy Olav Purser 2021-05-20 15:46:01 +02:00
parent 4de5d09382
commit af036abf0d
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -40,6 +40,11 @@
let Button = videojs.getComponent("Button");
let cbutton = {};
cbutton.clickHandler = (ev) => {
try {
player.chromecastSessionManager.remotePlayer.canControlVolume = false;
} catch(error) {
console.log(error);
}
player.trigger("chromecastRequested");
}
let button = new Button(player, cbutton);
@ -49,13 +54,12 @@
button.addClass("vjs-button");
button.addClass("vjs-big-chromecast");
player.chromecastSessionManager.remotePlayer.canControlVolume = false;
player.one("chromecastDevicesAvailable", () => {
//player.one("chromecastDevicesAvailable", () => {
player.addChild(button);
player.one("play", () => {
player.removeChild(button);
});
});
//});
}
}
document.addEventListener("DOMContentLoaded", handleCount);