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
Thank you so much for testing out our Compose Demo, it's still a WIP, so any Compose and Kotlin expertise are always welcome, especially from ex-devrels :)
I tried out your example and I cannot reproduce the problem. Here is me going back and forth in a playlist of 3 HLS videos:
2025-01-17 14:37:11.255 27186-27186 PresentationState androidx.media3.demo.compose D videosize is Size(1036.0, 720.0)
2025-01-17 14:37:16.505 27186-27186 PresentationState androidx.media3.demo.compose D videosize is Size(1036.0, 720.0)
2025-01-17 14:37:21.783 27186-27186 PresentationState androidx.media3.demo.compose D videosize is Size(324.0, 720.0)
2025-01-17 14:37:27.623 27186-27186 PresentationState androidx.media3.demo.compose D videosize is Size(1036.0, 720.0)
2025-01-17 14:37:30.150 27186-27186 PresentationState androidx.media3.demo.compose D videosize is Size(1036.0, 720.0)
2025-01-17 14:37:31.577 27186-27186 PresentationState androidx.media3.demo.compose D videosize is Size(1036.0, 720.0)
2025-01-17 14:37:32.500 27186-27186 PresentationState androidx.media3.demo.compose D videosize is Size(324.0, 720.0)
val presentationState = rememberPresentationState(player)
val scaledModifier = Modifier.resizeWithContentScale(contentScale, presentationState.videoSizeDp)
Does it only happen to you when the ContentScale button shows FIT?
Version
Media3 main branch
More version details
0d8e422
Devices that reproduce the issue
Devices that do not reproduce the issue
Reproducible in the demo app?
Yes
Reproduction steps
If have two or more HLS videos in a playlist, the largest video size encountered is reported for consecutive HLS videos in the playlist.
This causes:
Surface
it is displayed in.onVideoSizeChanged
callback ofPlayer.Listener
.The proper video size is reported with the following however
The only way things reset to normal is by playing a non HLS video.
Repro steps can be seen in the PR against my repo fork: https://github.com/tunjid/media/pull/1/files
Videos showing the bug have been attached in the actual result section.
Expected result
Each hls video reports its proper size to the
Player.Listener
and renders at that size in theSurface
it is playing in.Actual result
Case 1: Smaller video is played first
e1.mp4
Case 2: Larger video is played first
e2.mp4
Media
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: