mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-31 07:00:26 +00:00
Load authenicated media
This commit is contained in:
@@ -332,16 +332,4 @@ export function getRelativeRoomUrl(
|
||||
? "/" + roomAliasLocalpartFromRoomName(roomName)
|
||||
: "";
|
||||
return `/room/#${roomPart}?${generateUrlSearchParams(roomId, encryptionSystem, viaServers).toString()}`;
|
||||
}
|
||||
|
||||
export function getAvatarUrl(
|
||||
client: MatrixClient,
|
||||
mxcUrl: string,
|
||||
avatarSize = 96,
|
||||
): string {
|
||||
const width = Math.floor(avatarSize * window.devicePixelRatio);
|
||||
const height = Math.floor(avatarSize * window.devicePixelRatio);
|
||||
// scale is more suitable for larger sizes
|
||||
const resizeMethod = avatarSize <= 96 ? "crop" : "scale";
|
||||
return mxcUrl && client.mxcUrlToHttp(mxcUrl, width, height, resizeMethod)!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user