Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
livekitAndroidXuningTest
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
davidliu
2024-05-28 22:10:38 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-05-28 22:10:38 +0900
Commit
ab2988d1f9252f6a7bec3a56d20d3888c071729d
ab2988d1
1 parent
e3db9878
Only use camerax provider if lifecycle is not destroyed (#424)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
livekit-android-camerax/src/main/java/livekit/org/webrtc/CameraXHelper.kt
livekit-android-camerax/src/main/java/livekit/org/webrtc/CameraXHelper.kt
查看文件 @
ab2988d
...
...
@@ -19,6 +19,7 @@ package livekit.org.webrtc
import android.content.Context
import android.hardware.camera2.CameraManager
import androidx.camera.camera2.interop.ExperimentalCamera2Interop
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import io.livekit.android.room.track.LocalVideoTrackOptions
import io.livekit.android.room.track.video.CameraCapturerUtils
...
...
@@ -66,7 +67,9 @@ class CameraXHelper {
)
}
override fun isSupported(context: Context) = Camera2Enumerator.isSupported(context)
override fun isSupported(context: Context): Boolean {
return Camera2Enumerator.isSupported(context) && lifecycleOwner.lifecycle.currentState.isAtLeast(Lifecycle.State.INITIALIZED)
}
}
private fun getSupportedFormats(
...
...
请
注册
或
登录
后发表评论