ZoomSDKNormalVideoElement usage

Hi!

I use ZoomSDKNormalVideoElement instants to display participants.

This class has some properties and methods but the most interesting for me are setResolution(:_) and subscribeVideo(:_)

From ZoomSDKVideoContainer.h file:

setResolution(:_) - Config the video view resolution
subscribeVideo(:_) - Set whether to display user’s video.

But for example, there is showVideo(:_) method with the next description: Set whether to show video.

Question 1: What is the difference between subscribeVideo(:_) and showVideo(:_)?


setResolution(:_) method returns ZoomSDKError as a lot of Zoom’s method.

Empirically It has been figured out that setResolution(:_) could return Failed in the case when we try to set the value that is already set (for example video element has resolution 360p and we try to set it again). And when we try to set the value that could broke Zoom Rules. For example, there are two video elements with a resolution that is equal to 720p. And I try to create a third one and set the same resolution to it.

Question 2: Is it right? Are there some more limitations to this method?


Сontinuing to the previous description: we have noticed, the third video element that is received ‘Failed’ status after 720p setting, can’t change the quality until we call subscribeVideo(:_).

Question 3: Do I need subscribeVideo(true) method if my setResolution(:_) method has been returned Failed status?


Question 4: What does it mean for the video element if we subscribe/unsubscribe to/from it?


Question 5: What the blinking mean when we call setResolution(true) method?


Thank you for your help. There is a lot of specific questions, but it’s necessary to understand the full picture of the SDK to use its full potential. :rocket:

Hi @anton.yereshchenko, thanks for the post.

What is the difference between subscribeVideo(:_) and showVideo(:_) ?

I believe subscribeVideo is meant to be used for the actual video description, while showVideo is only used for the UI side of things. So if you needed to temporarily hide the video of a particular user but don’t want to stop receiving their data, you could use this.

Empirically It has been figured out that setResolution(:_) could return Failed in the case when we try to set the value that is already set (for example video element has resolution 360p and we try to set it again). And when we try to set the value that could broke Zoom Rules. For example, there are two video elements with a resolution that is equal to 720p . And I try to create a third one and set the same resolution to it.
Question 2 : Is it right? Are there some more limitations to this method?

It sounds like you are correct. I would expect this method to fail if the SDK already knows that the resolution being set is not possible under current circumstances.

Сontinuing to the previous description: we have noticed, the third video element that is received ‘Failed’ status after 720p setting, can’t change the quality until we call subscribeVideo(:_) .
Question 3 : Do I need subscribeVideo(true) method if my setResolution(:_) method has been returned Failed status?

Just to be clear, were you previously subscribed to a lower resolution, which stops after calling setResolution or are you calling this before the initial subscribeVideo call? I think this is working as intended either way, but if you were previously subscribed, we may be able to improve the usage of this in the future.

Question 4 : What does it mean for the video element if we subscribe/unsubscribe to/from it?

When subscribed, the SDK maintains a connection to receive any video data from that user. Once you unsubscribe, this connection ends and you are no longer able to receive video. Let me know if you are looking for more specific information around the usage of this and I’ll be happy to help.

Question 5 : What the blinking mean when we call setResolution(true) method?

This method is actually doing two things: updating the video size (i.e. state internal to the SDK to know which resolution) and then resubscribing at the new resolution. If you see the video briefly go black, it is because the SDK has not yet received video frames at the updated resolution.

There’s a lot of information to process here for sure, so feel free to reach back out if anything could use further clarification. :slightly_smiling_face:

Thanks!

Hi @jon.lieblich, thank you a lot for this incredibly useful information about ZoomSDKNormalVideo Element

No problem, happy to help!