mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
On web we detect if we run on an iframe, and on mobile we detect if the app is one of ours.
13 lines
265 B
TypeScript
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;
|
|
}
|
|
}
|