diff --git a/android/src/main/java/com/bitmovin/player/reactnative/MediaSessionConnectionManager.kt b/android/src/main/java/com/bitmovin/player/reactnative/MediaSessionConnectionManager.kt index 673183b0..f93dfeb1 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/MediaSessionConnectionManager.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/MediaSessionConnectionManager.kt @@ -1,6 +1,5 @@ package com.bitmovin.player.reactnative - import android.content.ComponentName import android.content.Context import android.content.Intent @@ -20,7 +19,7 @@ class MediaSessionConnectionManager(val context: ReactApplicationContext) { private val _serviceBinder = MutableStateFlow(null) val serviceBinder = _serviceBinder.asStateFlow() - inner class MediaSessionServiceConnection: ServiceConnection { + inner class MediaSessionServiceConnection : ServiceConnection { override fun onServiceConnected(className: ComponentName, service: IBinder) { // We've bound to the Service, cast the IBinder and get the Player instance val binder = service as MediaSessionPlaybackService.ServiceBinder diff --git a/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt b/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt index 2d42085c..aea71de2 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt @@ -15,7 +15,6 @@ import com.bitmovin.player.api.event.PlayerEvent import com.bitmovin.player.api.event.SourceEvent import com.bitmovin.player.api.ui.PlayerViewConfig import com.bitmovin.player.api.ui.StyleConfig -import com.bitmovin.player.reactnative.converter.lockScreenControlConfig import com.bitmovin.player.reactnative.converter.toJson import com.bitmovin.player.reactnative.extensions.playerModule import com.facebook.react.ReactActivity diff --git a/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt b/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt index 5370e7f2..92843081 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt @@ -884,7 +884,7 @@ fun String.toMediaType(): MediaType? = when (this) { } data class LockScreenControlConfig( - var isEnabled: Boolean = false + var isEnabled: Boolean = false, ) fun ReadableMap.toLockScreenControlConfig(): LockScreenControlConfig = LockScreenControlConfig().apply { diff --git a/android/src/main/java/com/bitmovin/player/reactnative/services/MediaSessionPlaybackService.kt b/android/src/main/java/com/bitmovin/player/reactnative/services/MediaSessionPlaybackService.kt index 5ed3198c..0091d873 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/services/MediaSessionPlaybackService.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/services/MediaSessionPlaybackService.kt @@ -20,7 +20,7 @@ class MediaSessionPlaybackService : MediaSessionService() { } fun connectSession() = mediaSession?.let { addSession(it) } - fun disconnectSession() = mediaSession?.let{ + fun disconnectSession() = mediaSession?.let { removeSession(it) it.release() }