[Feature] Enable external player integration#113
Open
anilabhadatta wants to merge 6 commits into
Open
Conversation
Contributor
Author
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.


Summary
This PR implements and enables external player support for Nuvio Desktop. It introduces a completely detached, top-level
DialogWindowfor the external player picker that flawlessly tracks the main application boundaries to render correctly above the native video surface.PR type
Why
1. Enabling External Player Picker on Desktop:
SwingPanelthat inherently obscures lightweight Compose UI), we extracted the selection picker intoPlayerExternalPlayerPickerDialog. This spawns a genuine top-level OSDialogWindowinjected withalwaysOnTop = true,transparent = true, andundecorated = true.2. Emulating Inline UI Behaviors:
ComponentAdapterensures the dialog perfectly overlaps the app seamlessly even when moved or resized.focusable = falseprevents the OS title bar from losing focus, keeping window controls responsive.KeyboardFocusManagerandWindowAdapterguarantee the dialog immediately hides if the Nuvio app is minimized or loses focus to a foreign application (e.g.,Alt+Tab).3. Direct Launch Intent Short-circuiting:
ExternalPlayerPlaybackRequestwith apreferredPlayerIdparameter.App.ktintercepts requests containing this ID to bypass duplicate global UI prompts and immediately triggers the external OS launch intent.Desktop scope
This PR modifies desktop native player UI logic and external intent dispatchers. Mobile codebase is unaffected.
PlayerExternalPlayerPickerDialog.kt&.desktop.ktto implement the top-level boundary-trackingDialogWindow.PlayerScreenRuntimeUi.ktto trigger the new picker dialog instead of an inline ComposeBox, while pausing the player.ExternalPlayerPlatform.ktandApp.ktto propagate the explicitplayerIdand short-circuit the launcher intent.Supported External Players
The platform detection logic (
ExternalPlayerPlatform.desktop.kt) currently supports detecting and launching the following players automatically from default system paths:Issue or approval
Feature Request: Enable external player integration.
UI / behavior impact
Policy check
CONTRIBUTING.md.Scope boundaries
None.
Testing
Manually verified:
Alt+Tabto switch applications; verified the picker instantly hides and reappears correctly.App.ktintercepts thepreferredPlayerIdand instantly launches the application without throwing a duplicate prompt.Screenshots / Video
Breaking changes
None.
Linked issues
#112