Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(avatar) support icons alongside cors avatars (#12280)
Mihaela Dumitru1230cebde2b0
diff --git a/react/features/base/avatar/functions.ts b/react/features/base/avatar/functions.tsindex 07fd05e1d2..accecd4d2b 100644--- a/react/features/base/avatar/functions.ts+++ b/react/features/base/avatar/functions.ts@@ -76,6 +76,6 @@ export function getInitials(s?: string) {* @param {Array<string>} corsURLs - The URL pattern that matches a URL that needs to be handled with CORS.* @returns {void}*/-export function isCORSAvatarURL(url: string | any = '', corsURLs: Array<string> = []) {+export function isCORSAvatarURL(url: string, corsURLs: Array<string> = []): boolean {return corsURLs.some(pattern => url.startsWith(pattern));}diff --git a/react/features/base/participants/functions.ts b/react/features/base/participants/functions.tsindex 9bf595c19f..f7ce821095 100644--- a/react/features/base/participants/functions.ts+++ b/react/features/base/participants/functions.ts@@ -609,7 +609,8 @@ async function _getFirstLoadableAvatarUrl(participant: Participant, store: IStor} else {try {const { corsAvatarURLs } = store.getState()['features/base/config'];- const { isUsingCORS, src } = await preloadImage(url, isCORSAvatarURL(url, corsAvatarURLs));+ const useCORS = isIconUrl(url) ? false : isCORSAvatarURL(url, corsAvatarURLs);+ const { isUsingCORS, src } = await preloadImage(url, useCORS);AVATAR_CHECKED_URLS.set(src, {isLoadable: true,