Attendee video sometimes is not shown in Android

Meeting SDK Type and Version
Any version prior to 6.0.10.22015

Description
There is a grid mode and a speaker mode in the app (2 different fragments). Grid fragments contains one MobileRtcVideoView on the screen. There are 20 users in this videoView.

In most cases works well and user can observe all participants in videoView. Sometimes some participant’s video is not shown (black frames), although their cameras are ON. The Sdk reports that this user is streaming video, while there is no actual video in the grid:

val info = ZoomSDK.getInstance().inMeetingService.getUserInfoById(userId)
Log.d(TAG, "${info.videoStatus.isSending}") //true

Recreating the problematic AttendeeVideoUnit in the grid does not help.
In the speaker view (MobileRtcVideoView with only one user) the problematic user’s video is streamed well.
Eg: user with id 12345 is speaking. In speaker view his video is shown. Switching to gallery view - most users videos are shown, some users (including speaker 12345) have a black frame. Switching between views/recreating video units not help. After app restart the user with id 12345 is shown well in both gallery and speaker views.

Each item is added to the grid’s videoView next way:

        val manager = videoView.videoViewManager
        val renderInfo = MobileRTCVideoUnitRenderInfo(xPercent, yPercent, widthPercent, heightPercent)
        renderInfo.aspect_mode = MobileRTCVideoUnitAspectMode.VIDEO_ASPECT_PAN_AND_SCAN
        renderInfo.backgroud_color = ContextCompat.getColor(context, R.color.video_stream_bg)
        manager.addAttendeeVideoUnit(userId, renderInfo)
        invalidate()
        requestLayout()

Item is added to a speaker view next way:

        manager!!.removeAllVideoUnits()
        val renderInfo = MobileRTCVideoUnitRenderInfo(0, 0, 100, 100)
        renderInfo.aspect_mode = MobileRTCVideoUnitAspectMode.VIDEO_ASPECT_ORIGINAL
        manager!!.addAttendeeVideoUnit(userId, renderInfo)
        invalidate()

Thanks for any help.

Hi @anmiz I believe you might be running into our frequency limits for subscribing, unsubscribing, and switching resolutions in the video sdk. This limit was introduced in v2.1.5 to reduce load on the meeting server. The limit is as follows:

  1. Same user: subscribe/unsubcribe will have the same resolution after success, with an interval of 30ms, and there is no limit to different resolutions.

  2. Different users: The total number of times of all sub/unsub resolutions is limited to 50 within 20ms.

Note: switching the resolution is also subscribing.

The client only needs to adjust the calling frequency of the subscription API from their application , and then this problem can be resolved.

For example, there should atleast be 30 ms delay for subscribing to the same user’s video with same resolution.
sub A—>unSub A then delay 30ms, subA will success. Less than 30 ms interval will fail and the user video will show black.

Can you try adjusting folr this and let me know if the problem persists?