Merge branch 'main' into audio_target_selector
This commit is contained in:
commit
5345986b5b
7 changed files with 308 additions and 303 deletions
|
|
@ -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 () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue