feat(player-controls): shared engine-agnostic controls layer (flag off) [1/7]#3
Closed
larsemig wants to merge 1 commit into
Closed
feat(player-controls): shared engine-agnostic controls layer (flag off) [1/7]#3larsemig wants to merge 1 commit into
larsemig wants to merge 1 commit into
Conversation
larsemig
force-pushed
the
pr/01-player-controls-core
branch
from
July 7, 2026 19:00
9cbf902 to
8010bc4
Compare
Introduce a shared, engine-agnostic player-controls layer in libs/ui/playback as pure additive library code with no consumers yet. - Contract (player-controls.model.ts): PlayerControlsCapabilities, PlayerControlsState, and PlayerControlsCommands make up the PlayerController interface every engine adapter implements. - Single presentation component (app-player-controls): one controls UI binding purely to a PlayerController, with focused helpers for visibility auto-hide, volume, fullscreen (built-in DOM path), menus, keyboard shortcuts, seek/volume feedback, and the controls surface. - Web-video adapter (web-video-controls.adapter.ts + host directive): drives the contract from an HTMLVideoElement, including optional HLS.js quality/audio-track integration and series episode navigation. - Feature flag WEB_PLAYER_SHARED_CONTROLS (web-player-controls.flag.ts) defaults to OFF; no player component consumes the new layer yet, so runtime behavior is unchanged. - docs/architecture/player-controls-contract.md documents the target architecture (later PRs add the embedded-MPV adapter, immersive overlay, and host-supplied fullscreen delegate). Review-driven hardening: the web-video adapter now holds the host series-navigation signal reactively (updates after setContext are reflected); the shared controls template is fully localized via ngx-translate (reusing the EMBEDDED_MPV.PLAYER.* keys); single click on the viewport toggles play/pause deferred so a double-click still fullscreens; keyboard shortcuts are shadow-DOM-safe (composedPath) and guard against duplicate-instance double-execution (defaultPrevented); and hidden controls now also disable shortcuts. Test coverage extended per Codecov patch report. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
larsemig
force-pushed
the
pr/01-player-controls-core
branch
from
July 7, 2026 19:56
8010bc4 to
e3c8da6
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 1 of the 7-PR series implementing the direction approved in (unified player-controls architecture).
What
A shared, engine-agnostic player-controls layer — pure additive library code, zero behavior change:
player-controls.model.ts): capabilities + reactive state + commands. Engines implement it via thin adapters.app-player-controls): white controls, gradient scrim, popover menus, keyboard shortcuts.controls-*): visibility, volume, fullscreen, menus, feedback, formatting, shortcuts — each with its own spec.WebVideoControlsAdapter+ host: generic adapter over anyHTMLVideoElement; engine specifics (hls.js/Video.js/ArtPlayer) are passed in via options, never imported.WEB_PLAYER_SHARED_CONTROLSflag — default OFF. No player consumes this layer yet.docs/architecture/player-controls-contract.md— describes the target architecture; the file map marks entries that land in later PRs of this series.Why
Today every engine ships its own vendor skin (Video.js, HTML5, ArtPlayer, embedded MPV), so look, behavior and shortcuts differ per player. This layer makes the controls our component: build a feature once, every player inherits it.
Safety / review notes
+1export line).ui-playbacktest suite green.🗺️ Series roadmap (proposal
Stacked series: each PR is based on the previous one, so every diff shows only its own step.
🤖 Generated with Claude Code