Add Picture-in-Picture mode for the player - #78
Open
Omurshid wants to merge 1 commit into
Open
Conversation
Adds a floating, always-on-top Picture-in-Picture window that detaches the MPV video from the main window so playback can continue while browsing the catalog. The same MPV instance is reparented (SetParent, no re-buffering) into the PiP window and returned to the main window on exit. Highlights: - Borderless, draggable, resizable PiP window with a custom GDI+ "glass" controls overlay (restore, close, play/pause, skip, seek slider, transparency toggle) that auto-hides shortly after the cursor leaves. - Transparency toggle (WS_EX_LAYERED) to see content behind the window; window position/size/transparency are persisted across sessions. - PiP button injected into the web player controls, cloned from Stremio's own fullscreen button so it inherits the native styling and auto-hide, plus a system-tray "Picture-in-Picture" toggle. - Toggle plumbed through the existing web<->shell IPC (win-set-pip / win-pip-changed), mirroring the fullscreen flow. New files: src/stremio_app/pip_window.rs, src/stremio_app/mpv_hwnd.rs Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
|
i do not have the capacity to review this claude generated 1700 lines of code pr im sorry |
This was referenced Jul 27, 2026
|
I reviewed this implementation and opened a focused alternative in #92. The main review concerns are:
#92 keeps the native shell responsibility focused: it handles the IPC, reparents the existing MPV child, resizes it with the PiP window, restores it on close, and persists placement. |
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
Adds a Chrome-extension-style Picture-in-Picture mode: a floating, always-on-top window that detaches the MPV video from the main window so playback continues while you browse the catalog. The same MPV instance is reparented (
SetParent, no re-buffering) into the PiP window and returned to the main window on exit.Features
WS_EX_LAYERED) so you can see content behind it; the state is remembered.How it works
The toggle is plumbed through the existing web↔shell IPC, mirroring the fullscreen flow:
win-set-pip(web → shell) triggers a notice handled on the UI thread; state is broadcast back withwin-pip-changed. Entering PiP locates MPV's child render window and reparents it into the floating window; exiting reparents it back and re-fits the WebView.New files
src/stremio_app/pip_window.rs— the floating window, GDI+ overlay, drag/resize, transparency, MPV reparenting.src/stremio_app/mpv_hwnd.rs— locates MPV's child render window.Notes
cargo build,cargo clippy, andcargo testare all clean (0 warnings).🤖 Generated with Claude Code