From 40e371192595d48c370fe7793af887027d8c39cc Mon Sep 17 00:00:00 2001 From: Verdi Date: Thu, 19 Feb 2026 12:15:36 -0600 Subject: [PATCH] Resolve image paths relative to script URL for CDN support --- vr180player/vr180-player.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vr180player/vr180-player.js b/vr180player/vr180-player.js index fd2971e..fa60a8f 100644 --- a/vr180player/vr180-player.js +++ b/vr180player/vr180-player.js @@ -1,4 +1,5 @@ import * as THREE from 'https://unpkg.com/three/build/three.module.js'; +const _playerBase = new URL('.', import.meta.url).href; let scene, camera, renderer, video, videoTexture, sphereMaterial; let vr180Mesh; @@ -111,7 +112,7 @@ function createPlayButton() { playButton.setAttribute('aria-label', 'Play video'); const playImg = document.createElement('img'); - playImg.src = 'vr180player/images/play.png'; + playImg.src = _playerBase + 'images/play.png'; playImg.alt = 'Play'; playButton.appendChild(playImg);