feat(player): improve picture-in-picture controls#615
Conversation
Documentation previewThe documentation preview has been deployed for this pull request. |
c7a6479 to
01330dd
Compare
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Pull request overview
This PR updates the web UI player’s Picture-in-Picture (PiP) flow to prefer Document Picture-in-Picture when available (so the whole player UI moves into the PiP window), while retaining the standard video-element PiP fallback for browsers that don’t support Document PiP.
Changes:
- Added a new
document-picture-in-picturehelper module to detect/support Document PiP, size the PiP window, and copy styles into it. - Updated
VideoPlayerto portal the entire player surface into a Document PiP window when supported, and to centralize PiP exit handling. - Simplified player controls by hiding the in-player “exit PiP” control and adding a new “playing in PiP” status string.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| web-ui/src/lib/document-picture-in-picture.ts | Introduces Document PiP detection, window sizing, and style copying/setup helpers. |
| web-ui/src/components/player/video-player.tsx | Ports the player surface into a Document PiP window when available; centralizes PiP exit handling and updates UI behavior while PiP is active. |
| web-ui/src/components/player/player-controls.tsx | Adjusts PiP button behavior (only show entry control when supported; hide exit control). |
| web-ui/src/i18n/player.ts | Adds a new “playing in PiP” message and removes the unused “exit PiP” string. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01330dd151
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
1 similar comment
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
fd82a02 to
2e82675
Compare
Summary
This updates the web player Picture-in-Picture flow to prefer Document Picture-in-Picture when available, so the whole player surface moves into the PiP window with controls and overlays. Browsers without Document Picture-in-Picture continue to use the standard video Picture-in-Picture API.
The follow-up cleanup keeps the PiP behavior DRY by centralizing exit handling, moving Document PiP helpers into
web-ui/src/lib/, and removing unused exit-PiP control text now that the in-player button is hidden while PiP is active. The generated embedded web data is intentionally left out of this PR.Validation
pnpm exec biome check --write web-ui/src/components/player/video-player.tsx web-ui/src/components/player/player-controls.tsx web-ui/src/lib/document-picture-in-picture.ts web-ui/src/i18n/player.tspnpm run type-check:tscpnpm run web-ui:buildcmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_AGGRESSIVE_OPT=ONcmake --build build -j$(getconf _NPROCESSORS_ONLN)git diff --checkgit diff --cached --check