Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit ff4e665

Browse files
authored
Connect to Jitsi unmuted by default (#8909)
1 parent a9a97d1 commit ff4e665

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/stores/VideoChannelStore.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ export default class VideoChannelStore extends AsyncStoreWithClient<null> {
109109
SettingsStore.setValue("videoInputMuted", null, SettingLevel.DEVICE, value);
110110
}
111111

112-
public connect = async (roomId: string, audioDevice: MediaDeviceInfo, videoDevice: MediaDeviceInfo) => {
112+
public connect = async (
113+
roomId: string,
114+
audioDevice: MediaDeviceInfo | null,
115+
videoDevice: MediaDeviceInfo | null,
116+
) => {
113117
if (this.activeChannel) await this.disconnect();
114118

115119
const jitsi = getVideoChannel(roomId);
@@ -202,8 +206,8 @@ export default class VideoChannelStore extends AsyncStoreWithClient<null> {
202206
},
203207
);
204208
messaging.transport.send(ElementWidgetActions.JoinCall, {
205-
audioDevice: audioDevice?.label,
206-
videoDevice: videoDevice?.label,
209+
audioDevice: audioDevice?.label ?? null,
210+
videoDevice: videoDevice?.label ?? null,
207211
});
208212
try {
209213
await Promise.race([waitForJoin, dontStopMessaging]);

0 commit comments

Comments
 (0)