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
David Liu
2021-04-04 12:49:12 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
89ac59d5ee2a8e6ff6fd5aa94677db61b8f29022
89ac59d5
1 parent
e4252e95
Don't wait for ice connection onJoin to fix race condition
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
4 行增加
和
11 行删除
livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt
livekit-android-sdk/src/main/java/io/livekit/android/room/Room.kt
livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt
查看文件 @
89ac59d
...
...
@@ -33,16 +33,7 @@ constructor(
var listener: Listener? = null
var rtcConnected: Boolean = false
var joinResponse: LivekitRtc.JoinResponse? = null
var iceConnected: Boolean = false
set(value) {
field = value
val savedJoinResponse = joinResponse
if (field && savedJoinResponse != null) {
listener?.onJoin(savedJoinResponse)
joinResponse = null
}
}
private val pendingTrackResolvers: MutableMap<String, Continuation<LivekitModels.TrackInfo>> =
mutableMapOf()
...
...
@@ -145,7 +136,6 @@ constructor(
}
override fun onJoin(info: LivekitRtc.JoinResponse) {
joinResponse = info
val iceServers = mutableListOf<PeerConnection.IceServer>()
for(serverInfo in info.iceServersList){
...
...
@@ -163,7 +153,6 @@ constructor(
if(iceServers.isEmpty()){
iceServers.addAll(RTCClient.DEFAULT_ICE_SERVERS)
}
info.iceServersList.forEach {
Timber.e{ "username = \"${it.username}\""}
Timber.e{ "credential = \"${it.credential}\""}
...
...
@@ -172,6 +161,7 @@ constructor(
Timber.e{" $it"}
}
}
listener?.onJoin(info)
val rtcConfig = PeerConnection.RTCConfiguration(iceServers).apply {
sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN
...
...
livekit-android-sdk/src/main/java/io/livekit/android/room/Room.kt
查看文件 @
89ac59d
...
...
@@ -80,6 +80,7 @@ constructor(
listener?.onParticipantDisconnected(this, removedParticipant)
}
@Synchronized
private fun getOrCreateRemoteParticipant(
sid: String,
info: LivekitModels.ParticipantInfo? = null
...
...
@@ -157,6 +158,8 @@ constructor(
if (!response.hasParticipant()) {
listener?.onFailedToConnect(this, RoomException.ConnectException("server didn't return any participants"))
connectContinuation?.resume(Unit)
connectContinuation = null
return
}
...
...
请
注册
或
登录
后发表评论