mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-01 21:25:18 +00:00
rename url param to autoLeave
This commit is contained in:
@@ -215,7 +215,7 @@ export interface UrlConfiguration {
|
|||||||
* is no one left in the call.
|
* is no one left in the call.
|
||||||
* This is one part to make the call matrixRTC session behave like a telephone call.
|
* This is one part to make the call matrixRTC session behave like a telephone call.
|
||||||
*/
|
*/
|
||||||
telephoneAutoLeave: boolean;
|
autoLeaveWhenOthersLeft: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If you need to add a new flag to this interface, prefer a name that describes
|
// If you need to add a new flag to this interface, prefer a name that describes
|
||||||
@@ -390,7 +390,7 @@ export const getUrlParams = (
|
|||||||
skipLobby: false,
|
skipLobby: false,
|
||||||
returnToLobby: false,
|
returnToLobby: false,
|
||||||
sendNotificationType: undefined,
|
sendNotificationType: undefined,
|
||||||
telephoneAutoLeave: false,
|
autoLeaveWhenOthersLeft: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,7 +442,7 @@ export const getUrlParams = (
|
|||||||
"ring",
|
"ring",
|
||||||
"notification",
|
"notification",
|
||||||
]),
|
]),
|
||||||
telephoneAutoLeave: parser.getFlag("telephoneAutoLeave"),
|
autoLeaveWhenOthersLeft: parser.getFlag("autoLeave"),
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
|||||||
};
|
};
|
||||||
}, [livekitRoom]);
|
}, [livekitRoom]);
|
||||||
|
|
||||||
const { telephoneAutoLeave } = useUrlParams();
|
const { autoLeaveWhenOthersLeft } = useUrlParams();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (livekitRoom !== undefined) {
|
if (livekitRoom !== undefined) {
|
||||||
@@ -174,7 +174,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
|||||||
mediaDevices,
|
mediaDevices,
|
||||||
{
|
{
|
||||||
encryptionSystem: props.e2eeSystem,
|
encryptionSystem: props.e2eeSystem,
|
||||||
autoLeaveWhenOthersLeft: telephoneAutoLeave,
|
autoLeaveWhenOthersLeft,
|
||||||
},
|
},
|
||||||
connStateObservable$,
|
connStateObservable$,
|
||||||
reactionsReader.raisedHands$,
|
reactionsReader.raisedHands$,
|
||||||
@@ -192,7 +192,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
|||||||
mediaDevices,
|
mediaDevices,
|
||||||
props.e2eeSystem,
|
props.e2eeSystem,
|
||||||
connStateObservable$,
|
connStateObservable$,
|
||||||
telephoneAutoLeave,
|
autoLeaveWhenOthersLeft,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (livekitRoom === undefined || vm === null) return null;
|
if (livekitRoom === undefined || vm === null) return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user