chore(*): upgrade dependencies (StreamPack 2.6.0)

This commit is contained in:
ThibaultBee
2024-02-17 00:08:42 +01:00
parent ab5f45d9c1
commit a1647a7740
7 changed files with 39 additions and 18 deletions

View File

@@ -5,12 +5,12 @@ plugins {
android {
namespace 'io.github.thibaultbee.streampack.example'
compileSdk 33
compileSdk 34
defaultConfig {
applicationId "io.github.thibaultbee.streampack.example"
minSdk 26
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0"
@@ -31,7 +31,9 @@ android {
jvmTarget = '1.8'
}
packagingOptions {
pickFirst '**/*.so'
jniLibs {
pickFirsts += ['**/*.so']
}
}
buildFeatures {
viewBinding true
@@ -40,9 +42,9 @@ android {
dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "io.github.thibaultbee:streampack:${streampackVersion}"
@@ -50,7 +52,7 @@ dependencies {
implementation "io.github.thibaultbee:streampack-extension-rtmp:${streampackVersion}"
// Only needed for SRT live streaming
implementation "io.github.thibaultbee:streampack-extension-srt:${streampackVersion}"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'

View File

@@ -2,9 +2,20 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- For play store -->
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<!-- Required permissions -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Use internally. Not use with camera but it avoid a warning -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:allowBackup="true"

View File

@@ -24,7 +24,6 @@ import io.github.thibaultbee.streampack.listeners.OnConnectionListener
import io.github.thibaultbee.streampack.listeners.OnErrorListener
import io.github.thibaultbee.streampack.streamers.StreamerLifeCycleObserver
import io.github.thibaultbee.streampack.streamers.helpers.CameraStreamerConfigurationHelper
import io.github.thibaultbee.streampack.utils.TAG
import kotlinx.coroutines.launch
class MainActivity : AppCompatActivity() {
@@ -125,8 +124,10 @@ class MainActivity : AppCompatActivity() {
}
}
} else {
streamer.stopStream()
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
lifecycleScope.launch {
streamer.stopStream()
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
}
}
}
}
@@ -147,6 +148,7 @@ class MainActivity : AppCompatActivity() {
binding.preview.streamer = streamer // Bind the streamer to the preview
}
@SuppressLint("MissingPermission")
private fun configureStreamer() {
/**
* To check the parameters supported by the device, you can check parameter against:
@@ -185,4 +187,8 @@ class MainActivity : AppCompatActivity() {
private fun toast(message: String) {
runOnUiThread { applicationContext.toast(message) }
}
companion object {
private const val TAG = "MainActivity"
}
}