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
2021-10-19 13:08:21 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2021-10-19 13:08:21 +0900
Commit
1ba2da83e1ac51b5252e304cd48570497321ffda
1ba2da83
1 parent
4e76e36e
debounce negotiations with a timer of 0.1s to fix failing connect (#13)
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
10 行增加
和
3 行删除
livekit-android-sdk/src/main/java/io/livekit/android/room/PeerConnectionTransport.kt
livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt
livekit-android-sdk/src/main/java/io/livekit/android/room/PeerConnectionTransport.kt
查看文件 @
1ba2da8
...
...
@@ -68,7 +68,14 @@ constructor(
return result
}
val negotiate = debounce<Unit, Unit>(100, coroutineScope) { createAndSendOffer() }
val negotiate = debounce<MediaConstraints?, Unit>(100, coroutineScope) {
if (it != null) {
createAndSendOffer(it)
} else {
createAndSendOffer()
}
}
suspend fun createAndSendOffer(constraints: MediaConstraints = MediaConstraints()) {
if (listener == null) {
return
...
...
livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt
查看文件 @
1ba2da8
...
...
@@ -272,7 +272,7 @@ internal constructor(
subscriber.prepareForIceRestart()
// only restart publisher if it's needed
if (hasPublished) {
publisher.
createAndSendOffer
(
publisher.
negotiate
(
getPublisherOfferConstraints().apply {
with(mandatory){
add(
...
...
@@ -294,7 +294,7 @@ internal constructor(
return
}
coroutineScope.launch {
publisher.
createAndSendOffer
(getPublisherOfferConstraints())
publisher.
negotiate
(getPublisherOfferConstraints())
}
}
...
...
请
注册
或
登录
后发表评论