This commit is contained in:
vfsfitvnm 2022-10-13 20:10:42 +02:00
parent 92141f4f49
commit 0de5330676

View file

@ -229,6 +229,7 @@ class PlayerService : InvincibleService(), Player.Listener, PlaybackStatsListene
maybeRestorePlayerQueue()
mediaSession = MediaSession(baseContext, "PlayerService")
mediaSession.setFlags(MediaSession.FLAG_HANDLES_MEDIA_BUTTONS or MediaSession.FLAG_HANDLES_TRANSPORT_CONTROLS)
mediaSession.setCallback(SessionCallback(player))
mediaSession.setPlaybackState(stateBuilder.build())
mediaSession.isActive = true