mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
review
This commit is contained in:
@@ -320,37 +320,31 @@ export const getUrlParams = (
|
|||||||
: (parser.getEnumParam("intent", UserIntent) ?? UserIntent.Unknown);
|
: (parser.getEnumParam("intent", UserIntent) ?? UserIntent.Unknown);
|
||||||
// Here we only use constants and `platform` to determine the intent preset.
|
// Here we only use constants and `platform` to determine the intent preset.
|
||||||
let intentPreset: UrlConfiguration;
|
let intentPreset: UrlConfiguration;
|
||||||
|
const inAppDefault = {
|
||||||
|
confineToRoom: true,
|
||||||
|
appPrompt: false,
|
||||||
|
preload: true,
|
||||||
|
header: platform === "desktop" ? HeaderStyle.None : HeaderStyle.AppBar,
|
||||||
|
showControls: true,
|
||||||
|
hideScreensharing: false,
|
||||||
|
allowIceFallback: true,
|
||||||
|
perParticipantE2EE: true,
|
||||||
|
controlledAudioDevices: platform === "desktop" ? false : true,
|
||||||
|
skipLobby: true,
|
||||||
|
returnToLobby: false,
|
||||||
|
sendNotificationType: "notification" as RTCNotificationType,
|
||||||
|
};
|
||||||
switch (intent) {
|
switch (intent) {
|
||||||
case UserIntent.StartNewCall:
|
case UserIntent.StartNewCall:
|
||||||
intentPreset = {
|
intentPreset = {
|
||||||
confineToRoom: true,
|
...inAppDefault,
|
||||||
appPrompt: false,
|
|
||||||
preload: true,
|
|
||||||
header: platform === "desktop" ? HeaderStyle.None : HeaderStyle.AppBar,
|
|
||||||
showControls: true,
|
|
||||||
hideScreensharing: false,
|
|
||||||
allowIceFallback: true,
|
|
||||||
perParticipantE2EE: true,
|
|
||||||
controlledAudioDevices: platform === "desktop" ? false : true,
|
|
||||||
skipLobby: true,
|
skipLobby: true,
|
||||||
returnToLobby: false,
|
|
||||||
sendNotificationType: "notification",
|
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case UserIntent.JoinExistingCall:
|
case UserIntent.JoinExistingCall:
|
||||||
intentPreset = {
|
intentPreset = {
|
||||||
confineToRoom: true,
|
...inAppDefault,
|
||||||
appPrompt: false,
|
|
||||||
preload: true,
|
|
||||||
header: platform === "desktop" ? HeaderStyle.None : HeaderStyle.AppBar,
|
|
||||||
showControls: true,
|
|
||||||
hideScreensharing: false,
|
|
||||||
allowIceFallback: true,
|
|
||||||
perParticipantE2EE: true,
|
|
||||||
controlledAudioDevices: platform === "desktop" ? false : true,
|
|
||||||
skipLobby: false,
|
skipLobby: false,
|
||||||
returnToLobby: false,
|
|
||||||
sendNotificationType: undefined,
|
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
// Non widget usecase defaults
|
// Non widget usecase defaults
|
||||||
|
|||||||
Reference in New Issue
Block a user