1
0
Commit Graph

53 Commits

Author SHA1 Message Date
Verdi
3bd2c135a9 update demo page 2026-02-19 13:12:49 -06:00
Verdi
2194a4726e Force GitHub Pages rebuild 2026-02-19 13:09:41 -06:00
Verdi
858eb62947 Update CDN urls in readme 2026-02-19 12:32:47 -06:00
Michael Verdi
d52a722ce7 Merge pull request #5
Resolve image paths relative to script URL for CDN support
v1.0.2
2026-02-19 12:17:20 -06:00
Verdi
40e3711925 Resolve image paths relative to script URL for CDN support 2026-02-19 12:15:36 -06:00
Michael Verdi
c41ad12b32 Update index.html
Updated to use jsdelivr URLs
2026-02-19 11:23:08 -06:00
Michael Verdi
dbe6e5b1d9 Update README.md
Added jsdelivr.net CDN links
2026-02-19 11:21:45 -06:00
Michael Verdi
626b7f451b Create .gitattributes v1.0.1 2026-02-19 11:13:56 -06:00
Michael Verdi
a56e36eaf6 Merge pull request #4 from Verdi/fix/quest-stereo-v2
Fix stereo eye detection with multiple fallback methods
v1.0.0
2026-01-26 23:39:48 -06:00
Verdi
bebcb3d355 Fix stereo eye detection with multiple fallback methods
- Replace onBeforeRender stereo detection to use cascading fallbacks:
  1. Direct xrCamera.cameras[0]/[1] comparison
  2. View matrix matrixWorldInverse.elements[12] with 0.001 threshold
  3. Projection matrix elements[8] as last resort
- Add video texture sync in renderXR before render call

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 23:27:45 -06:00
Michael Verdi
f4fb9cf6bb Merge pull request #3 from Verdi/revert-1-fix/quest-stereo-rendering
Revert "Fix stereo rendering glitches on Meta Quest browsers"
2026-01-26 23:14:47 -06:00
Michael Verdi
38200c82f2 Revert "Fix stereo rendering glitches on Meta Quest browsers" 2026-01-26 23:12:43 -06:00
Michael Verdi
715e762fc9 Merge pull request #2 from Verdi/fix/quest-stereo-rendering
update video
2026-01-26 22:51:52 -06:00
Verdi
928fafa290 update video 2026-01-26 22:41:56 -06:00
Michael Verdi
065e8310e3 Merge pull request #1 from Verdi/fix/quest-stereo-rendering
Fix stereo rendering glitches on Meta Quest browsers
2026-01-26 18:23:51 -06:00
Verdi
4183ae2530 Fix stereo rendering glitches on Meta Quest browsers
Replace camera reference comparison with view matrix eye detection
for more reliable left/right eye identification. Recent Quest Browser
updates (Chromium 138/140, Horizon OS v83) changed WebXR multiview
behavior, causing the previous xrCamera.cameras[0]/[1] comparison
to fail intermittently on the left eye.

The new approach uses activeCamera.matrixWorldInverse.elements[12]
(the X translation in the view matrix) which reliably indicates:
- Negative value = left eye
- Positive value = right eye

This method is consistent across both Quest Browser and Safari/VisionOS.

Also adds explicit video texture synchronization in the render loop
to prevent timing-related glitches.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 18:20:13 -06:00
Michael Verdi
d869f75e1e Update vr180-player.js
Updated threejs CDN link with one that updates to latest version.
2026-01-26 11:07:07 -06:00
Michael Verdi
b559ea6ebf Merge remote changes with canvas positioning fix 2025-08-01 15:23:12 -05:00
Michael Verdi
85baf3cd79 Fix 2D canvas positioning bug
- Changed canvas positioning from absolute to relative in start2DMode()
- Resolves issue where content below video was hidden underneath canvas
- Fixes canvas disappearing during page resize and fullscreen operations
- Canvas now properly flows within document layout
2025-08-01 15:22:26 -05:00
Michael Verdi
0a8cb8196c Update README.md 2025-08-01 14:45:12 -05:00
Michael Verdi
5087c3cbb2 Merge remote changes with local updates 2025-08-01 14:40:20 -05:00
Michael Verdi
0ef4ca56a5 Update HTML, CSS, and video file
- Updated index.html with latest changes
- Updated vr180player/vr180-player.css with styling improvements
- Updated sbs-video.mp4 with new video content
2025-08-01 14:38:42 -05:00
Michael Verdi
ffb29bc4ec Update README.md 2025-08-01 12:43:41 -05:00
Michael Verdi
090ad5f315 Merge 2D branch: Fix canvas resizing bug in 2D mode 2025-08-01 12:37:36 -05:00
Michael Verdi
3472e2a385 Fix canvas resizing bug in 2D mode
- Fixed onWindowResize() to use container dimensions instead of hidden video element
- Updated start2DMode() to use consistent container-based sizing logic
- Added fullscreen event listeners to handle resize during fullscreen transitions
- Added minimum dimension constraints to prevent zero-sized canvas
- Canvas now maintains proper dimensions during window resize and fullscreen operations
2025-08-01 12:27:39 -05:00
Michael Verdi
957f1af8b0 Update README.md 2025-08-01 10:31:52 -05:00
Michael Verdi
896777ac30 Implement dynamic UI creation for VR180 player
- Remove static HTML elements (play button and control panel) from index.html
- Add createPlayButton() and create2DControlPanel() functions to dynamically generate UI
- Update DOMContentLoaded handler to create and insert UI elements on page load
- Maintain all existing functionality while making player more modular and self-contained
- UI elements are now created entirely by JavaScript, making the player easier to integrate
- Tested and verified: play button appears correctly, 2D mode works, controls function properly
2025-07-31 22:41:14 -05:00
Michael Verdi
07611f8a1d Reorganize repository structure and move poster.jpg back to root
- Create vr180player/ folder with organized structure:
  - vr180player/images/ for all UI control images
  - vr180player/vr180-player.js and vr180player/vr180-player.css
- Move poster.jpg back to root level alongside main content files
- Update all file references in index.html and CSS files
- Maintain clean separation between main content and player components
- All functionality preserved with improved organization
2025-07-31 22:33:41 -05:00
Michael Verdi
3b9a94a3b9 Fix touch dragging control panel behavior in 2D mode
- Modify on2DTouchStart() to check dragging state before showing controls
- Prevents controls from appearing during active touch dragging
- Makes touch behavior consistent with mouse dragging behavior
- Controls hide when dragging starts and show when dragging ends
- Resolves issue where touch dragging would show controls while mouse dragging correctly hid them
- Ensures seamless user experience across desktop and mobile devices
2025-07-31 22:11:33 -05:00
Michael Verdi
83489ea969 Implement proper mute/unmute button functionality for 2D controls
- Add CSS classes (.muted/.unmuted) for mute button state management
- Fix button logic to show action that will be taken (standard UI pattern):
  - When audio playing (unmuted): shows mute icon (click to mute)
  - When audio muted: shows unmute icon (click to unmute)
- Add proper hover states for both mute and unmute icons
- Initialize button state correctly on video load
- Smooth 0.15s transitions between all states
- Follows standard media player UI conventions
2025-07-31 22:01:20 -05:00
Michael Verdi
da4ca420f6 Fix 2D control panel positioning relative to canvas
- Fix panel positioning calculation to account for panel height
- Position panel bottom edge 10% from canvas bottom (not container)
- Ensure panel stays within canvas bounds when WebGL canvas is active
- Update positioning on window resize for responsive behavior
- Resolves issue where panel appeared partially below canvas
2025-07-31 19:24:56 -05:00
Michael Verdi
dbaefeb337 Implement 2D video controls for non-VR devices
- Add complete 2D control panel with HTML structure and CSS styling
- Implement JavaScript functionality for all control buttons:
  - Fullscreen toggle for immersive 16:9 video experience
  - Play/pause with dynamic icon switching
  - Back/forward 15-second skip controls
  - Mute/unmute toggle
  - Click-to-seek progress bar with real-time updates
- Add auto-hide behavior (5-second timeout) with mouse/touch activation
- Integrate with existing 2D mode - shows only when VR not supported
- Include all button PNG assets (normal and hover states)
- Responsive design for mobile devices
- Professional styling matching design specifications
2025-07-31 18:26:49 -05:00
Michael Verdi
14e90f7428 Replaced svg with png file 2025-07-31 14:54:31 -05:00
Michael Verdi
e65df0e616 Fix poster display issue on VR exit
- Added video.load() to resetToOriginalState() function
- Forces video element to reload and show poster image instead of first frame
- Ensures proper reset to original state after exiting VR
2025-07-31 14:17:52 -05:00
Michael Verdi
daf9583018 Add VR exit behavior to return to original state
- Created resetToOriginalState() function to reset video to poster frame and show play button
- Integrated reset function into onVRSessionEnd() for consistent VR exit behavior
- Enhanced onVideoEnded() to reset state for all playback modes
- Ensures users see original poster + play button state after exiting VR
2025-07-31 14:02:56 -05:00
Michael Verdi
25497d205f Implement 2D rectilinear viewing mode with optimized controls
- Add 2D rectilinear mode when VR is not supported
- Implement mouse and touch drag controls for camera movement
- Add proper pitch and yaw constraints (45°) for VR180 content boundaries
- Reduce momentum damping from 0.9 to 0.8 for 50% less inertia
- Show only left eye view in 2D mode for proper rectilinear projection
- Constrain WebGL canvas to 16:9 aspect ratio matching video element
- Add intuitive drag directions (drag down = look up, drag left = look right)
- Prevent viewing empty areas beyond VR180 content coverage
- Maintain smooth momentum-based camera movement with natural boundaries
2025-07-30 12:28:51 -05:00
Michael Verdi
e748d904ea Refactor: Use external SVG file for play button
- Replace embedded SVG code with external play.svg file
- Update HTML to use <img src='play.svg'> for cleaner code
- Update CSS selector from 'svg' to 'img' element
- Maintain all existing functionality and styling
- Improve code maintainability and separation of concerns
- Enable better caching and easier SVG updates
2025-07-30 10:35:32 -05:00
Michael Verdi
45e1617ca3 Implement custom SVG play button with enhanced UX
- Replace text button with beautiful SVG play button
- Position button over center of video with responsive sizing
- Add smooth hover and click animations
- Hide button after click and enable native browser controls for 2D
- Maintain VR functionality when supported
- Add proper accessibility with aria-label
- Responsive design works on mobile and desktop
2025-07-30 10:26:18 -05:00
Michael Verdi
eaab4ee3ba Clean up debug logging and finalize 2D playback functionality
- Remove all debug console.log statements
- Maintain clean, production-ready code
- Play button now works reliably in both VR and 2D modes
- Video element visibility properly managed for 2D/VR transitions
2025-07-30 09:21:48 -05:00
Michael Verdi
037be29498 Phase 1: Enable 2D video playback when VR is unavailable
- Remove automatic video hiding on page load
- Show video element by default for 2D viewing
- Enable play button for regular video playback when VR is not supported
- Hide video only when entering VR mode, show when exiting
- Maintain existing VR functionality when supported
- Button text always comes from HTML, never modified by JavaScript
2025-07-30 09:03:20 -05:00
Michael Verdi
a9eac66f69 Updated README 2025-07-29 17:23:22 -05:00
Michael Verdi
b0430a75ee Clean up HTML element IDs: rename player-container to vr-container, vrVideo to vr180, and enterVrBtn to playBtn 2025-07-29 17:15:39 -05:00
Michael Verdi
f378a5fff1 Added a sample video and updated the README. 2025-07-29 13:47:24 -05:00
Michael Verdi
df75e2a32d Removed the video-info div, button is now visible but disabled when VR is not available, button label respected, title attribute of the video div is displayed as the video title in the UI. 2025-06-24 19:09:00 -05:00
Michael Verdi
8539a54f40 Update vr180-player.js and index.html to use HTML text for enterVrBtn and fix exit VR label 2025-06-18 17:05:35 -05:00
Michael Verdi
299c17efe0 Update vr180-player.js to use HTML text for enterVrBtn 2025-06-18 16:58:24 -05:00
Michael Verdi
7b3aee7636 Update index.html 2025-06-18 09:50:14 -05:00
Michael Verdi
40b350fb7f Can I make a commit? 2025-06-07 17:26:46 -05:00
Michael Verdi
7f6b271812 Update README.md 2025-06-04 18:29:10 -05:00
Michael Verdi
5035436e4f Update README.md 2025-06-04 18:06:23 -05:00