From 23596f3c1b6419c96c222f5a6c23b068ebc0274f Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 21 May 2021 21:03:19 +0200 Subject: [PATCH] change cast button removal --- frontend/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/script.js b/frontend/script.js index 766c5e9..48026ff 100644 --- a/frontend/script.js +++ b/frontend/script.js @@ -62,8 +62,8 @@ smallCastButton.addClass("vjs-control"); smallCastButton.addClass("vjs-button"); player.controlBar.addChild(smallCastButton); - player.on("play", () => { - player.controlBar.removeChild(bigCastButton); + player.one("play", () => { + player.removeChild(bigCastButton); }); player.on("chromecastConnected", () => { if(player.volume() > 0.3) {