feat(embedded-mpv): adopt shared controls, immersive overlay on macOS [3/7]#5
Closed
larsemig wants to merge 1 commit into
Closed
feat(embedded-mpv): adopt shared controls, immersive overlay on macOS [3/7]#5larsemig wants to merge 1 commit into
larsemig wants to merge 1 commit into
Conversation
larsemig
force-pushed
the
pr/02-embedded-mpv-decompose
branch
from
July 7, 2026 19:00
2b1f5e5 to
b73b54f
Compare
larsemig
force-pushed
the
pr/03-embedded-mpv-immersive
branch
from
July 7, 2026 19:00
d16774c to
6b7cb92
Compare
The embedded-MPV player drops its bespoke vendor controls and binds the shared app-player-controls layer through EmbeddedMpvControlsAdapter, a PlayerController implementation over the decomposed session controller (command runner, session factory, stalled tracker). Label/format helpers move to embedded-mpv-labels (TranslateService-backed, existing i18n keys); the old embedded-mpv-format.utils, embedded-mpv-shortcuts, embedded-mpv-ui-state, and embedded-mpv-overlay-visibility.service are deleted. Immersive compositing (macOS only; the player itself stays gated behind the existing IPTVNATOR_ENABLE_EMBEDDED_MPV_EXPERIMENT env flag): the native libmpv surface is inserted BELOW the WebContents sibling (NSWindowBelow) and the main BrowserWindow becomes transparent (transparent: true, backgroundColor '#00000000'), so the web layer opens a transparency tunnel over the video rect while EmbeddedMpvImmersiveService + the global immersive backdrop keep the rest of the app opaque (one opaque field with a transparent hole at the measured video rect). DOM controls, dialogs, and popovers float over full-bleed video with no docked strip and no off-screen surface tricks. Trade-off: titleBarOverlay is dropped on macOS because the web-drawn window-controls overlay does not compose with a transparent window there; native traffic lights still render via titleBarStyle 'hidden'. handleRendererNavigation/getPackagedRendererIndexPath become public/exported and window-state events broadcast on all platforms to support the transparent-window path. Test coverage extended per Codecov patch report. 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/02-embedded-mpv-decompose
branch
from
July 7, 2026 19:56
b73b54f to
2f9a144
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 3 of the 7-PR series implementing the direction approved in 4gray#1105 — the core of the proposal.
What
The embedded-MPV player adopts the shared controls layer and becomes an immersive overlay on macOS:
embedded_mpv.mm): the video surface moves fromNSWindowAbovetoNSWindowBelowthe WebContents.app.ts): the web layer composites on top of the native video; the app stays opaque via a single global backdrop component (app-embedded-mpv-immersive-backdrop) that paints an opaque field with one transparent hole at the measured video rect — no per-route panel repainting.EmbeddedMpvControlsAdapter: the embedded player now drives the sharedapp-player-controls(step 1) over the decomposed session controller (step 2). Localized via the existing i18n keys.format.utils,overlay-visibility,shortcuts,ui-statemodules removed (superseded by the shared layer).Why atomically coupled
NSWindowBelowbreaks the old docked component (video would sit below an opaque web layer), so the compositing switch, the transparent window + backdrop, the shared-controls adoption, and the old-controls deletion must ship together. Nothing here is separable without breaking the compositing invariant.transparent: trueand dropstitleBarOverlayfor ALL macOS users, regardless of theIPTVNATOR_ENABLE_EMBEDDED_MPV_EXPERIMENTflag —transparentis fixed at window creation and cannot be toggled at runtime. This is the trade-off approved in Proposal: unified player-controls architecture (docs only, for direction) 4gray/iptvnator#1105 (titleBarOverlaywas unused; native traffic lights remain). Documented in code comments andplayer-controls-refactor.md§7.--widpath and keep opaque windows; all transparency logic is macOS-only.docs/architecture/player-controls-refactor.md.Net −1286 lines. Lint +
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