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
i18n: change iframe disabled message based on current hostname (#13950)
Avram Tudord02c7dc3a713
diff --git a/lang/main.json b/lang/main.jsonindex 03f46af668..86b050ba7c 100644--- a/lang/main.json+++ b/lang/main.json@@ -733,6 +733,7 @@"dataChannelClosed": "Video quality impaired","dataChannelClosedDescription": "The bridge channel has been disconnected and thus video quality is limited to its lowest setting.","disabledIframe": "Embedding is only meant for demo purposes, so this call will disconnect in {{timeout}} minutes.",+ "disabledIframeSecondary": "Embedding {{domain}} is only meant for demo purposes, so this call will disconnect in {{timeout}} minutes. Please use <a href='{{jaasDomain}}' rel='noopener noreferrer' target='_blank'>Jitsi as a Service</a> for production embedding!","disconnected": "disconnected","displayNotifications": "Display notifications for","dontRemindMe": "Do not remind me",diff --git a/react/features/conference/middleware.any.ts b/react/features/conference/middleware.any.tsindex 07a619d286..970d0320e4 100644--- a/react/features/conference/middleware.any.ts+++ b/react/features/conference/middleware.any.ts@@ -177,11 +177,30 @@ function _checkIframe(state: IReduxState, dispatch: IStore['dispatch']) {if (inIframe() && state['features/base/config'].disableIframeAPI && !browser.isElectron()&& !isVpaasMeeting(state) && !allowIframe) {// show sticky notification and redirect in 5 minutes+ const { locationURL } = state['features/base/connection'];+ let translationKey = 'notify.disabledIframe';+ const hostname = locationURL?.hostname ?? '';+ let domain = '';++ const mapping: Record<string, string> = {+ '8x8.vc': 'https://jaas.8x8.vc',+ 'meet.jit.si': 'https://jitsi.org/jaas'+ };++ const jaasDomain = mapping[hostname];++ if (jaasDomain) {+ translationKey = 'notify.disabledIframeSecondary';+ domain = hostname;+ }+dispatch(showWarningNotification({description: translateToHTML(i18next.t.bind(i18next),- 'notify.disabledIframe',+ translationKey,{+ domain,+ jaasDomain,timeout: IFRAME_DISABLED_TIMEOUT_MINUTES})