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

@@ -8,11 +8,12 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Set up JDK 12 - name: Set up JDK 17
uses: actions/setup-java@v1 uses: actions/setup-java@v4
with: with:
java-version: 12 distribution: 'adopt'
java-version: 21
- name: Grant execute permission for gradlew - name: Grant execute permission for gradlew
run: chmod +x gradlew run: chmod +x gradlew
- name: Build - name: Build

View File

@@ -5,12 +5,12 @@ plugins {
android { android {
namespace 'io.github.thibaultbee.streampack.example' namespace 'io.github.thibaultbee.streampack.example'
compileSdk 33 compileSdk 34
defaultConfig { defaultConfig {
applicationId "io.github.thibaultbee.streampack.example" applicationId "io.github.thibaultbee.streampack.example"
minSdk 26 minSdk 26
targetSdk 33 targetSdk 34
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
@@ -31,7 +31,9 @@ android {
jvmTarget = '1.8' jvmTarget = '1.8'
} }
packagingOptions { packagingOptions {
pickFirst '**/*.so' jniLibs {
pickFirsts += ['**/*.so']
}
} }
buildFeatures { buildFeatures {
viewBinding true viewBinding true
@@ -40,9 +42,9 @@ android {
dependencies { 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 '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 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "io.github.thibaultbee:streampack:${streampackVersion}" implementation "io.github.thibaultbee:streampack:${streampackVersion}"
@@ -50,7 +52,7 @@ dependencies {
implementation "io.github.thibaultbee:streampack-extension-rtmp:${streampackVersion}" implementation "io.github.thibaultbee:streampack-extension-rtmp:${streampackVersion}"
// Only needed for SRT live streaming // Only needed for SRT live streaming
implementation "io.github.thibaultbee:streampack-extension-srt:${streampackVersion}" 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' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.ext:junit:1.1.5'

View File

@@ -2,9 +2,20 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> 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.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" /> <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 <application
android:allowBackup="true" 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.listeners.OnErrorListener
import io.github.thibaultbee.streampack.streamers.StreamerLifeCycleObserver import io.github.thibaultbee.streampack.streamers.StreamerLifeCycleObserver
import io.github.thibaultbee.streampack.streamers.helpers.CameraStreamerConfigurationHelper import io.github.thibaultbee.streampack.streamers.helpers.CameraStreamerConfigurationHelper
import io.github.thibaultbee.streampack.utils.TAG
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
class MainActivity : AppCompatActivity() { class MainActivity : AppCompatActivity() {
@@ -125,8 +124,10 @@ class MainActivity : AppCompatActivity() {
} }
} }
} else { } else {
streamer.stopStream() lifecycleScope.launch {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED streamer.stopStream()
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
}
} }
} }
} }
@@ -147,6 +148,7 @@ class MainActivity : AppCompatActivity() {
binding.preview.streamer = streamer // Bind the streamer to the preview binding.preview.streamer = streamer // Bind the streamer to the preview
} }
@SuppressLint("MissingPermission")
private fun configureStreamer() { private fun configureStreamer() {
/** /**
* To check the parameters supported by the device, you can check parameter against: * 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) { private fun toast(message: String) {
runOnUiThread { applicationContext.toast(message) } runOnUiThread { applicationContext.toast(message) }
} }
companion object {
private const val TAG = "MainActivity"
}
} }

View File

@@ -2,12 +2,12 @@
buildscript { buildscript {
ext { ext {
// Upgrade StreamPack version here // Upgrade StreamPack version here
streampackVersion = '2.5.2' streampackVersion = '2.6.0'
} }
} }
plugins { plugins {
id 'com.android.application' version '7.4.2' apply false id 'com.android.application' version '8.2.2' apply false
id 'com.android.library' version '7.4.2' apply false id 'com.android.library' version '8.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
} }

View File

@@ -21,3 +21,4 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies, # resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library # thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true android.nonTransitiveRClass=true
android.nonFinalResIds=false

View File

@@ -1,6 +1,6 @@
#Sun Mar 26 13:16:11 CEST 2023 #Sun Mar 26 13:16:11 CEST 2023
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME