From a3fda5a13c94b5f4a228379d203624c994e74116 Mon Sep 17 00:00:00 2001 From: Rawrington Date: Sun, 22 Mar 2026 22:54:40 +0000 Subject: [PATCH 1/5] Silly CallIntent for video auto turning on --- src/app/hooks/useCallEmbed.ts | 2 +- src/app/plugins/call/CallEmbed.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/hooks/useCallEmbed.ts b/src/app/hooks/useCallEmbed.ts index a5bd94b9d..1ad94f734 100644 --- a/src/app/hooks/useCallEmbed.ts +++ b/src/app/hooks/useCallEmbed.ts @@ -52,7 +52,7 @@ export const createCallEmbed = ( const ongoing = MatrixRTCSession.sessionMembershipsForRoom(room, rtcSession.sessionDescription).length > 0; - const intent = CallEmbed.getIntent(dm, ongoing); + const intent = CallEmbed.getIntent(dm, ongoing, pref.video); const widget = CallEmbed.getWidget(mx, room, intent, themeKind); const controlState = pref && new CallControlState(pref.microphone, pref.video, pref.sound); diff --git a/src/app/plugins/call/CallEmbed.ts b/src/app/plugins/call/CallEmbed.ts index 734cf1626..9ddd71b63 100644 --- a/src/app/plugins/call/CallEmbed.ts +++ b/src/app/plugins/call/CallEmbed.ts @@ -52,12 +52,12 @@ export class CallEmbed { private readonly disposables: Array<() => void> = []; - static getIntent(dm: boolean, ongoing: boolean): ElementCallIntent { + static getIntent(dm: boolean, ongoing: boolean, video: boolean): ElementCallIntent { if (ongoing) { - return dm ? ElementCallIntent.JoinExistingDM : ElementCallIntent.JoinExisting; + return !video ? ElementCallIntent.JoinExistingDMVoice : (dm ? ElementCallIntent.JoinExistingDM : ElementCallIntent.JoinExisting); } - return dm ? ElementCallIntent.StartCallDM : ElementCallIntent.StartCall; + return !video ? (dm ? ElementCallIntent.StartCallDMVoice : ElementCallIntent.JoinExistingDMVoice) : (dm ? ElementCallIntent.StartCallDM : ElementCallIntent.StartCall); } static getWidget( From 2283cd671157b833b9c4ace3c62e28cecbcc900b Mon Sep 17 00:00:00 2001 From: Rawrington Date: Sun, 22 Mar 2026 23:54:19 +0000 Subject: [PATCH 2/5] Small refactor. JoinExisting works for starting a call/joining a voice room. --- src/app/plugins/call/CallEmbed.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/plugins/call/CallEmbed.ts b/src/app/plugins/call/CallEmbed.ts index 9ddd71b63..724c353e0 100644 --- a/src/app/plugins/call/CallEmbed.ts +++ b/src/app/plugins/call/CallEmbed.ts @@ -53,11 +53,15 @@ export class CallEmbed { private readonly disposables: Array<() => void> = []; static getIntent(dm: boolean, ongoing: boolean, video: boolean): ElementCallIntent { + if (!dm) { + return video ? ElementCallIntent.JoinExisting : ElementCallIntent.JoinExistingDMVoice; + } + if (ongoing) { - return !video ? ElementCallIntent.JoinExistingDMVoice : (dm ? ElementCallIntent.JoinExistingDM : ElementCallIntent.JoinExisting); + return video ? ElementCallIntent.JoinExistingDM : ElementCallIntent.JoinExistingDMVoice; } - return !video ? (dm ? ElementCallIntent.StartCallDMVoice : ElementCallIntent.JoinExistingDMVoice) : (dm ? ElementCallIntent.StartCallDM : ElementCallIntent.StartCall); + return video ? ElementCallIntent.StartCallDM : ElementCallIntent.StartCallDMVoice; } static getWidget( From 8eecebe3399c12b346cb8517429051ac66987ec4 Mon Sep 17 00:00:00 2001 From: Rawrington Date: Sun, 22 Mar 2026 23:56:45 +0000 Subject: [PATCH 3/5] Add knope changeset --- .changeset/fix-video-auto-enabled.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-video-auto-enabled.md diff --git a/.changeset/fix-video-auto-enabled.md b/.changeset/fix-video-auto-enabled.md new file mode 100644 index 000000000..7b57773be --- /dev/null +++ b/.changeset/fix-video-auto-enabled.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix Camera being enabled by default even when the client has it off pre joining in browsers that permit the video (Electron/Tauri as examples). From 139290e326f8da75cbc9d00e8cabc8fcdde5107b Mon Sep 17 00:00:00 2001 From: Rawrington Date: Mon, 23 Mar 2026 00:44:32 +0000 Subject: [PATCH 4/5] pref can be undefined. --- src/app/hooks/useCallEmbed.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/hooks/useCallEmbed.ts b/src/app/hooks/useCallEmbed.ts index 1ad94f734..aa3466193 100644 --- a/src/app/hooks/useCallEmbed.ts +++ b/src/app/hooks/useCallEmbed.ts @@ -52,7 +52,7 @@ export const createCallEmbed = ( const ongoing = MatrixRTCSession.sessionMembershipsForRoom(room, rtcSession.sessionDescription).length > 0; - const intent = CallEmbed.getIntent(dm, ongoing, pref.video); + const intent = CallEmbed.getIntent(dm, ongoing, pref?.video); const widget = CallEmbed.getWidget(mx, room, intent, themeKind); const controlState = pref && new CallControlState(pref.microphone, pref.video, pref.sound); From 525d3e311d3023cbb9a0edbe8a0e22370f815e5a Mon Sep 17 00:00:00 2001 From: Rawrington Date: Mon, 23 Mar 2026 00:53:01 +0000 Subject: [PATCH 5/5] i forgot typescript is evil sometimes --- src/app/plugins/call/CallEmbed.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/plugins/call/CallEmbed.ts b/src/app/plugins/call/CallEmbed.ts index 724c353e0..1a12211d4 100644 --- a/src/app/plugins/call/CallEmbed.ts +++ b/src/app/plugins/call/CallEmbed.ts @@ -52,7 +52,7 @@ export class CallEmbed { private readonly disposables: Array<() => void> = []; - static getIntent(dm: boolean, ongoing: boolean, video: boolean): ElementCallIntent { + static getIntent(dm: boolean, ongoing: boolean, video: boolean | undefined): ElementCallIntent { if (!dm) { return video ? ElementCallIntent.JoinExisting : ElementCallIntent.JoinExistingDMVoice; }