From 0cfd97b180d7bd6f891dc4a055e46830221529e0 Mon Sep 17 00:00:00 2001 From: Dominik Henneke Date: Wed, 15 Mar 2023 13:51:00 +0100 Subject: [PATCH] Add API params to mute audio and/or video in Jitsi calls by default (#10376) Signed-off-by: Dominik Henneke --- docs/jitsi.md | 4 ++++ src/utils/WidgetUtils.ts | 2 ++ test/utils/WidgetUtils-test.ts | 2 ++ 3 files changed, 8 insertions(+) diff --git a/docs/jitsi.md b/docs/jitsi.md index a931ffe6ef..53637c591e 100644 --- a/docs/jitsi.md +++ b/docs/jitsi.md @@ -19,6 +19,10 @@ _Hash/fragment (formatted as a query string)_: - `conferenceId`: The room or conference ID to connect Jitsi Meet to. - `isAudioOnly`: Boolean for whether this is a voice-only conference. May not be present, should default to `false`. +- `startWithAudioMuted`: Boolean for whether the calls start with audio + muted. May not be present. +- `startWithVideoMuted`: Boolean for whether the calls start with video + muted. May not be present. - `displayName`: The display name of the user viewing the widget. May not be present or could be null. - `avatarUrl`: The HTTP(S) URL for the avatar of the user viewing the widget. May diff --git a/src/utils/WidgetUtils.ts b/src/utils/WidgetUtils.ts index 3fce951b35..c47086235a 100644 --- a/src/utils/WidgetUtils.ts +++ b/src/utils/WidgetUtils.ts @@ -506,6 +506,8 @@ export default class WidgetUtils { "conferenceDomain=$domain", "conferenceId=$conferenceId", "isAudioOnly=$isAudioOnly", + "startWithAudioMuted=$startWithAudioMuted", + "startWithVideoMuted=$startWithVideoMuted", "isVideoChannel=$isVideoChannel", "displayName=$matrix_display_name", "avatarUrl=$matrix_avatar_url", diff --git a/test/utils/WidgetUtils-test.ts b/test/utils/WidgetUtils-test.ts index 9225c70d7f..b2034532fc 100644 --- a/test/utils/WidgetUtils-test.ts +++ b/test/utils/WidgetUtils-test.ts @@ -27,6 +27,8 @@ describe("getLocalJitsiWrapperUrl", () => { "#conferenceDomain=$domain" + "&conferenceId=$conferenceId" + "&isAudioOnly=$isAudioOnly" + + "&startWithAudioMuted=$startWithAudioMuted" + + "&startWithVideoMuted=$startWithVideoMuted" + "&isVideoChannel=$isVideoChannel" + "&displayName=$matrix_display_name" + "&avatarUrl=$matrix_avatar_url" +