Skip to content

feat: Add support for optimised video play in home page underneath carousel#123

Open
gabros20 wants to merge 11 commits intomainfrom
feature/home-page-underneath-video-carousel
Open

feat: Add support for optimised video play in home page underneath carousel#123
gabros20 wants to merge 11 commits intomainfrom
feature/home-page-underneath-video-carousel

Conversation

@gabros20
Copy link
Copy Markdown
Collaborator

@gabros20 gabros20 commented Sep 12, 2025

  • Add TypeScript configuration and dependencies
  • Update ESLint config to include TypeScript support
  • Remove jsconfig.json in favor of tsconfig.json
  • Add video highlight on hover to AppsCarousel component
  • Updated data file with video URLs/posters
  • Add AdvancedVideoPlayer component for enhanced video handling
  • Add useIntersectionObserver hook for efficient viewport detection
  • Implement lazy loading for PrimaryHero video with smooth fade-in animation using framer-motion
  • Optimize AdvancedVideoPlayer with intersection observer to only load videos when in view
  • Remove Next.js Image component from video posters to prevent quality loss
  • Add fade-in transition (0.8s easeOut) for better UX in PrimaryHero
  • Update debug panel in AdvancedVideoPlayer to show intersection state
  • Improve performance by reducing unnecessary video loading and bandwidth usage
  • Add lazy loading to MediaRow videos using useIntersectionObserver
  • Add lazy loading to Footer video using useIntersectionObserver
  • Videos now load only when 100px from viewport for better performance
  • Maintains all existing functionality while reducing initial page load

- Add TypeScript configuration and dependencies
- Update ESLint config to include TypeScript support
- Remove jsconfig.json in favor of tsconfig.json
- Add video hover functionality to AppsCarousel component
- Update app descriptions and add video URLs/posters
- Add new Mammoth menu item to navigation
- Include video conversion and poster fix scripts
- Add AdvancedVideoPlayer component for enhanced video handling
gabros20 and others added 10 commits September 12, 2025 13:05
…ormance optimization

- Add useIntersectionObserver hook for efficient viewport detection
- Implement lazy loading for PrimaryHero video with smooth fade-in animation using framer-motion
- Optimize AdvancedVideoPlayer with intersection observer to only load videos when in view
- Remove Next.js Image component from video posters to prevent quality loss
- Add fade-in transition (0.8s easeOut) for better UX in PrimaryHero
- Update debug panel in AdvancedVideoPlayer to show intersection state
- Improve performance by reducing unnecessary video loading and bandwidth usage
- Add lazy loading to MediaRow videos using useIntersectionObserver
- Add lazy loading to Footer video using useIntersectionObserver
- Remove unused totalRows parameter from MediaRow component
- Videos now load only when 100px from viewport for better performance
- Maintains all existing functionality while reducing initial page load
- Add convert_underneath_videos.sh script for automated video processing
- Remove old fix_posters.sh and rename_files.sh scripts
- Add comprehensive README.md for underneath video assets
- Include video conversion specifications and usage instructions
- Add reminders to update apps-on-celestia.js with new video paths
- Remove useIntersectionObserver hook and all related logic from video components
- Restore immediate video loading for better performance in production
- Keep framer-motion fade-in animation in PrimaryHero for smooth UX
- Fix slow video loading issues caused by delayed intersection observer triggers

Affects:
- PrimaryHero.js: restored immediate loading + kept smooth animation
- MediaRow.js: restored immediate VideoPlayer rendering
- Footer.js: restored immediate footer video loading
- AdvancedVideoPlayer.tsx: removed intersection observer dependency
- Deleted useIntersectionObserver.ts hook file

Videos now load immediately on component render instead of waiting for viewport intersection.
…ter support

- Replace VideoPlayer/Video components with native HTML video elements
- Add preload='auto' with manual play() triggering for better loading control
- Generate poster images from first frame of all videos using ffmpeg
- Add poster support to PrimaryHero, AppsCarousel, MediaRow, and Footer components
- Update data structures to include posterSrc paths
- Remove unused VideoPlayer and AdvancedVideoPlayer imports
- Improve video loading performance and user experience
- Add video caching system with blob URL management for better performance
- Implement lazy loading for videos in AppsCarousel and MediaRow components
- Add blog post caching with localStorage to reduce API calls and handle rate limiting
- Optimize video autoplay with multiple retry strategies for Safari compatibility
- Add viewport-based video loading (mobile/desktop) with resize handling
- Reduce video file sizes by ~30-40% through optimization
- Add intersection observer for efficient video loading when components enter viewport
- Implement duplicate video loading prevention in carousel
- Add graceful fallbacks for video loading failures
- Improve hero video height responsiveness (90vh -> 100vh on large screens)

Performance improvements:
- Videos now load only when needed, reducing initial page load
- Cached blob URLs prevent re-downloading of videos
- Blog API calls cached for 1 hour with stale cache fallback on rate limits
- Mobile/desktop video switching without re-downloading
- Skip blob URL conversion for Safari to prevent infinite byte-range requests
- Use preload='none' for Safari instead of preload='metadata'
- Change AppsCarousel to scroll-based video loading trigger
- Fix hydration mismatch by detecting Safari on client-side only
- Maintain 200px viewport offset for lazy loading videos

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant