diff --git a/frontend/script.js b/frontend/script.js index 48026ff..faac55e 100644 --- a/frontend/script.js +++ b/frontend/script.js @@ -54,7 +54,10 @@ bigCastButton.addClass("vjs-control"); bigCastButton.addClass("vjs-button"); bigCastButton.addClass("vjs-big-chromecast"); - player.addChild(bigCastButton); + + player.one("canplay", () => { + player.addChild(bigCastButton); + }); const smallCastButton = new Button(player, cbutton); smallCastButton.addClass("fab");