Hi team,
I have following code in our app that presents the share canvas from remote user:
internal fun ZoomScreenShareVideo(
userId: String,
onError: (Throwable) -> Unit,
modifier: Modifier = Modifier
) {
val isPreview = LocalInspectionMode.current
if (isPreview) return
val zoom = try {
ZoomVideoSDK.getInstance()
} catch (expected: Throwable) {
onError(expected)
return
}
val videoCanvas = zoom.findUser(userId)?.shareActionList?.firstOrNull()?.shareCanvas ?: return
var subscribed by remember { mutableStateOf(false) }
AndroidView(
modifier = modifier,
factory = { context ->
ZoomVideoSDKVideoView(context).apply {
setZOrderOnTop(false)
}
},
update = { view ->
if (!subscribed) {
videoCanvas.subscribe(
view,
ZoomVideoSDKVideoAspect.ZoomVideoSDKVideoAspect_Original,
ZoomVideoSDKVideoResolution.ZoomVideoSDKResolution_Auto
)
subscribed = true
} else {
videoCanvas.setAspectMode(
view,
ZoomVideoSDKVideoAspect.ZoomVideoSDKVideoAspect_Original
)
}
},
onRelease = { view ->
if (subscribed) {
videoCanvas.unSubscribe(view)
}
}
)
}
However after starting by remote user the screen sharing the share canvas is not displaying any content within ZoomVideoSDKVideoView
. After rotating the phone the screen sharing starts to work.
Which Android:
2.1.5
Smartphone (please complete the following information):
- Device: [e.g Motorola g52]
- OS: [e.g. Android 13]