Open Ioan1995 opened 4 weeks ago
What RESIZE_MODE are you using?
PlayerView's Content is rendered inside AspectRatioFrameLayout https://github.com/androidx/media/blob/c35a9d62baec57118ea898e271ac66819399649b/libraries/ui/src/main/java/androidx/media3/ui/PlayerView.java#L296
The resizing mode will affect how AspectRatioFrameLayout will remeasure the width/height https://github.com/androidx/media/blob/c35a9d62baec57118ea898e271ac66819399649b/libraries/ui/src/main/java/androidx/media3/ui/AspectRatioFrameLayout.java#L184-L209
Hello AndroidX.media3 team,
I've encountered an issue related to video scaling on a device running Android 7.0, using the Media3 library version 1.4.0.
In the demo application, I've added two buttons that scale the
PlayerView
to specificdimensions
:- scale(187, 684, 384, 216)
– scaling to custom dimensions– returning to fullscreen
Here is the code used for scaling:The issue is as follows: while the PlayerView correctly changes its size and position, the video continues to play at its initial size (fullscreen) without adapting to the new layout. This problem occurs only on Android 7.0. On newer versions of Android (8.0, 11, 12), the scaling works as expected.
I also tried manually switching the video tracks to a lower resolution. This worked only if the player was not paused (i.e., exoPlayer.setPlayWhenReady(true); was set).
I've attached a log from the application and two video recordings to illustrate the issue:
A screen recording captured using Android Studio's screen recorder. A video recording captured using a phone, which shows the difference in behavior. scale.log
https://github.com/user-attachments/assets/1a360ac6-42c0-4457-b444-644137419f4f
https://github.com/user-attachments/assets/1cffb8c2-0e33-4344-b1f5-c040f6662743