respect mute state set in lobby for call (#1102)
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
parent
e8a2421962
commit
4dcd1e176f
2 changed files with 14 additions and 2 deletions
src/room
|
@ -183,6 +183,10 @@ export function GroupCallView({
|
|||
matrixInfo={matrixInfo}
|
||||
mediaDevices={lkState.mediaDevices}
|
||||
livekitRoom={lkState.room}
|
||||
userChoices={{
|
||||
videoMuted: lkState.localMedia.video.muted,
|
||||
audioMuted: lkState.localMedia.audio.muted,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else if (left) {
|
||||
|
|
|
@ -81,6 +81,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;
|
||||
|
@ -92,6 +97,8 @@ interface Props {
|
|||
matrixInfo: MatrixInfo;
|
||||
mediaDevices: MediaDevicesState;
|
||||
livekitRoom: Room;
|
||||
|
||||
userChoices: LocalUserChoices;
|
||||
}
|
||||
|
||||
export function InCallView({
|
||||
|
@ -104,6 +111,7 @@ export function InCallView({
|
|||
matrixInfo,
|
||||
mediaDevices,
|
||||
livekitRoom,
|
||||
userChoices,
|
||||
}: Props) {
|
||||
const { t } = useTranslation();
|
||||
usePreventScroll();
|
||||
|
@ -143,8 +151,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");
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue