feat(trailer): support background hero trailer playback on Windows desktop - #598
Open
neerajlovecyber wants to merge 1 commit into
Open
neerajlovecyber wants to merge 1 commit into
neerajlovecyber wants to merge 1 commit into
Conversation
|
Not implemented in Mac OS desktop. |
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 background hero trailer playback support on Windows desktop, implementing direct software-rendered video frame delivery to Compose Canvas via
libmpvand Skia.Key components:
libmpvswrender context inplayer_bridge.cppwith SIMD alpha masking (pixels[i] |= 0xFF000000U) to guarantee 100% pixel opacity without double-exposure.NativeMpvSurfacePlayerandNativeMpvSurfaceBridgeallocating a shared Skia Bitmap memory buffer, rendering cleanly to Compose Canvas with a first-frame ready callback.panscan=1.0inlibmpvto maintain aspect ratio and crop to fill without distortion.playWhenReady == false), preventing paused video frames from lingering behind detail content.PR type
Why
Desktop previously lacked trailer preview playback on the media details page on Windows. This adapts the feature already present on NuvioTV for desktop navigation, allowing users to seamlessly preview trailers while viewing media details.
Desktop scope
Windows (
windowsDesktopMain,desktopMain, andplayer_bridge.cpp), with matching scroll-fade handling innonWindowsDesktopMain.Zero changes to common/mobile shared files (
commonMainis 100% untouched).Issue or approval
Related to #316
UI / behavior impact
Policy check
CONTRIBUTING.md.Scope boundaries
commonMain).Testing
panscan=1.0).NativeMpvSurfacePlayerTest).Screenshots / Video
Verified on Windows 11 desktop: hero trailer plays in the background behind media details and smoothly crossfades to the backdrop artwork when scrolling down.
clideo_editor_6618e3ed975248b7bbbd4f86b57d2146.mp4
Breaking changes
None.
Linked issues
Fixes #316