mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-13 14:02:36 +00:00
Due to local storage limitations we might end up making the URL huge when we save the state there. Avoid the issue at the root by never storing URLs in that case. Closes: https://github.com/jitsi/jitsi-meet/issues/11567
17 lines
329 B
TypeScript
17 lines
329 B
TypeScript
/**
|
|
* Checks whether we are loaded in iframe.
|
|
*
|
|
* @returns Whether the current page is loaded in an iframe.
|
|
*/
|
|
export function inIframe(): boolean {
|
|
if (navigator.product === 'ReactNative') {
|
|
return false;
|
|
}
|
|
|
|
try {
|
|
return window.self !== window.top;
|
|
} catch (e) {
|
|
return true;
|
|
}
|
|
}
|