Get LK info from the js-sdk
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
56df302458
commit
3a2cee581e
2 changed files with 14 additions and 3 deletions
|
@ -138,6 +138,16 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||||
const { user_id, device_id, access_token, passwordlessUser } =
|
const { user_id, device_id, access_token, passwordlessUser } =
|
||||||
session;
|
session;
|
||||||
|
|
||||||
|
const livekit = Config.get().livekit;
|
||||||
|
const foci = livekit
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
url: livekit.server_url,
|
||||||
|
jwtServiceUrl: livekit.jwt_service_url,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: undefined;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return {
|
return {
|
||||||
client: await initClient(
|
client: await initClient(
|
||||||
|
@ -147,6 +157,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||||
userId: user_id,
|
userId: user_id,
|
||||||
deviceId: device_id,
|
deviceId: device_id,
|
||||||
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
||||||
|
foci,
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
|
@ -163,6 +174,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||||
userId: user_id,
|
userId: user_id,
|
||||||
deviceId: device_id,
|
deviceId: device_id,
|
||||||
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
||||||
|
foci,
|
||||||
},
|
},
|
||||||
false // Don't need the crypto store just to log out
|
false // Don't need the crypto store just to log out
|
||||||
);
|
);
|
||||||
|
|
|
@ -72,7 +72,6 @@ import { MatrixInfo } from "./VideoPreview";
|
||||||
import { useJoinRule } from "./useJoinRule";
|
import { useJoinRule } from "./useJoinRule";
|
||||||
import { ParticipantInfo } from "./useGroupCall";
|
import { ParticipantInfo } from "./useGroupCall";
|
||||||
import { ItemData, TileContent } from "../video-grid/VideoTile";
|
import { ItemData, TileContent } from "../video-grid/VideoTile";
|
||||||
import { Config } from "../config/Config";
|
|
||||||
import { NewVideoGrid } from "../video-grid/NewVideoGrid";
|
import { NewVideoGrid } from "../video-grid/NewVideoGrid";
|
||||||
import { OTelGroupCallMembership } from "../otel/OTelGroupCallMembership";
|
import { OTelGroupCallMembership } from "../otel/OTelGroupCallMembership";
|
||||||
import { SettingsModal } from "../settings/SettingsModal";
|
import { SettingsModal } from "../settings/SettingsModal";
|
||||||
|
@ -96,8 +95,8 @@ interface ActiveCallProps extends Omit<Props, "livekitRoom"> {
|
||||||
|
|
||||||
export function ActiveCall(props: ActiveCallProps) {
|
export function ActiveCall(props: ActiveCallProps) {
|
||||||
const livekitRoom = useLiveKit(props.userChoices, {
|
const livekitRoom = useLiveKit(props.userChoices, {
|
||||||
sfuUrl: Config.get().livekit!.server_url,
|
sfuUrl: props.groupCall.foci[0]!.url,
|
||||||
jwtUrl: `${Config.get().livekit!.jwt_service_url}/token`,
|
jwtUrl: `${props.groupCall.foci[0]!.jwtServiceUrl}/token`,
|
||||||
roomName: props.matrixInfo.roomName,
|
roomName: props.matrixInfo.roomName,
|
||||||
userDisplayName: props.matrixInfo.displayName,
|
userDisplayName: props.matrixInfo.displayName,
|
||||||
userIdentity: `${props.client.getUserId()}:${props.client.getDeviceId()}`,
|
userIdentity: `${props.client.getUserId()}:${props.client.getDeviceId()}`,
|
||||||
|
|
Loading…
Add table
Reference in a new issue