Skip to content

Playback fix when changing layout#1050

Merged
Zibbp merged 2 commits intomainfrom
misc-02-07
Feb 7, 2026
Merged

Playback fix when changing layout#1050
Zibbp merged 2 commits intomainfrom
misc-02-07

Conversation

@Zibbp
Copy link
Owner

@Zibbp Zibbp commented Feb 7, 2026

  • re-fetch playback status when player component is remounted when page size changes
  • allow HEAD request for static files

closes #1048

@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

Walkthrough

The changes modify video playback handling by adding conditional fetch and override semantics in the frontend, and replace generic static file serving with explicit per-route handlers for video and temporary directories in the backend HTTP handler.

Changes

Cohort / File(s) Summary
Frontend Playback Configuration
frontend/app/components/videos/Player.tsx, frontend/app/hooks/usePlayback.ts
Added refetchOnMount: "always" and enabled: (isLoggedIn) conditions to video playback fetching. Reordered spread operator in useFetchPlaybackForVideo to allow caller-provided options to override default query settings, enabling flexible override semantics.
Backend Static File Serving
internal/transport/http/handler.go
Replaced generic static file serving with explicit per-route handlers for videos and temp directories. Introduces environment-based wrapper functions using StripPrefix and FileServer, registering separate GET/HEAD routes for each directory.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Playback fix when changing layout' directly relates to the main issue being addressed: restoring video playback progress when layout/window size changes.
Description check ✅ Passed The description accurately describes the two key changes: re-fetching playback status on player component remount and allowing HEAD requests for static files, both related to the linked issue.
Linked Issues check ✅ Passed The PR addresses the core requirement from issue #1048: maintaining video playback progress during layout changes by refetching playback status on component remount, and enabling HEAD requests for static file serving.
Out of Scope Changes check ✅ Passed All code changes are directly scoped to the linked issue: refetching playback on remount, enabling HEAD requests, and option override semantics to support the above functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch misc-02-07

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Zibbp Zibbp merged commit cc44649 into main Feb 7, 2026
7 of 9 checks passed
@Zibbp Zibbp deleted the misc-02-07 branch February 7, 2026 18:33
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.

Video restarts when changing to mobile width

1 participant