Skip to content

Commit

Permalink
chore(android): remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Feb 12, 2024
1 parent 51caed9 commit dfe882f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class FlutterLiveStreamView(
onError(e)
}
},
onShowPermissionRationale = { onRequiredPermissionLastTime ->
onShowPermissionRationale = { _ ->
/**
* Require an AppCompat theme to use MaterialAlertDialogBuilder
*
Expand Down Expand Up @@ -135,7 +135,7 @@ class FlutterLiveStreamView(
onError(e)
}
},
onShowPermissionRationale = { onRequiredPermissionLastTime ->
onShowPermissionRationale = { _ ->
/**
* Require an AppCompat theme to use MaterialAlertDialogBuilder
*
Expand Down Expand Up @@ -194,12 +194,12 @@ class FlutterLiveStreamView(
val isConnected = streamer.isConnected
runBlocking {
streamer.stopStream()
streamer.disconnect()
if (isConnected) {
onDisconnected()
}
_isStreaming = false
}
streamer.disconnect()
if (isConnected) {
onDisconnected()
}
_isStreaming = false
}

fun startPreview(onSuccess: () -> Unit, onError: (Exception) -> Unit) {
Expand All @@ -218,7 +218,7 @@ class FlutterLiveStreamView(
}
}
},
onShowPermissionRationale = { onRequiredPermissionLastTime ->
onShowPermissionRationale = { _ ->
/**
* Require an AppCompat theme to use MaterialAlertDialogBuilder
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import io.flutter.plugin.common.EventChannel
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.view.TextureRegistry
import video.api.flutter.livestream.utils.addTrailingSlashIfNeeded
import video.api.flutter.livestream.utils.toAudioConfig
import video.api.flutter.livestream.utils.toVideoConfig

class MethodCallHandlerImpl(
private val context: Context,
Expand Down Expand Up @@ -69,6 +72,7 @@ class MethodCallHandlerImpl(

"setVideoConfig" -> {
try {
@Suppress("UNCHECKED_CAST")
val videoConfig = (call.arguments as Map<String, Any>).toVideoConfig()
flutterView!!.setVideoConfig(
videoConfig,
Expand All @@ -87,6 +91,7 @@ class MethodCallHandlerImpl(

"setAudioConfig" -> {
try {
@Suppress("UNCHECKED_CAST")
val audioConfig = (call.arguments as Map<String, Any>).toAudioConfig()
flutterView!!.setAudioConfig(
audioConfig,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package video.api.flutter.livestream
package video.api.flutter.livestream.utils

import android.util.Size
import io.github.thibaultbee.streampack.data.AudioConfig
Expand Down
1 change: 0 additions & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

0 comments on commit dfe882f

Please sign in to comment.