Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
error: e
}
logger.error(sceneError.displayText, sceneError.error);
this.setStateAsync({sceneError});
return;
}
XR.start(sceneName);
this.setStateAsync({
muted: XR.isMuted(sceneName),
isVRPresentationActive: XR.isVRPresentationActive(sceneName),
loading: false
});
XR.onSceneEvent(sceneName, 'AudioEnabled', () => this.setStateAsync({showEnableAudio: false}));
XR.onSceneEvent(sceneName, 'AudioDisabled', () => this.setStateAsync({showEnableAudio: true}));
}
await XR.loadScene(sceneName, sceneDomId, sceneOptions);
} catch (e) {
this.sceneError = {
displayText: 'Failed to load scene',
error: e,
};
return;
}
XR.start(sceneName);
this.muted = XR.isMuted(sceneName);
this.isVRPresentationActive = XR.isVRPresentationActive(sceneName);
this.loading = false;
XR.onSceneEvent(sceneName, 'AudioEnabled', () => (this.showEnableAudio = false));
XR.onSceneEvent(sceneName, 'AudioDisabled', () => (this.showEnableAudio = true));
}
}
logger.error(sceneError.displayText, sceneError.error);
this.setStateAsync({sceneError});
return;
}
XR.start(sceneName);
this.setStateAsync({
muted: XR.isMuted(sceneName),
isVRPresentationActive: XR.isVRPresentationActive(sceneName),
loading: false
});
XR.onSceneEvent(sceneName, 'AudioEnabled', () => this.setStateAsync({showEnableAudio: false}));
XR.onSceneEvent(sceneName, 'AudioDisabled', () => this.setStateAsync({showEnableAudio: true}));
}
error: e
}
logger.error(sceneError.displayText, sceneError.error);
this.setStateAsync({sceneError});
return;
}
XR.start(sceneName);
this.setStateAsync({
muted: XR.isMuted(sceneName),
isVRPresentationActive: XR.isVRPresentationActive(sceneName),
loading: false
});
XR.onSceneEvent(sceneName, 'AudioEnabled', () => this.setStateAsync({showEnableAudio: false}));
XR.onSceneEvent(sceneName, 'AudioDisabled', () => this.setStateAsync({showEnableAudio: true}));
}
}
logger.error(sceneError.displayText, sceneError.error);
this.setStateAsync({sceneError});
return;
}
XR.start(sceneName);
this.setStateAsync({
muted: XR.isMuted(sceneName),
isVRPresentationActive: XR.isVRPresentationActive(sceneName),
loading: false
});
XR.onSceneEvent(sceneName, 'AudioEnabled', () => this.setStateAsync({showEnableAudio: false}));
XR.onSceneEvent(sceneName, 'AudioDisabled', () => this.setStateAsync({showEnableAudio: true}));
}
} catch (e) {
this.sceneError = {
displayText: 'Failed to load scene',
error: e,
};
return;
}
XR.start(sceneName);
this.muted = XR.isMuted(sceneName);
this.isVRPresentationActive = XR.isVRPresentationActive(sceneName);
this.loading = false;
XR.onSceneEvent(sceneName, 'AudioEnabled', () => (this.showEnableAudio = false));
XR.onSceneEvent(sceneName, 'AudioDisabled', () => (this.showEnableAudio = true));
}