You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[UI] Media bar YouTube trailer preview is zoomed and shifted on Fire TV: the WebView video overlay ignores the CSS scale (H.264 and AV1)Β #2132
Amazon Fire TV Stick 4K 2nd gen (AFTKM, MediaTek MT8696)
Server
Jellyfin
Where does it happen?
Home
Input method
D-pad / remote
Steps to reproduce
What happens
The YouTube trailer preview in the home media bar is drawn zoomed in and shifted: the picture is offset up-left and larger than its box (black band only at the top, edges and on-screen logos cut off). Local Jellyfin trailers played through Media3 are fine. I now see it on several of my Fire TV devices.
Measured on the Fire TV while a trailer was playing (Moonfin 3.0.0)
Decoder: MediaCodecLogger: ...4K.HW.omx.video.avc Resolution change from 0x0 to 1920x1080 (H.264). Earlier the same happened with AV1 (...omx.video.av01), so it is not codec-specific.
Amazon WebView puts the <video> on a hardware overlay and logs: cr_SurfaceViewOverlayCore: AWV - SurfaceView X=0 Y=0 width=3840 height=2160 scaleX=2.0 scaleY=2.0 screenWidth=1920, screenHeight=1080 (SurfaceView scaling API not called; default 1.0 scaling in effect)
The video overlay is placed from the page's unscaled 1920x1080 stage plus the 1.03 overscan offset (-29,-16), and is not scaled down with the CSS scale().
Cause (source)
lib/ui/widgets/web_youtube_trailer_io.dart: the player lives on a fixed _stageWidth = 1920 x _stageHeight = 1080 stage that applyScale() fits to the box with stage.style.transform = 'translate(...) scale(...)'.
lib/ui/widgets/media_bar.dart: the trailer is wrapped in an OverflowBox with overscan = 1.03.
When the WebView composites the video on a hardware overlay (Amazon WebView on Fire OS), the overlay follows the element's layout box but ignores the CSS transform, so the video is drawn at the wrong size and offset. Toggling the WebView flag WebViewSurfaceControlForTV made no difference.
Steps to reproduce
Fire TV Stick 4K 2nd gen (Fire OS 8), Moonfin home with media bar trailer previews enabled.
Wait for a YouTube trailer to start in the media bar.
The trailer is drawn zoomed and shifted (see screenshots).
Possible fixes
Size the stage to the real box (window.innerWidth x window.innerHeight) instead of scaling a fixed 1920x1080 stage, and drop the 1.03 overscan on Android TV / Fire TV; request quality from YouTube (e.g. vq=hd1080) instead of relying on the stage size.
Or offer an option to skip the embedded WebView for trailer previews on Fire TV.
Screenshots / recordings
Two screenshots from the Fire TV: a media bar trailer today (H.264), picture shifted up with a black band only at the top and larger than the screen; and the same issue earlier with an AV1 trailer, logo at the top right cut off.
Activity
RadicalMuffinMan commentedon Nov 5, 2026
Since you found the cause, submit a PR, thank you.
Keep the media bar YouTube trailer inside its box on Fire TV
Screenshots for Moonfin-Core PR (Moonfin-Client#2132)
Keep the media bar YouTube trailer inside its box on Fire TV