|
|
@@ -22,6 +22,7 @@ import com.adealink.weparty.call.constant.TAG_CALL
|
|
|
import com.adealink.weparty.call.constant.TAG_CALL_MATCH_MODE
|
|
|
import com.adealink.weparty.call.match.matchManager
|
|
|
import com.adealink.weparty.call.widget.BaseCallViewComponent
|
|
|
+import com.adealink.weparty.commonui.ext.addViewSafe
|
|
|
import com.adealink.weparty.commonui.ext.gone
|
|
|
import com.adealink.weparty.commonui.ext.show
|
|
|
import com.tencent.cloud.tuikit.engine.call.TUICallDefine
|
|
|
@@ -162,13 +163,13 @@ class VideoRoomComp(
|
|
|
if (TUICallState.instance.showLargeViewUserId.get() == bigVideoUser?.id) {
|
|
|
TUICallState.instance.showLargeViewUserId.set(smallVideoUser?.id)
|
|
|
|
|
|
- smallVideoContainer?.addView(bigVideoView)
|
|
|
- bigVideoContainer?.addView(smallVideoView)
|
|
|
+ smallVideoContainer?.addViewSafe(bigVideoView)
|
|
|
+ bigVideoContainer?.addViewSafe(smallVideoView)
|
|
|
} else {
|
|
|
TUICallState.instance.showLargeViewUserId.set(bigVideoUser?.id)
|
|
|
|
|
|
- smallVideoContainer?.addView(smallVideoView)
|
|
|
- bigVideoContainer?.addView(bigVideoView)
|
|
|
+ smallVideoContainer?.addViewSafe(smallVideoView)
|
|
|
+ bigVideoContainer?.addViewSafe(bigVideoView)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -185,7 +186,7 @@ class VideoRoomComp(
|
|
|
smallVideoContainer.removeAllViews()
|
|
|
}
|
|
|
setSmallRenderViewOrientation()
|
|
|
- smallVideoContainer.addView(smallVideoView)
|
|
|
+ smallVideoContainer.addViewSafe(smallVideoView)
|
|
|
openVideo(smallVideoUser, smallVideoView, forceOpen)
|
|
|
}
|
|
|
}
|
|
|
@@ -200,7 +201,7 @@ class VideoRoomComp(
|
|
|
(bigVideoView?.parent as ViewGroup).removeView(bigVideoView)
|
|
|
bigVideoContainer.removeAllViews()
|
|
|
}
|
|
|
- bigVideoContainer.addView(bigVideoView)
|
|
|
+ bigVideoContainer.addViewSafe(bigVideoView)
|
|
|
openVideo(bigVideoUser, bigVideoView, forceOpen)
|
|
|
}
|
|
|
|