-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scaling Bug in media3 with Android 14 #1184
Comments
I think the library is doing what should be expected from documentation. Let me paste the relevant code snippet: media/libraries/ui/src/main/java/androidx/media3/ui/AspectRatioFrameLayout.java Lines 174 to 209 in d13a0f4
Now back to your particular video sample:
Attaching my own reproduction screenshot below. Feel free to debug yourself - AspectRatioFrameLayout is the place Note, however, there is currently a problem with using SurfaceView and AspectRatioFrameLayout where FIT will work, but ZOOM will leak the contents of the video to outside of the FrameLayout (#1123, #1120, #1107) |
@oceanjules Iam using RESIZE_MODE_FIT and still able to see the above on Pixel 14 devices. Is there any possible work around for this to work with compose? |
I have same issue but when switching the orientation to landscape will solve the problem. |
@Junaid17 RESIZE_MODE_FIT looks at |
Version
Media3 main branch
More version details
When using the
media3-exoplayer
library to play videos in a Jetpack Compose application withPlayerView
inside anAndroidView
, the video content does not scale correctly on devices running Android 14. The issue is observable on a Pixel 7 Pro where usingRESIZE_MODE_FIT
leads to the video not filling thePlayerView
as expected. This issue does not occur withRESIZE_MODE_FILL
, but it is present in all other resize modes, includingRESIZE_MODE_FIXED_HEIGHT
,RESIZE_MODE_FIXED_WIDTH
, andRESIZE_MODE_ZOOM
.Reproducible in the demo app?
The issue is not reproducible in the standard demo app but can be observed in a custom Jetpack Compose setup. in Linked demo app, if you use
MainActivity2
I use xml and there is no issue there.Using: RESIZE_MODE_FILL
Using: RESIZE_MODE_FIT
Devices that reproduce the issue
Devices that do not reproduce the issue
Reproducible in the demo app?
Yes
Reproduction steps
PlayerView
withresizeMode
set toRESIZE_MODE_FIT
.PlayerView
.Expected result
The video content should scale to fit within the
PlayerView
without any cropping or letterboxing, maintaining the video's aspect ratio.Actual result
The video content does not scale properly, and parts of the video are cropped or do not fill the
PlayerView
.Media
Link to test content
Github: https://github.com/sunnat629/Media3ExoplayerScale
Version of the library
Media3 version: 1.3.0
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.The text was updated successfully, but these errors were encountered: