Skip to content

Commit

Permalink
add iframe test for offsession
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier committed Sep 6, 2023
1 parent a4c9f2c commit 6204619
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions offersession-iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Embedded Iframe</title>
</head>
<body>
<iframe id ="offersession" src="input-selection-2.html" width="600" height="600" frameborder="0"></iframe>
<script>
function toggleElement() {
let element = document.getElementById('offersession');

if (element.src.indexOf('input-selection-2.html') !== -1) {
element.src = 'immersive-vr-session.html';
} else {
element.src = 'input-selection-2.html';
}

// Schedule the next toggle after 5 seconds
setTimeout(toggleElement, 5000);
}

// Start the initial toggle after the page loads
window.onload = function () {
setTimeout(toggleElement, 5000);
};
</script>
</body>
</html>

0 comments on commit 6204619

Please sign in to comment.