Merge branch 'livekit-experiment' into merge-main

This commit is contained in:
Robin Townsend 2023-06-12 11:19:52 -04:00
commit 93bc28c1a6
13 changed files with 355 additions and 4 deletions

View file

@ -188,6 +188,10 @@ export function GroupCallView({
matrixInfo={matrixInfo}
mediaDevices={lkState.mediaDevices}
livekitRoom={lkState.room}
userChoices={{
videoMuted: lkState.localMedia.video.muted,
audioMuted: lkState.localMedia.audio.muted,
}}
otelGroupCallMembership={otelGroupCallMembership}
/>
);

View file

@ -86,6 +86,11 @@ const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {});
// For now we can disable screensharing in Safari.
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
interface LocalUserChoices {
videoMuted: boolean;
audioMuted: boolean;
}
interface Props {
client: MatrixClient;
groupCall: GroupCall;
@ -96,6 +101,7 @@ interface Props {
matrixInfo: MatrixInfo;
mediaDevices: MediaDevicesState;
livekitRoom: Room;
userChoices: LocalUserChoices;
otelGroupCallMembership: OTelGroupCallMembership;
}
@ -109,6 +115,7 @@ export function InCallView({
matrixInfo,
mediaDevices,
livekitRoom,
userChoices,
otelGroupCallMembership,
}: Props) {
const { t } = useTranslation();
@ -148,8 +155,8 @@ export function InCallView({
token,
serverUrl: Config.get().livekit.server_url,
room: livekitRoom,
audio: true,
video: true,
audio: !userChoices.audioMuted,
video: !userChoices.videoMuted,
onConnected: () => {
console.log("connected to LiveKit room");
},