fix: crash when two media sessions coexist

This commit is contained in:
Bnyro 2024-11-18 15:35:33 +01:00
parent 2c463da52a
commit c40ab20c20

View File

@ -218,7 +218,9 @@ abstract class AbstractPlayerService : MediaLibraryService(), MediaLibrarySessio
PlayerHelper.setPreferredCodecs(trackSelector) PlayerHelper.setPreferredCodecs(trackSelector)
mediaLibrarySession = MediaLibrarySession.Builder(this, player, this).build() mediaLibrarySession = MediaLibrarySession.Builder(this, player, this)
.setId(this.javaClass.name)
.build()
} }
abstract suspend fun startPlayback() abstract suspend fun startPlayback()