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
2022-04-25 20:00:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a712f59ad052df7634f5f16783b40f6f0fb4d6b1
a712f59a
1 parent
8cce1880
Stop and start camera when disabling/enabling camera track.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
9 行增加
和
0 行删除
livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt
livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt
查看文件 @
a712f59
...
...
@@ -171,6 +171,10 @@ internal constructor(
if (enabled) {
if (pub != null) {
pub.muted = false
if (source == Track.Source.CAMERA && pub.track is LocalVideoTrack) {
(pub.track as? LocalVideoTrack)?.startCapture()
}
} else {
when (source) {
Track.Source.CAMERA -> {
...
...
@@ -199,6 +203,11 @@ internal constructor(
unpublishTrack(track)
} else {
pub.muted = true
// Release camera session so other apps can use.
if (pub.source == Track.Source.CAMERA && track is LocalVideoTrack) {
track.stopCapture()
}
}
}
}
...
...
请
注册
或
登录
后发表评论