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
I want to be able to stop playback when exiting a screen. For example:
controller.stop()
controller.seekTo(0)
controller.release()
The problem here is that calling release() causes stop() and seekTo() to be dropped, so they never happen.
Proposed solution
release() should dispatch existing messages first, or there should be a clear way to not have the messages dropped. The current behavior is non-intuitive.
Alternatives considered
A clear and concise description of any alternative solutions you considered,
if applicable.
Handler.postDelayed({ controller.release }, 100)
The text was updated successfully, but these errors were encountered:
We currently clear all pending messages, including the one that flushes
pending commands to the MediaSession. To ensure all commands that have
been called before controller.release() are still sent, we can manually
trigger the flush message from the release call.
Related to handling the final flush because disconnecting the controller,
MediaSessionStub didn't post the removal of the controller to the
session thread, creating a race condition between removing the controller
and actually handling the flush.
Issue: #99
PiperOrigin-RevId: 462342860
We currently clear all pending messages, including the one that flushes
pending commands to the MediaSession. To ensure all commands that have
been called before controller.release() are still sent, we can manually
trigger the flush message from the release call.
Related to handling the final flush because disconnecting the controller,
MediaSessionStub didn't post the removal of the controller to the
session thread, creating a race condition between removing the controller
and actually handling the flush.
Issue: #99
PiperOrigin-RevId: 462342860
(cherry picked from commit ee20969)
[REQUIRED] Use case description
I want to be able to stop playback when exiting a screen. For example:
controller.stop()
controller.seekTo(0)
controller.release()
The problem here is that calling release() causes stop() and seekTo() to be dropped, so they never happen.
Proposed solution
release() should dispatch existing messages first, or there should be a clear way to not have the messages dropped. The current behavior is non-intuitive.
Alternatives considered
A clear and concise description of any alternative solutions you considered,
if applicable.
Handler.postDelayed({ controller.release }, 100)
The text was updated successfully, but these errors were encountered: