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
2025-06-24 01:18:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-06-24 01:18:41 +0900
Commit
8301849d3fee61b85458c09c9a662ab9f01a5357
8301849d
1 parent
c74afc4f
Fix RTCEngine not being set to connecting state (#706)
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
25 行增加
和
3 行删除
.changeset/thirty-crews-refuse.md
livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt
livekit-android-test/src/test/java/io/livekit/android/room/RTCEngineMockE2ETest.kt
.changeset/thirty-crews-refuse.md
0 → 100644
查看文件 @
8301849
---
"
client-sdk-android"
:
patch
---
Fix not being able to publish immediately after connecting
...
...
livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt
查看文件 @
8301849
...
...
@@ -117,7 +117,7 @@ internal constructor(
}
when (newVal) {
ConnectionState.CONNECTED -> {
if (oldVal == ConnectionState.DISCONNECTED) {
if (oldVal == ConnectionState.DISCONNECTED
|| oldVal == ConnectionState.CONNECTING
) {
LKLog.d { "primary ICE connected" }
listener?.onEngineConnected()
} else if (oldVal == ConnectionState.RECONNECTING) {
...
...
@@ -209,6 +209,9 @@ internal constructor(
options: ConnectOptions,
roomOptions: RoomOptions,
): JoinResponse = coroutineScope {
if (connectionState == ConnectionState.DISCONNECTED) {
connectionState = ConnectionState.CONNECTING
}
val joinResponse = client.join(url, token, options, roomOptions)
ensureActive()
...
...
livekit-android-test/src/test/java/io/livekit/android/room/RTCEngineMockE2ETest.kt
查看文件 @
8301849
/*
* Copyright 2023-202
4
LiveKit, Inc.
* Copyright 2023-202
5
LiveKit, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -17,9 +17,10 @@
package io.livekit.android.room
import io.livekit.android.test.MockE2ETest
import io.livekit.android.test.events.FlowCollector
import io.livekit.android.test.mock.TestData
import io.livekit.android.test.util.toOkioByteString
import io.livekit.android.test.util.toPBByteString
import io.livekit.android.util.flow
import io.livekit.android.util.toOkioByteString
import kotlinx.coroutines.ExperimentalCoroutinesApi
import livekit.LivekitModels
...
...
@@ -44,6 +45,18 @@ class RTCEngineMockE2ETest : MockE2ETest() {
}
@Test
fun connectionState() = runTest {
val collector = FlowCollector(rtcEngine::connectionState.flow, coroutineRule.scope)
connect()
val events = collector.stopCollecting()
println(events)
assertEquals(3, events.size)
assertEquals(ConnectionState.DISCONNECTED, events[0])
assertEquals(ConnectionState.CONNECTING, events[1])
assertEquals(ConnectionState.CONNECTED, events[2])
}
@Test
fun iceServersSetOnJoin() = runTest {
connect()
val sentIceServers = TestData.JOIN.join.iceServersList
...
...
@@ -143,6 +156,7 @@ class RTCEngineMockE2ETest : MockE2ETest() {
assertEquals(PeerConnection.IceTransportsType.RELAY, subPeerConnection.rtcConfig.iceTransportsType)
}
@Test
fun participantIdOnReconnect() = runTest {
connect()
wsFactory.listener.onFailure(wsFactory.ws, Exception(), null)
...
...
请
注册
或
登录
后发表评论