Skip to content

fix(#51): firefox video loading reliability#368

Closed
DSanich wants to merge 2 commits into
divinevideo:mainfrom
DSanich:fix/51-firefox-video-loading-reliability
Closed

fix(#51): firefox video loading reliability#368
DSanich wants to merge 2 commits into
divinevideo:mainfrom
DSanich:fix/51-firefox-video-loading-reliability

Conversation

@DSanich
Copy link
Copy Markdown
Contributor

@DSanich DSanich commented May 14, 2026

Summary

  • Reduced unnecessary media auth preflight traffic by running checkMediaAuth only for protected, age-restricted media URLs.
  • Added short-lived caching and in-flight request deduplication for media auth checks to avoid repeated HEAD calls for the same URL.
  • Improved Firefox loading behavior by removing forced crossOrigin="anonymous" on media elements and limiting Firefox prefetch to image thumbnails (skipping video prefetch).

Avoid naming corporate partners, customers, or other sensitive external brands in this PR title or body. Use generic descriptors unless a maintainer explicitly approves the public reference.

Motivation

  • Firefox users reported slower and less reliable video loading compared to Chromium-based browsers.
  • The feed could trigger avoidable request overhead (auth preflight and video prefetch pressure), which increases startup latency and amplifies browser-specific networking differences.
  • This change keeps protected-media behavior intact while reducing unnecessary network work for public media.

Related Issue

Testing

  • npm run test
  • Manual verification completed

Additional targeted checks run:

  • npx vitest run src/components/VideoPlayer.test.tsx src/components/ThumbnailPlayer.test.tsx src/hooks/useAdultVerification.test.ts
  • npx vitest run src/hooks/useVideoPrefetch.test.ts src/components/VideoPlayer.test.tsx src/components/VideoPlayer.authHeaders.test.tsx src/components/ThumbnailPlayer.test.tsx src/components/VideoGrid.test.tsx

Visuals

  • UI change with screenshots/video attached
  • No visual change
  • Visuals and text avoid sensitive external brand or partner names unless explicitly approved

@github-actions
Copy link
Copy Markdown

🚀 Preview Deployment

Property Value
Preview URL https://59c1e639.divine-web-fm8.pages.dev
Commit 76bb478
Branch fix/51-firefox-video-loading-reliability

@jalcine
Copy link
Copy Markdown
Contributor

jalcine commented May 26, 2026

Closing per CONTRIBUTING.md - work on old issues needs re-alignment with current product direction before review. Please re-open with updated context if this is still relevant.

@jalcine jalcine closed this May 26, 2026
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.

fix(firefox): improve video loading reliability

2 participants