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-11-10 15:48:40 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
405e5ff7d7d1f32d5eb76e557cbb220149a771fe
405e5ff7
1 parent
8ad1080f
update readme to use new simple apis
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
5 行增加
和
8 行删除
README.md
README.md
查看文件 @
405e5ff
...
...
@@ -38,13 +38,10 @@ class MainActivity : AppCompatActivity(), RoomListener {
this
)
val localParticipant = room.localParticipant
val audioTrack = localParticipant.createAudioTrack()
localParticipant.publishAudioTrack(audioTrack)
val videoTrack = localParticipant.createVideoTrack()
localParticipant.publishVideoTrack(videoTrack)
videoTrack.startCapture()
localParticipant.setMicrophoneEnabled(true)
localParticipant.setCameraEnabled(true)
attachVideo(videoTrack
, localParticipant
)
attachVideo(videoTrack)
}
}
...
...
@@ -55,11 +52,11 @@ class MainActivity : AppCompatActivity(), RoomListener {
room: Room
) {
if (track is VideoTrack) {
attachVideo(track
, participant
)
attachVideo(track)
}
}
private fun attachVideo(videoTrack: VideoTrack
, participant: Participant
) {
private fun attachVideo(videoTrack: VideoTrack) {
// viewBinding.renderer is a `org.webrtc.SurfaceViewRenderer` in your
// layout
videoTrack.addRenderer(viewBinding.renderer)
...
...
请
注册
或
登录
后发表评论