aboutsummaryrefslogtreecommitdiff
path: root/priv/static/room/main.js
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2024-11-02 18:51:32 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2024-11-02 18:54:19 +0000
commitbbbf3ad38f649008e58e2eb11f0bee96722243c7 (patch)
tree6b0d61277b702ce31da6c65073a66faab3d650d7 /priv/static/room/main.js
parentef667f16ef26588320e8157078b5bc1ac32adae2 (diff)
downloadmediasync-bbbf3ad38f649008e58e2eb11f0bee96722243c7.tar
mediasync-bbbf3ad38f649008e58e2eb11f0bee96722243c7.tar.gz
mediasync-bbbf3ad38f649008e58e2eb11f0bee96722243c7.zip
Remove Discord Activity code from this branch
Diffstat (limited to 'priv/static/room/main.js')
-rw-r--r--priv/static/room/main.js45
1 files changed, 1 insertions, 44 deletions
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) => {