Skip to content

Commit 75f572d

Browse files
committed
fix: use the better way to fix rendering problems
1 parent 9ab28a7 commit 75f572d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

RtcSurfaceView.kt

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class RtcSurfaceView(
7171
surface.setZOrderMediaOverlay(isMediaOverlay)
7272
surface.setZOrderOnTop(onTop)
7373
addView(surface)
74+
surface.layout(0, 0, width, height)
7475
canvas.view = surface
7576
if (canvas.uid == 0) {
7677
engine.setupLocalVideo(canvas)

RtcTextureView.kt

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class RtcTextureView(
4545
removeAllViews()
4646
texture = RtcEngine.CreateTextureView(context.applicationContext)
4747
addView(texture)
48+
texture.layout(0, 0, width, height)
4849
canvas.view = texture
4950
if (canvas.uid == 0) {
5051
engine.setupLocalVideo(canvas)

0 commit comments

Comments
 (0)