You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: live/tuilivekit/src/main/java/com/trtc/uikit/livekit/features/audiencecontainer/view/LiveCoreViewMaskBackgroundView.kt
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ class LiveCoreViewMaskBackgroundView @JvmOverloads constructor(
50
50
privatevar middleRect =Rect()
51
51
privatevar bottomRect =Rect()
52
52
privatevar enableBlur =true
53
+
privatevar isPortrait =true
53
54
54
55
privatevar subscribeStateJob:Job?=null
55
56
@@ -269,7 +270,16 @@ class LiveCoreViewMaskBackgroundView @JvmOverloads constructor(
269
270
setBackgroundColor(color)
270
271
}
271
272
273
+
funsetPortrait(isPortrait:Boolean) {
274
+
this.isPortrait = isPortrait
275
+
invalidate()
276
+
}
277
+
272
278
funisFullScreenLayoutBySeatLayout(): Boolean {
279
+
val videoLandscape4SeatsTemplateID =200
280
+
if (audienceStore.getLiveSeatState().canvas.value.templateID == videoLandscape4SeatsTemplateID && isPortrait) {
281
+
returnfalse
282
+
}
273
283
if (audienceStore.getLiveSeatState().seatList.value.isEmpty()) {
274
284
returntrue
275
285
}
@@ -293,6 +303,16 @@ class LiveCoreViewMaskBackgroundView @JvmOverloads constructor(
293
303
invalidate()
294
304
return
295
305
}
306
+
if (audienceStore.getLiveSeatState().canvas.value.templateID ==200&& isPortrait) {
307
+
val screenWidth =ScreenUtil.getScreenWidth(context)
308
+
val videoTop =ScreenUtil.dip2px(150f)
309
+
val videoBottom = screenWidth *9/16+ScreenUtil.dip2px(150f)
0 commit comments