diff --git a/input-selection-2.html b/input-selection-2.html
index 4c307d4..f2b480c 100644
--- a/input-selection-2.html
+++ b/input-selection-2.html
@@ -308,6 +308,16 @@
function onSessionEnded(event) {
if (event.session.isImmersive) {
xrButton.setSession(null);
+
+ if (navigator.xr.offerSession !== undefined) {
+ navigator.xr.offerSession('immersive-vr', {
+ requiredFeatures: ['local-floor']
+ }).then((session) => {
+ xrButton.setSession(session);
+ session.isImmersive = true;
+ onSessionStarted(session);
+ });
+ }
}
}