Skip to content

feat(player): improve picture-in-picture controls#615

Merged
stackia merged 5 commits into
mainfrom
codex/document-pip-player
Jul 4, 2026
Merged

feat(player): improve picture-in-picture controls#615
stackia merged 5 commits into
mainfrom
codex/document-pip-player

Conversation

@stackia

@stackia stackia commented Jul 4, 2026

Copy link
Copy Markdown
Owner

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.ts
  • pnpm run type-check:tsc
  • pnpm run web-ui:build
  • cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_AGGRESSIVE_OPT=ON
  • cmake --build build -j$(getconf _NPROCESSORS_ONLN)
  • git diff --check
  • git diff --cached --check

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Documentation preview

The documentation preview has been deployed for this pull request.

@stackia stackia force-pushed the codex/document-pip-player branch from c7a6479 to 01330dd Compare July 4, 2026 18:09
@stackia stackia requested a review from Copilot July 4, 2026 18:10
@stackia stackia marked this pull request as ready for review July 4, 2026 18:10
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-picture helper module to detect/support Document PiP, size the PiP window, and copy styles into it.
  • Updated VideoPlayer to 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.

Comment thread web-ui/src/lib/document-picture-in-picture.ts
Comment thread web-ui/src/components/player/video-player.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread web-ui/src/components/player/player-controls.tsx
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

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.

@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

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.

@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

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
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

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.

@stackia stackia force-pushed the codex/document-pip-player branch from fd82a02 to 2e82675 Compare July 4, 2026 18:32
@stackia stackia requested a review from Copilot July 4, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread web-ui/src/components/player/video-player.tsx
@stackia stackia merged commit 81e23d2 into main Jul 4, 2026
11 checks passed
@stackia stackia deleted the codex/document-pip-player branch July 4, 2026 18:40
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.

2 participants