fix(android): implement seek backward in notification service (#3808)

This commit is contained in:
Paul Rinaldi 2024-05-21 15:16:07 -05:00 committed by GitHub
parent c80164ccdf
commit 94b3da3477
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,7 @@ class VideoPlaybackCallback(private val seekIntervalMS: Long) : MediaSession.Cal
): ListenableFuture<SessionResult> {
when (customCommand.customAction) {
VideoPlaybackService.COMMAND_SEEK_FORWARD -> session.player.seekTo(session.player.contentPosition + seekIntervalMS)
VideoPlaybackService.COMMAND_SEEK_BACKWARD -> session.player.seekTo(session.player.contentPosition + seekIntervalMS)
VideoPlaybackService.COMMAND_SEEK_BACKWARD -> session.player.seekTo(session.player.contentPosition - seekIntervalMS)
}
return super.onCustomCommand(session, controller, customCommand, args)
}