Open DenislavNedev opened 9 months ago
@DenislavNedev I am not sure it is related to my issue or not but I got the same issue on Android 12 (Samsung device) . I was able to resolve it by following this https://github.com/google/ExoPlayer/issues/10021#issuecomment-1134589796 Hope this help
Hi all. As you can see from the mention in the timeline, I think we are seeing an issue in AVPro Video (a Unity video playback asset) that maybe a manifestation of this issue. I think we are only seeing it when we create a new ExoPlayer object every time we play a video (opening the same video over and over on a persistent ExoPlayer object seems fine), destroying the previous one before the creation of the new one. Also, I think it is only seen with a video that has no audio tracks. The issue was not 100% reproducible, but we can make it happen often.
What led me here is that the player was getting stuck in the buffering state, and we would get no 'onVideoSizeChanged(...)' callback firing when the video was getting stuck...and the times it was playing as expected I was seeing this fire and then moving out of the buffering state.
Devices tested (issue seen on all of them):
@DenislavNedev I am not sure it is related to my issue or not but I got the same issue on Android 12 (Samsung device) . I was able to resolve it by following this google/ExoPlayer#10021 (comment) Hope this help
It seems this only resolve for some videos only i was able to reproduce it with some other videos. it happens randomly, not 100% @Ste-RH Do you find any solution for this ?
@peterstickermaker For us, deferral our surface creation/attach by two frames from where we were doing it (which was in a callback) seems to have fixed the issue. Strange it is 2 frames...1 frame made things better, but did not completely eradicate the problem.
Version
Media3 1.2.0
More version details
No response
Devices that reproduce the issue
Devices that do not reproduce the issue
Reproducible in the demo app?
Yes
Reproduction steps
I am playing video as a background of the app. The app is using Jetpack Compose. The video is located in the
raw
folder in the resources and it is played automatically when the app is started. Sometimes the video is not playing and a black screen is shown. I've attachedEventLogger
and saw that the player is stuck atBUFFERING
state.EventLogger
when the video is working:EventLogger
when the video is not workingThis issue is happening sometimes on different devices. On Xiaomi Mi10 Lite is happening once in 20-30 startups, while on Samsung A12 almost whenever the app is opened. I tried reproducing it on an emulator with low RAM and memory, but the video was still playing.
Note: This is a copy of https://github.com/androidx/media/issues/944 because the other issue was not reopened after I've sent the media.
Expected result
Play the video all the time.
Actual result
Video is not played sometimes.
Media
I've send the media file to the email
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.