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
Hello,
I'm using media3 version 1.0.0-beta03. I observed the following behavior in the demo-session which uses the DefaultMediaNotificationProvider.
If you press quickly on the PLAY_PAUSE button in the media notification, it will automatically seek to the next item.
Is it a bug or an expected behavior? Is there a way to disable the "seek to next" behavior?
Currently, I overrided the onPlayerCommandRequest in the MediaLibrarySession.Callback to fix the issue but it does not work. It seems that the player command SEEK_TO_NEXT is sent when double tapping on the button PLAY_PAUSE.
override fun onPlayerCommandRequest(session: MediaSession, controller: MediaSession.ControllerInfo, playerCommand: Int): Int {
return when (playerCommand) {
Player.COMMAND_PLAY_PAUSE -> {
if (player.playWhenReady) {
player.pause()
} else {
player.play()
}
SessionResult.RESULT_INFO_SKIPPED
}
else -> super.onPlayerCommandRequest(session, controller, playerCommand)
}
}
Also, if I set the player command SEEK_TO_NEXT_MEDIA_ITEM in the media notification provider, it will be received as the player command SEEK_TO_NEXT in the method onPlayerCommandRequest...