Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Jun 12, 2020
1 parent 51f0ca3 commit cf24c0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RtcEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class RtcEngineManager {
private var mediaObserver: MediaObserver? = null

fun create(context: Context, appId: String, areaCode: Int, @Annotations.AgoraRtcAppType appType: Int, emit: (methodName: String, data: Map<String, Any?>?) -> Unit) {
RtcEngineEx.create(RtcEngineConfig().apply {
engine = RtcEngineEx.create(RtcEngineConfig().apply {
mContext = context
mAppId = appId
mAreaCode = areaCode
Expand Down
3 changes: 3 additions & 0 deletions RtcTextureView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ class RtcTextureView(

private fun setupVideoRenderer(engine: RtcEngine) {
if (uid == 0) {
engine.setLocalVideoRenderer(null)
engine.setLocalVideoRenderer(texture)
} else {
channel?.get()?.let {
it.setRemoteVideoRenderer(uid, null)
it.setRemoteVideoRenderer(uid, texture)
return@setupVideoRenderer
}
engine.setRemoteVideoRenderer(uid, null)
engine.setRemoteVideoRenderer(uid, texture)
}
}
Expand Down

0 comments on commit cf24c0b

Please sign in to comment.