From bbbf3ad38f649008e58e2eb11f0bee96722243c7 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Sat, 2 Nov 2024 14:51:32 -0400 Subject: Remove Discord Activity code from this branch --- priv/static/room/main.js | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'priv/static/room') diff --git a/priv/static/room/main.js b/priv/static/room/main.js index 8e46f66..b82c14c 100644 --- a/priv/static/room/main.js +++ b/priv/static/room/main.js @@ -61,19 +61,7 @@ } { - let customIconPosition = 1; const Button = videojs.getComponent("Button"); - if (HOME_BUTTON_URL !== null) { - const homeButton = new Button(player, { - clickHandler: (_) => { - location = HOME_BUTTON_URL; - }, - }); - homeButton.addClass("icon-home"); - homeButton.controlText("Return Home"); - player.controlBar.addChild(homeButton, {}, customIconPosition++); - } - const stateButton = new Button(player, { clickHandler: (_) => { const stateButtonEl = stateButton.el(); @@ -83,38 +71,7 @@ stateButton.el().setAttribute("data-text", STATE_ELEMENT_INITIAL_TEXT); stateButton.addClass("icon-users state-element"); stateButton.controlText("Viewers"); - player.controlBar.addChild(stateButton, {}, customIconPosition++); - - if (SHOW_SNAP_BUTTON) { - const SNAP_NEXT_L = "icon-left"; - const SNAP_NEXT_R = "icon-right"; - const SNAP_NEXT_LR = "icon-left-right"; - const SNAP_TITLE_L = "Snap Video To Left"; - const SNAP_TITLE_R = "Snap Video To Right"; - const SNAP_TITLE_LR = "Snap Video To Center"; - const snapButton = new Button(player, { - clickHandler: (_) => { - const snapButtonEl = snapButton.el(); - if (snapButtonEl.classList.contains(SNAP_NEXT_L)) { - snapButtonEl.classList.remove(SNAP_NEXT_L); - snapButtonEl.classList.add(SNAP_NEXT_R); - snapButtonEl.title = SNAP_TITLE_R; - } else if (snapButtonEl.classList.contains(SNAP_NEXT_R)) { - snapButtonEl.classList.remove(SNAP_NEXT_R); - snapButtonEl.classList.add(SNAP_NEXT_LR); - snapButtonEl.title = SNAP_TITLE_LR; - } else { - snapButtonEl.classList.remove(SNAP_NEXT_LR); - snapButtonEl.classList.add(SNAP_NEXT_L); - snapButtonEl.title = SNAP_TITLE_L; - } - }, - }); - snapButton.el().id = "snap-button"; - snapButton.addClass(SNAP_NEXT_L); - snapButton.controlText(SNAP_TITLE_L); - player.controlBar.addChild(snapButton, {}, customIconPosition++); - } + player.controlBar.addChild(stateButton, {}, 1); } const updatePlaybackState = (latestReceivedState, nowMilliseconds) => { -- cgit v1.2.3-57-g22cb