forked from lavender/watch-party
Make controls opt-in when joining a running session
parent
a69f0f7318
commit
f42200b0fe
|
@ -73,7 +73,7 @@ const setupIncomingEvents = (video, socket) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
logEventToChat(event);
|
logEventToChat(event);
|
||||||
} catch (_err) {}
|
} catch (_err) { }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -162,6 +162,13 @@ export const joinSession = async (nickname, sessionId) => {
|
||||||
is_playing
|
is_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
|
||||||
|
// outgoing events.
|
||||||
|
if (current_time_ms != 0) {
|
||||||
|
video.controls = false;
|
||||||
|
}
|
||||||
|
|
||||||
setupOutgoingEvents(video, socket);
|
setupOutgoingEvents(video, socket);
|
||||||
setupIncomingEvents(video, socket);
|
setupIncomingEvents(video, socket);
|
||||||
setupChat(socket);
|
setupChat(socket);
|
||||||
|
|
Loading…
Reference in New Issue