diff --git a/android/app/src/main/kotlin/com/edde746/plezy/MainActivity.kt b/android/app/src/main/kotlin/com/edde746/plezy/MainActivity.kt index 78e14661..3d0142d4 100644 --- a/android/app/src/main/kotlin/com/edde746/plezy/MainActivity.kt +++ b/android/app/src/main/kotlin/com/edde746/plezy/MainActivity.kt @@ -791,12 +791,10 @@ class MainActivity : FlutterActivity() { audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, target, 0) } - private fun streamMinVolume(audioManager: AudioManager): Int { - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - audioManager.getStreamMinVolume(AudioManager.STREAM_MUSIC) - } else { - 0 - } + private fun streamMinVolume(audioManager: AudioManager): Int = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + audioManager.getStreamMinVolume(AudioManager.STREAM_MUSIC) + } else { + 0 } override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, newConfig: Configuration) { diff --git a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerCore.kt b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerCore.kt index 84e65095..49e1f559 100644 --- a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerCore.kt +++ b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerCore.kt @@ -113,6 +113,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener { private var assGlCrashHandlerInstalled = false @Volatile private var cronetEngine: CronetEngine? = null + @Volatile private var cronetUnavailable = false private fun getCronetEngine(context: Context): CronetEngine? { cronetEngine?.let { return it } diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 7a20c467..0e51052d 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -75,7 +75,9 @@ import MediaPlayer if setMediaVolume(value) { result(nil) } else { - result(FlutterError(code: "DEVICE_ADJUSTMENT_UNAVAILABLE", message: "System volume slider unavailable", details: nil)) + result( + FlutterError(code: "DEVICE_ADJUSTMENT_UNAVAILABLE", message: "System volume slider unavailable", details: nil) + ) } default: result(FlutterMethodNotImplemented)