From 8e19d7b34da12f768f9e9e6851fc09fe5ba30fb7 Mon Sep 17 00:00:00 2001 From: videogame hacker Date: Fri, 29 Apr 2022 23:28:11 +0100 Subject: [PATCH] Don't allow controls by default --- frontend/lib/watch-session.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/lib/watch-session.mjs b/frontend/lib/watch-session.mjs index 0dbfc85..4cdeb04 100644 --- a/frontend/lib/watch-session.mjs +++ b/frontend/lib/watch-session.mjs @@ -228,10 +228,18 @@ export const joinSession = async () => { is_playing ); + // TODO: Allow the user to set this somewhere + let defaultAllowControls = false; + try { + defaultAllowControls = localStorage.getItem( + "watch-party-default-allow-controls" + ); + } catch (_err) {} + // By default, we should disable video controls if the video is already playing. // This solves an issue where Safari users join and seek to 00:00:00 because of // outgoing events. - if (current_time_ms != 0) { + if (current_time_ms != 0 || !defaultAllowControls) { video.controls = false; }