Files
jitsi-meet/react/features/base/util/embedUtils.web.ts
Saúl Ibarra Corretgé 1e8cc9d085 feat(inIframe/isEmbedded) add ability to detect generic embedding
On web we detect if we run on an iframe, and on mobile we detect if the
app is one of ours.
2025-03-26 23:39:16 +01:00

13 lines
265 B
TypeScript

/**
* Checks whether we are loaded in iframe.
*
* @returns {boolean} Whether the current page is loaded in an iframe.
*/
export function isEmbedded(): boolean {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}