Commit Graph

4 Commits

Author SHA1 Message Date
Jeff Emmett fd5868f569 Fix video playback from R2 with proper range request handling
Critical fixes for video streaming:

- Fix range request handling by using HEAD request first
  - Get total file size before processing range requests
  - Properly calculate Content-Range header with accurate boundaries
  - Prevent issues where object.size wasn't available on range requests

- Add proper CORS headers for video streaming
  - Expose Content-Length, Content-Range, Accept-Ranges headers
  - Allow Range header in requests
  - Enables video seeking and progressive loading in browsers

- Improve range request logic
  - Ensure end byte doesn't exceed file size
  - Calculate correct Content-Length for partial responses
  - Always return accurate byte ranges in 206 responses

These fixes resolve issues where videos wouldn't play or seek properly
due to incorrect Content-Range headers and missing CORS headers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 22:07:17 -08:00
Jeff Emmett 2d71a13621 Add advanced gallery features: lazy loading, sorting, and loading animations
- Implement lazy loading for video thumbnails using Intersection Observer
  - Only load thumbnails when they enter viewport (50px margin)
  - Smooth fade-in transition when thumbnails load
  - Significantly reduces initial page load time

- Add shimmer loading animation for thumbnail containers
  - Gradient shimmer effect while videos are loading
  - Automatic removal once content loads
  - Professional loading state feedback

- Add video sorting functionality
  - Sort by: Newest/Oldest, Name (A-Z/Z-A), Size (Largest/Smallest)
  - Client-side sorting for instant results
  - Maintains lazy loading when re-rendering sorted videos

- Improve error handling
  - Graceful fallback with placeholder icon for failed thumbnails
  - Better UX when videos fail to load

Performance improvements especially noticeable with large video collections.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:50:36 -08:00
Jeff Emmett 50e44f7c24 Improve video gallery filtering and thumbnail display
- Filter out videos smaller than 1KB (test files)
- Verify videos exist in R2 before displaying in gallery
- Add thumbnail error handling with placeholder icons
- Improve video preview with proper metadata loading
- Update API list endpoint to exclude small/test files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 16:07:42 -08:00
Jeff Emmett 76b9485d2c Initial commit: OBS R2 video uploader and streaming service
- Cloudflare Worker for video serving from R2 bucket
- Admin panel with authentication and video management
- OBS integration for automatic video uploads
- HLS live streaming support with nginx-rtmp
- KV namespace for video metadata (visibility settings)
- Video gallery with thumbnails and playback
- Support for multiple video formats (mp4, mkv, mov, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 03:37:35 -08:00