Fix username / displayname naming confusion
This commit is contained in:
parent
41456505e0
commit
2caaa15520
4 changed files with 7 additions and 7 deletions
|
@ -18,7 +18,7 @@ export type LiveKitConfig = {
|
||||||
sfuUrl: string;
|
sfuUrl: string;
|
||||||
jwtUrl: string;
|
jwtUrl: string;
|
||||||
roomName: string;
|
roomName: string;
|
||||||
userName: string;
|
userDisplayName: string;
|
||||||
userIdentity: string;
|
userIdentity: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,11 +29,11 @@ export function useLiveKit(
|
||||||
const tokenOptions = React.useMemo(
|
const tokenOptions = React.useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
userInfo: {
|
userInfo: {
|
||||||
name: config.userName,
|
name: config.userDisplayName,
|
||||||
identity: config.userIdentity,
|
identity: config.userIdentity,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
[config.userName, config.userIdentity]
|
[config.userDisplayName, config.userIdentity]
|
||||||
);
|
);
|
||||||
const token = useToken(config.jwtUrl, config.roomName, tokenOptions);
|
const token = useToken(config.jwtUrl, config.roomName, tokenOptions);
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ export function GroupCallView({
|
||||||
const roomAvatarUrl = useRoomAvatar(groupCall.room);
|
const roomAvatarUrl = useRoomAvatar(groupCall.room);
|
||||||
|
|
||||||
const matrixInfo: MatrixInfo = {
|
const matrixInfo: MatrixInfo = {
|
||||||
userName: displayName,
|
displayName,
|
||||||
avatarUrl,
|
avatarUrl,
|
||||||
roomName: groupCall.room.name,
|
roomName: groupCall.room.name,
|
||||||
roomIdOrAlias,
|
roomIdOrAlias,
|
||||||
|
|
|
@ -96,7 +96,7 @@ export function ActiveCall(props: ActiveCallProps) {
|
||||||
sfuUrl: Config.get().livekit!.server_url,
|
sfuUrl: Config.get().livekit!.server_url,
|
||||||
jwtUrl: `${Config.get().livekit!.jwt_service_url}/token`,
|
jwtUrl: `${Config.get().livekit!.jwt_service_url}/token`,
|
||||||
roomName: props.matrixInfo.roomName,
|
roomName: props.matrixInfo.roomName,
|
||||||
userName: props.matrixInfo.userName,
|
userDisplayName: props.matrixInfo.displayName,
|
||||||
userIdentity: `${props.client.getUserId()}:${props.client.getDeviceId()}`,
|
userIdentity: `${props.client.getUserId()}:${props.client.getDeviceId()}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import { DeviceChoices, UserChoices } from "../livekit/useLiveKit";
|
||||||
import { useDefaultDevices } from "../settings/useSetting";
|
import { useDefaultDevices } from "../settings/useSetting";
|
||||||
|
|
||||||
export type MatrixInfo = {
|
export type MatrixInfo = {
|
||||||
userName: string;
|
displayName: string;
|
||||||
avatarUrl: string;
|
avatarUrl: string;
|
||||||
roomName: string;
|
roomName: string;
|
||||||
roomIdOrAlias: string;
|
roomIdOrAlias: string;
|
||||||
|
@ -145,7 +145,7 @@ export function VideoPreview({ matrixInfo, onUserChoicesChanged }: Props) {
|
||||||
<Avatar
|
<Avatar
|
||||||
size={(previewBounds.height - 66) / 2}
|
size={(previewBounds.height - 66) / 2}
|
||||||
src={matrixInfo.avatarUrl}
|
src={matrixInfo.avatarUrl}
|
||||||
fallback={matrixInfo.userName.slice(0, 1).toUpperCase()}
|
fallback={matrixInfo.displayName.slice(0, 1).toUpperCase()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Add table
Reference in a new issue