Closed javierxio closed 3 months ago
Underlying browser and Android version?
https://w3c.github.io/mediasession/#position-state Not saying it's not possible, but the spec says UserAgent MAY. IOS seems to not have issues with obtaining or maintaining position state. We just need more information regarding OS version and underlying browser (even if the chrome is not being shown). Bottom line is if there is a solution we will implement it.
@benjkent android 12, chrome browser. although my other phone (android 14, vanadium browser) shows a different behavior (mainly no timestamps/lengths):
After many attempts to duplicate your issue. I believe at this point, the sleep - wake issue of not displaying / maintaining "current or last position" stems from some aspect of the Android OS. I base this theory on the fact that when the device wakes the actual control has been severed earlier by the "sleep" state. While the media-session is still displaying in pulldown menu due to the browser or webapp still in state.
Thanks for looking into it. It's not a big deal so I am ok with closing the ticket. The app will save the timestamp anyway so that is good.
I feel that there are others that may be frustrated by this issue too. Ultimately, after looking at quite a few other audio projects and their use of the media-session actions, the issue seem to get glossed over. Kind of like cool there it, but no real in-depth dive. Let's keep this issue in mind as the app develops. As Media session API develops a solution may present itself.
When phone is unlocked and pull down the menu, the audio player is showing the end timestamp during playback. When the audio is paused, the correct timestamp shows and correct position in the seekbar.
During playback (bug):
While paused (shows correct):