Desktop SDK: CreateVideoElement and meeting state

I am trying to understand why sometimes CreateVideoElement fails returning null. Sadly the C# wrapper does not return the failure reason. It seems to be related to the video state, but It would be useful to be able to create a video element before joining a meeting. Is it documented anywhere?
Thanks!

Hi bragma,

Thanks for the post. For the implementation of Custom UI, you may refer to the doc here: https://marketplace.zoom.us/docs/sdk/native-sdks/windows/mastering-sdk/custom-ui-feature or the custom UI implementation in our Windows SDK demo app(sdk_demo_v2). However, it sounds like you are facing some issues that are documented. I think the CreateVideoElement will return an SDK error in https://github.com/zoom/zoom-c-sharp-wrapper/blob/5500fbaac55b10068f1f05b166755048a8ca2034/zoom_sdk_c_sharp_wrap/customized_video_container_dotnet_wrap.h#L64, you could try to print it out and see why it is not working.

Hope this helps. Thanks!

Hi Carson, I was aware I should wait for MEETING_STATUS_CONNECTING, but in fact it seems creating video element requires MEETING_STATUS_INMEETING instead. I was expecting for type PREVIEW to be available when connecting. In any case, it seems all video element creations fail when not inmeeting.
I am having some hard time printing out the exact error value, since I cannot place breakpoints in there (values are inaccessible due to optimization even if I disable code optimization) and I am not sure what to use to print out the value.

Hi bragma,

The C# wrapper allows you to modify and to rebuild at any time so you may configure it to help your debug process.

Here are the steps that could be helpful for your case:

  1. After successfully created the video container, you could create and use a preview video element after receiving MEETING_STATUS_CONNECTING.
  2. The active and normal video element needs to be created and be used only after the status is MEETING_STATUS_INMEETING

If any of the steps are not a success, the corresponding interface will return the error code that shows the root cause of why it is not working as expected.

Hope this helps. Thanks!