mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-08 00:00:28 +03:00
Add some parameters to be settable (need to create an param object type instead of using any) in widgetUrl
This commit is contained in:
parent
e76664083d
commit
8700fe84ab
1 changed files with 9 additions and 4 deletions
|
|
@ -36,7 +36,12 @@ import { SmallWidgetDriver } from './SmallWidgetDriver';
|
||||||
* @param roomId - The ID of the room.
|
* @param roomId - The ID of the room.
|
||||||
* @returns The generated URL object.
|
* @returns The generated URL object.
|
||||||
*/
|
*/
|
||||||
export const getWidgetUrl = (mx: MatrixClient, roomId: string, elementCallUrl: string): URL => {
|
export const getWidgetUrl = (
|
||||||
|
mx: MatrixClient,
|
||||||
|
roomId: string,
|
||||||
|
elementCallUrl: string,
|
||||||
|
setParams: any
|
||||||
|
): URL => {
|
||||||
const baseUrl = window.location.origin;
|
const baseUrl = window.location.origin;
|
||||||
const url =
|
const url =
|
||||||
new URL(`${elementCallUrl}/room`) ?? new URL('./dist/element-call/dist/index.html', baseUrl);
|
new URL(`${elementCallUrl}/room`) ?? new URL('./dist/element-call/dist/index.html', baseUrl);
|
||||||
|
|
@ -48,10 +53,10 @@ export const getWidgetUrl = (mx: MatrixClient, roomId: string, elementCallUrl: s
|
||||||
widgetId: `element-call-${roomId}`,
|
widgetId: `element-call-${roomId}`,
|
||||||
appPrompt: 'false',
|
appPrompt: 'false',
|
||||||
preload: 'false',
|
preload: 'false',
|
||||||
skipLobby: 'true',
|
skipLobby: setParams.skipLobby ?? 'true',
|
||||||
//intent: 'join_existing',
|
//intent: 'join_existing',
|
||||||
returnToLobby: 'true',
|
returnToLobby: setParams.returnToLobby ?? 'true',
|
||||||
perParticipantE2EE: 'true',
|
perParticipantE2EE: setParams.perParticipantE2EE ?? 'true',
|
||||||
hideHeader: 'true',
|
hideHeader: 'true',
|
||||||
userId: mx.getUserId()!,
|
userId: mx.getUserId()!,
|
||||||
deviceId: mx.getDeviceId()!,
|
deviceId: mx.getDeviceId()!,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue