Open Kyant0 opened 3 months ago
Thanks for reporting!
I can repro this when I change the session demo app and build the player with an application looper different to the main thread and then call play
followed by a seekToNextItem
from another handler message:
controller.play()
Handler(Looper.myLooper()!!).post {
controller.seekToNextMediaItem()
}
We are looking into a fix for this.
I'm not sure how easy it is for your app to do fix with the current version. From the snippet above the only advise I can see is to no call play()
simultaneously with another controller call in a immediately following handler message, but instead call this in the same handler message.
Using the main thread as the application thread of the player helps as well, but you have probably chosen to do so for a reason.
I understand this is probably not easily possible depending on the design of an app. It's also not a solution from the library side that should support sending commands that way. I don't think I have a better advise for this now I'm afraid.
We will update this issue when we have more information around a fix for this issue.
Version
Media3 1.3.0
More version details
No response
Devices that reproduce the issue
Pixel 4 XL (Android 13)
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Expected result
It works normally.
Actual result
Media
anr_2024-03-19-00-42-14-290.zip
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.