Don't allow controls by default

remotes/1694359591236046747/main
Charlotte Som 2022-04-29 23:28:11 +01:00
parent 8717e0dff2
commit 8e19d7b34d
1 changed files with 9 additions and 1 deletions

View File

@ -228,10 +228,18 @@ export const joinSession = async () => {
is_playing 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. // 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 // This solves an issue where Safari users join and seek to 00:00:00 because of
// outgoing events. // outgoing events.
if (current_time_ms != 0) { if (current_time_ms != 0 || !defaultAllowControls) {
video.controls = false; video.controls = false;
} }