1
0
Commit Graph

27 Commits

Author SHA1 Message Date
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
Michael Verdi
c1cd670275 Add files via upload 2025-06-04 16:28:46 -05:00
Michael Verdi
9021e7f26f Add files via upload 2025-06-04 16:24:07 -05:00
Michael Verdi
d4ac4b6f3c Initial commit 2025-06-04 16:22:25 -05:00