Update AutoMediaBrowserCallback.kt

This commit is contained in:
birdbird 2022-07-05 18:34:24 +02:00 committed by GitHub
parent 05ada9297d
commit d034fc9c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -171,6 +171,10 @@ class AutoMediaBrowserCallback(var player: Player, val libraryService: MediaLibr
val connectionResult = super.onConnect(session, controller) val connectionResult = super.onConnect(session, controller)
val availableSessionCommands = connectionResult.availableSessionCommands.buildUpon() val availableSessionCommands = connectionResult.availableSessionCommands.buildUpon()
/*
* TODO: Currently we need to create a custom session command, see https://github.com/androidx/media/issues/107
* When this issue is fixed we should be able to remove this method again
*/
availableSessionCommands.add(SessionCommand(SESSION_CUSTOM_SET_RATING, Bundle())) availableSessionCommands.add(SessionCommand(SESSION_CUSTOM_SET_RATING, Bundle()))
return MediaSession.ConnectionResult.accept( return MediaSession.ConnectionResult.accept(