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
2023-11-08 13:47:28 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
22dde8bfbdb575dd695dc11995d99ce4254051e3
22dde8bf
1 parent
25e18f9b
Fix message handling in example
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
2 行增加
和
4 行删除
sample-app-common/src/main/java/io/livekit/android/sample/CallViewModel.kt
sample-app-common/src/main/java/io/livekit/android/sample/CallViewModel.kt
查看文件 @
22dde8b
...
...
@@ -111,8 +111,6 @@ class CallViewModel(
private val mutablePermissionAllowed = MutableStateFlow(true)
val permissionAllowed = mutablePermissionAllowed.hide()
var messagesReceived = 0
init {
viewModelScope.launch {
// Collect any errors.
...
...
@@ -139,8 +137,8 @@ class CallViewModel(
is RoomEvent.FailedToConnect -> mutableError.value = it.error
is RoomEvent.DataReceived -> {
val identity = it.participant?.identity ?: "server"
messagesReceived++
Timber.e { "message received from $identity, count $messagesReceived" }
val message = it.data.toString(Charsets.UTF_8)
mutableDataReceived.emit("$identity: $message")
}
else -> {
...
...
请
注册
或
登录
后发表评论