Merge branch 'main' into audio_target_selector

This commit is contained in:
Jade (Rose) Rowland 2024-08-15 16:28:19 -04:00
commit 5345986b5b
7 changed files with 308 additions and 303 deletions

View file

@ -143,10 +143,20 @@ export async function shareCode(codeToShare) {
});
}
export const ReplContext = createContext(null);
export const isIframe = () => window.location !== window.parent.location;
function isCrossOriginFrame() {
try {
return !window.top.location.hostname;
} catch (e) {
return true;
}
}
export const isUdels = () => {
return window.parent?.location.pathname.includes('udels');
if (isCrossOriginFrame()) {
return false;
}
return window.top?.location?.pathname.includes('udels');
};
export const getAudioDevices = async () => {