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-07-13 21:05:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
83caf52f607bb84df79cb1a011ece98c0b1aebfe
83caf52f
1 parent
1e4315ab
Update README to reflect protocol 8 changes
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
16 行增加
和
8 行删除
README.md
README.md
查看文件 @
83caf52
...
...
@@ -94,17 +94,13 @@ class MainActivity : AppCompatActivity(), RoomListener {
val token = "your_token"
lifecycleScope.launch {
val room = LiveKit.connect(
// Create Room object.
val room = LiveKit.create(
applicationContext,
url,
token,
ConnectOptions(),
RoomOptions(),
)
val localParticipant = room.localParticipant
localParticipant.setMicrophoneEnabled(true)
localParticipant.setCameraEnabled(true)
// Setup event handling.
launch {
room.events.collect { event ->
when(event){
...
...
@@ -112,6 +108,18 @@ class MainActivity : AppCompatActivity(), RoomListener {
}
}
}
// Connect to server.
room.connect(
url,
token,
ConnectOptions()
)
// Turn on audio/video recording.
val localParticipant = room.localParticipant
localParticipant.setMicrophoneEnabled(true)
localParticipant.setCameraEnabled(true)
}
}
...
...
请
注册
或
登录
后发表评论