mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-08 20:09:19 +00:00
Add intents for video room
This commit is contained in:
@@ -32,6 +32,8 @@ export enum UserIntent {
|
|||||||
StartNewCallDMVoice = "start_call_dm_voice",
|
StartNewCallDMVoice = "start_call_dm_voice",
|
||||||
JoinExistingCallDM = "join_existing_dm",
|
JoinExistingCallDM = "join_existing_dm",
|
||||||
JoinExistingCallDMVoice = "join_existing_dm_voice",
|
JoinExistingCallDMVoice = "join_existing_dm_voice",
|
||||||
|
CallRoom = "call_room",
|
||||||
|
CallRoomVoice = "call_room_voice",
|
||||||
Unknown = "unknown",
|
Unknown = "unknown",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -432,6 +434,13 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
|
|||||||
intentPreset.autoLeaveWhenOthersLeft = true;
|
intentPreset.autoLeaveWhenOthersLeft = true;
|
||||||
intentPreset.callIntent = intentPreset.callIntent ?? "video";
|
intentPreset.callIntent = intentPreset.callIntent ?? "video";
|
||||||
break;
|
break;
|
||||||
|
case UserIntent.CallRoomVoice:
|
||||||
|
intentPreset.callIntent = "audio";
|
||||||
|
// Fall through
|
||||||
|
case UserIntent.CallRoom:
|
||||||
|
intentPreset.skipLobby = false; // In video rooms, we want to show the lobby before the user joins the call.
|
||||||
|
intentPreset.callIntent = intentPreset.callIntent ?? "video";
|
||||||
|
break;
|
||||||
// Non widget usecase defaults
|
// Non widget usecase defaults
|
||||||
default:
|
default:
|
||||||
intentPreset = {
|
intentPreset = {
|
||||||
@@ -469,6 +478,7 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
|
|||||||
break;
|
break;
|
||||||
case UserIntent.StartNewCallDMVoice:
|
case UserIntent.StartNewCallDMVoice:
|
||||||
case UserIntent.JoinExistingCallDMVoice:
|
case UserIntent.JoinExistingCallDMVoice:
|
||||||
|
case UserIntent.CallRoomVoice:
|
||||||
intentAndPlatformDerivedConfiguration.defaultAudioEnabled = true;
|
intentAndPlatformDerivedConfiguration.defaultAudioEnabled = true;
|
||||||
intentAndPlatformDerivedConfiguration.defaultVideoEnabled = false;
|
intentAndPlatformDerivedConfiguration.defaultVideoEnabled = false;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user