1
0

Leaner test side
All checks were successful
Test / test (push) Successful in 9m31s

This commit is contained in:
Aiden
2026-06-11 14:29:21 +10:00
parent 69511e4549
commit 731ee4e647
10 changed files with 24 additions and 438 deletions

View File

@@ -94,7 +94,7 @@ When the page loads, the script binds every `[data-vr-web-launcher]` on the page
- Control icons are embedded from [Lucide](https://lucide.dev/) SVG definitions, so no PNG icon assets are required. - Control icons are embedded from [Lucide](https://lucide.dev/) SVG definitions, so no PNG icon assets are required.
## Demo ## Demo
Run `npm run build`, then open `test-pages/index.html` through a local web server. The test hub is a gallery with launchers for flat 3D image, VR180 3D image, image carousels, flat 3D video, VR180 3D video, and a local file picker for browser-selected image/video media. Run `npm run build`, then open `test-pages/index.html` through a local web server. The test hub has three options: a local file picker for browser-selected image/video media, one bundled SBS flat 3D image, and one bundled SBS VR180 image.
For local experimentation, run: For local experimentation, run:

View File

@@ -165,6 +165,7 @@ a {
text-align: left; text-align: left;
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
text-decoration: none;
} }
.demo-gallery-tile:hover { .demo-gallery-tile:hover {
@@ -183,25 +184,15 @@ a {
padding: 0 12px; padding: 0 12px;
} }
.demo-focused-links { .demo-gallery-placeholder {
display: flex; display: grid;
flex-wrap: wrap; place-items: center;
gap: 10px; width: 100%;
margin-top: 22px; aspect-ratio: 16 / 9;
} background: #151515;
color: #fff;
.demo-focused-links a { font-size: 1.25rem;
display: inline-flex; font-weight: 800;
align-items: center;
min-height: 36px;
padding: 0 12px;
border: 1px solid #d5d5cf;
border-radius: 6px;
background: #fff;
color: #4f4f48;
text-decoration: none;
font-size: 0.9rem;
font-weight: 650;
} }
.demo-local-panel { .demo-local-panel {

View File

@@ -12,13 +12,18 @@
<header class="demo-topbar"> <header class="demo-topbar">
<div> <div>
<h1 class="demo-brand">VR Web Player Tests</h1> <h1 class="demo-brand">VR Web Player Tests</h1>
<p class="demo-kicker">Click a thumbnail. XR-capable browsers launch immersive VR; other browsers open the fallback modal.</p> <p class="demo-kicker">Pick local media, or launch one of the two bundled SBS image samples.</p>
</div> </div>
</header> </header>
<p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p> <p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p>
<div class="demo-gallery-grid" aria-label="Launcher gallery"> <div class="demo-gallery-grid" aria-label="Launcher gallery">
<a class="demo-gallery-tile demo-gallery-link" href="./test-local-media.html">
<div class="demo-gallery-placeholder">Local</div>
<span>Local Image or Video</span>
</a>
<button <button
type="button" type="button"
class="demo-gallery-tile" class="demo-gallery-tile"
@@ -26,10 +31,10 @@
data-media-type="image" data-media-type="image"
data-projection="plane" data-projection="plane"
data-src="../media/169_3d_test.png" data-src="../media/169_3d_test.png"
data-title="3D Image Plane" data-title="SBS 3D Image"
data-crossorigin="anonymous"> data-crossorigin="anonymous">
<img src="../media/169_3d_test.png" alt="3D Image Plane"> <img src="../media/169_3d_test.png" alt="SBS 3D Image">
<span>3D Image</span> <span>SBS 3D Image</span>
</button> </button>
<button <button
@@ -39,82 +44,14 @@
data-media-type="image" data-media-type="image"
data-projection="vr180" data-projection="vr180"
data-src="../media/VR180_SBS_Test.png" data-src="../media/VR180_SBS_Test.png"
data-title="VR180 3D Image" data-title="SBS VR180 Image"
data-crossorigin="anonymous"> data-crossorigin="anonymous">
<img src="../media/VR180_SBS_Test.png" alt="VR180 3D Image"> <img src="../media/VR180_SBS_Test.png" alt="SBS VR180 Image">
<span>VR180 Image</span> <span>SBS VR180 Image</span>
</button>
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-carousel
data-media-type="image"
data-projection="plane"
data-src="../media/169_3d_test.png, ../media/169_3d_test.png?slide=2"
data-title="3D Image Plane"
data-crossorigin="anonymous">
<img src="../media/169_3d_test.png" alt="3D Image Plane carousel">
<span>3D Image Carousel</span>
</button>
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-carousel
data-media-type="image"
data-projection="vr180"
data-src="../media/VR180_SBS_Test.png, ../media/VR180_SBS_Test.png?slide=2"
data-title="VR180 3D Image"
data-crossorigin="anonymous">
<img src="../media/VR180_SBS_Test.png" alt="VR180 3D Image carousel">
<span>VR180 Image Carousel</span>
</button>
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="video"
data-projection="plane"
data-src="../media/sbs-video.mp4"
data-poster="../poster.jpg"
data-title="3D Video Plane"
data-type="video/mp4"
data-crossorigin="anonymous">
<img src="../poster.jpg" alt="3D Video Plane">
<span>3D Video</span>
</button>
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="video"
data-projection="vr180"
data-src="../media/VR180_SBS_TEST.mp4"
data-poster="../poster.jpg"
data-title="VR180 3D Video"
data-type="video/mp4"
data-crossorigin="anonymous">
<img src="../poster.jpg" alt="VR180 3D Video">
<span>VR180 Video</span>
</button> </button>
</div> </div>
<nav class="demo-focused-links" aria-label="Focused player test pages"> <p class="demo-note">Bundled image tests use files in <code>../media/</code>. The local media page uses browser-selected files from this device.</p>
<a href="./test-3d-image.html">3D image</a>
<a href="./test-vr180-3d-image.html">VR180 image</a>
<a href="./test-3d-image-carousel.html">3D image carousel</a>
<a href="./test-vr180-3d-image-carousel.html">VR180 image carousel</a>
<a href="./test-3d-video.html">3D video</a>
<a href="./test-vr180-3d-video.html">VR180 video</a>
<a href="./test-local-media.html">Local media</a>
</nav>
<p class="demo-note">Image tests use files in <code>../media/</code>. Video tests expect <code>../media/sbs-video.mp4</code>.</p>
</div> </div>
</main> </main>
<script type="module" src="./demo-xr-status.js"></script> <script type="module" src="./demo-xr-status.js"></script>

View File

@@ -1,43 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>3D Image Carousel Test</title>
<link rel="stylesheet" href="./demo.css">
<link rel="stylesheet" href="../vr180player/vr180-player.css" data-vr-web-player-stylesheet>
</head>
<body>
<main class="demo-page">
<div class="demo-shell demo-player">
<header class="demo-topbar">
<div>
<h1 class="demo-brand">3D Image Carousel</h1>
<p class="demo-kicker">Projection: plane. Media: multiple side-by-side images.</p>
</div>
<a class="demo-back" href="./index.html">Back</a>
</header>
<p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p>
<div class="demo-player-frame demo-gallery-grid">
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-carousel
data-media-type="image"
data-projection="plane"
data-src="../media/169_3d_test.png, ../media/169_3d_test.png?slide=2"
data-title="3D Image Plane"
data-crossorigin="anonymous">
<img src="../media/169_3d_test.png" alt="3D Image Plane carousel">
<span>Open 3D Image Carousel</span>
</button>
</div>
</div>
</main>
<script type="module" src="./demo-xr-status.js"></script>
<script type="module" src="../vr180player/vr180-player.js"></script>
</body>
</html>

View File

@@ -1,42 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>3D Image Test</title>
<link rel="stylesheet" href="./demo.css">
<link rel="stylesheet" href="../vr180player/vr180-player.css" data-vr-web-player-stylesheet>
</head>
<body>
<main class="demo-page">
<div class="demo-shell demo-player">
<header class="demo-topbar">
<div>
<h1 class="demo-brand">3D Image</h1>
<p class="demo-kicker">Projection: plane. Media: side-by-side image.</p>
</div>
<a class="demo-back" href="./index.html">Back</a>
</header>
<p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p>
<div class="demo-player-frame demo-gallery-grid">
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="image"
data-projection="plane"
data-src="../media/169_3d_test.png"
data-title="3D Image Plane"
data-crossorigin="anonymous">
<img src="../media/169_3d_test.png" alt="3D Image Plane">
<span>Open 3D Image</span>
</button>
</div>
</div>
</main>
<script type="module" src="./demo-xr-status.js"></script>
<script type="module" src="../vr180player/vr180-player.js"></script>
</body>
</html>

View File

@@ -1,44 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>3D Video Test</title>
<link rel="stylesheet" href="./demo.css">
<link rel="stylesheet" href="../vr180player/vr180-player.css" data-vr-web-player-stylesheet>
</head>
<body>
<main class="demo-page">
<div class="demo-shell demo-player">
<header class="demo-topbar">
<div>
<h1 class="demo-brand">3D Video</h1>
<p class="demo-kicker">Projection: plane. Media: side-by-side video.</p>
</div>
<a class="demo-back" href="./index.html">Back</a>
</header>
<p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p>
<div class="demo-player-frame demo-gallery-grid">
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="video"
data-projection="plane"
data-src="../media/sbs-video.mp4"
data-poster="../poster.jpg"
data-title="3D Video Plane"
data-type="video/mp4"
data-crossorigin="anonymous">
<img src="../poster.jpg" alt="3D Video Plane">
<span>Open 3D Video</span>
</button>
</div>
</div>
</main>
<script type="module" src="./demo-xr-status.js"></script>
<script type="module" src="../vr180player/vr180-player.js"></script>
</body>
</html>

View File

@@ -1,84 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Gallery Launcher Test</title>
<link rel="stylesheet" href="./demo.css">
</head>
<body>
<main class="demo-page">
<div class="demo-shell">
<header class="demo-topbar">
<div>
<h1 class="demo-brand">Gallery Launchers</h1>
<p class="demo-kicker">Click a thumbnail. XR-capable browsers launch immersive VR; other browsers open the fallback modal.</p>
</div>
<a class="demo-back" href="./index.html">Back</a>
</header>
<p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p>
<div class="demo-gallery-grid" aria-label="Launcher gallery">
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="image"
data-projection="plane"
data-src="../media/169_3d_test.png"
data-title="3D Image Plane"
data-crossorigin="anonymous">
<img src="../media/169_3d_test.png" alt="3D Image Plane">
<span>3D Image</span>
</button>
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="image"
data-projection="vr180"
data-src="../media/VR180_SBS_Test.png"
data-title="VR180 3D Image"
data-crossorigin="anonymous">
<img src="../media/VR180_SBS_Test.png" alt="VR180 3D Image">
<span>VR180 Image</span>
</button>
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="video"
data-projection="plane"
data-src="../media/sbs-video.mp4"
data-poster="../poster.jpg"
data-title="3D Video Plane"
data-type="video/mp4"
data-crossorigin="anonymous">
<img src="../poster.jpg" alt="3D Video Plane">
<span>3D Video</span>
</button>
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="video"
data-projection="vr180"
data-src="../media/VR180_SBS_TEST.mp4"
data-poster="../poster.jpg"
data-title="VR180 3D Video"
data-type="video/mp4"
data-crossorigin="anonymous">
<img src="../poster.jpg" alt="VR180 3D Video">
<span>VR180 Video</span>
</button>
</div>
</div>
</main>
<script type="module" src="./demo-xr-status.js"></script>
<script type="module" src="../vr180player/vr180-player.js"></script>
</body>
</html>

View File

@@ -1,43 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>VR180 3D Image Carousel Test</title>
<link rel="stylesheet" href="./demo.css">
<link rel="stylesheet" href="../vr180player/vr180-player.css" data-vr-web-player-stylesheet>
</head>
<body>
<main class="demo-page">
<div class="demo-shell demo-player">
<header class="demo-topbar">
<div>
<h1 class="demo-brand">VR180 Image Carousel</h1>
<p class="demo-kicker">Projection: VR180. Media: multiple side-by-side images.</p>
</div>
<a class="demo-back" href="./index.html">Back</a>
</header>
<p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p>
<div class="demo-player-frame demo-gallery-grid">
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-carousel
data-media-type="image"
data-projection="vr180"
data-src="../media/VR180_SBS_Test.png, ../media/VR180_SBS_Test.png?slide=2"
data-title="VR180 3D Image"
data-crossorigin="anonymous">
<img src="../media/VR180_SBS_Test.png" alt="VR180 3D Image carousel">
<span>Open VR180 Image Carousel</span>
</button>
</div>
</div>
</main>
<script type="module" src="./demo-xr-status.js"></script>
<script type="module" src="../vr180player/vr180-player.js"></script>
</body>
</html>

View File

@@ -1,42 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>VR180 3D Image Test</title>
<link rel="stylesheet" href="./demo.css">
<link rel="stylesheet" href="../vr180player/vr180-player.css" data-vr-web-player-stylesheet>
</head>
<body>
<main class="demo-page">
<div class="demo-shell demo-player">
<header class="demo-topbar">
<div>
<h1 class="demo-brand">VR180 3D Image</h1>
<p class="demo-kicker">Projection: VR180. Media: side-by-side image.</p>
</div>
<a class="demo-back" href="./index.html">Back</a>
</header>
<p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p>
<div class="demo-player-frame demo-gallery-grid">
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="image"
data-projection="vr180"
data-src="../media/VR180_SBS_Test.png"
data-title="VR180 3D Image"
data-crossorigin="anonymous">
<img src="../media/VR180_SBS_Test.png" alt="VR180 3D Image">
<span>Open VR180 Image</span>
</button>
</div>
</div>
</main>
<script type="module" src="./demo-xr-status.js"></script>
<script type="module" src="../vr180player/vr180-player.js"></script>
</body>
</html>

View File

@@ -1,44 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>VR180 3D Video Test</title>
<link rel="stylesheet" href="./demo.css">
<link rel="stylesheet" href="../vr180player/vr180-player.css" data-vr-web-player-stylesheet>
</head>
<body>
<main class="demo-page">
<div class="demo-shell demo-player">
<header class="demo-topbar">
<div>
<h1 class="demo-brand">VR180 3D Video</h1>
<p class="demo-kicker">Projection: VR180. Media: side-by-side video.</p>
</div>
<a class="demo-back" href="./index.html">Back</a>
</header>
<p class="demo-xr-status" data-demo-xr-status>Checking immersive WebXR support...</p>
<div class="demo-player-frame demo-gallery-grid">
<button
type="button"
class="demo-gallery-tile"
data-vr-web-launcher
data-media-type="video"
data-projection="vr180"
data-src="../media/VR180_SBS_TEST.mp4"
data-poster="../poster.jpg"
data-title="VR180 3D Video"
data-type="video/mp4"
data-crossorigin="anonymous">
<img src="../poster.jpg" alt="VR180 3D Video">
<span>Open VR180 Video</span>
</button>
</div>
</div>
</main>
<script type="module" src="./demo-xr-status.js"></script>
<script type="module" src="../vr180player/vr180-player.js"></script>
</body>
</html>