feat(embedded-mpv): real macOS native fullscreen for the embedded player [4/7]#6
Closed
larsemig wants to merge 1 commit into
Closed
Conversation
larsemig
force-pushed
the
pr/03-embedded-mpv-immersive
branch
from
July 7, 2026 19:00
d16774c to
6b7cb92
Compare
larsemig
force-pushed
the
pr/04-embedded-mpv-native-fullscreen
branch
from
July 7, 2026 19:00
297a620 to
2e8ba1d
Compare
Use native NSWindow fullscreen instead of DOM fullscreen for the embedded player. Extend the player-controls contract with a fullscreen delegate (PlayerFullscreenController + ControlsFullscreenBinding) and add window-state IPC so OS-initiated exits (green button, Ctrl+Cmd+F, ESC) reconcile with the in-app fullscreen state. Review-driven hardening: the deferred window-fullscreen request is now gated by a generation counter + destroyed flag so it becomes a no-op if fullscreen is exited/re-toggled or the component is torn down before the two requestAnimationFrame ticks run (pending rAF ids are cancelled in ngOnDestroy); the fill snap is awaited (raced with a ~150ms timeout so a hung IPC can not block fullscreen) before scheduling the window request; and the fullscreen controller now requires BOTH the setMainWindowFullScreen and setEmbeddedMpvFill bridges in canToggle (older bridges fall back to the built-in DOM fullscreen path). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
larsemig
force-pushed
the
pr/03-embedded-mpv-immersive
branch
from
July 7, 2026 19:56
6b7cb92 to
6a2c1c0
Compare
larsemig
force-pushed
the
pr/04-embedded-mpv-native-fullscreen
branch
from
July 7, 2026 19:56
2e8ba1d to
2a85165
Compare
Owner
Author
|
Used as template only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Sidenote from the author: My review focus for this series was the architecture, not every implementation detail. If there are specific contribution guidelines I should follow (commit style, PR conventions, test expectations, etc.), please let me know and I will adapt the series accordingly.
Step 4 of the 7-PR series implementing the direction approved in 4gray#1105.
What
Real macOS native NSWindow fullscreen for the embedded-MPV player, replacing DOM fullscreen for it (web/PWA players keep DOM fullscreen unchanged):
PlayerFullscreenControllerdelegate onapp-player-controls(defaultnull→ built-in DOM behavior). The web players in steps 5–7 need zero changes.embedded_mpv.mm): the native surface enters autoresize "fill" mode with rendering frozen so the last frame scales cleanly through macOS's snapshot zoom;setFullScreenis deferred two rAF so the snapshot catches a clean full-bleed window.WINDOW:STATE_CHANGEDbroadcast (now enabled on macOS) without re-driving the window; teardown drops the window out of fullscreen so it is never stranded in a Space.WINDOW:SET_FULLSCREEN,EMBEDDED_MPV_SET_FILL— all bridge methods optional, graceful no-ops on older bridges.Review notes
.mmfill logic is not unit-tested (consistent with the rest of the native layer).embedded-mpv-native.md,player-controls-refactor.md.ui-playback/web/electron-backendsuites green.🗺️ Series roadmap (proposal 4gray#1105)
Stacked series: each PR is based on the previous one, so every diff shows only its own step.
🤖 Generated with Claude Code