Where to customize Video Layout

Description
I’m trying to alter/rearrange the customized video layout in the sample app to pin the user to a larger video size similar to the active user. I was wondering where the videoElements layout is created.

Which Windows Meeting SDK version?
: [v5.9.7.3953]

Device:
Windows 10, 64 bit

Hi @jacksonbgee, thanks for using our SDK.

Can you please confirm whether you are using the SDK’s default UI or the custom UI implemented in the SDK sample app?

Thanks!

Hi Jon,

I’ve been looking at altering the custom UI in the Sample app. I’m looking to create another larger video element to pin the User’s camera so that the active user and owner are both larger. Thanks!

I might have found where the layout is called, is there anywhere that the user’s video is identified separately from the rest of the user list in order to pin this and create a dedicated spot in the video layout?

Hi @jacksonbgee,

Since the custom UI implementation in the sample app is just provided as a reference and is not actually part of the Meeting SDK itself, we are unfortunately not able to provide support for modifying it. What you are describing should be technically possible, but it is outside of the scope of what the SDK is responsible for.

That being said, the IPreviewVideoRenderElement is used to render a preview of the current user’s video. If you need any help with using this element, I can definitely help clarify. :slightly_smiling_face:

Thanks!

@jon.lieblich HI Jon,

I understand. I’ve been trying to use the IPreviewVideoRenderElement, but I can’t seem to get the preview video feed. I’ve been able to verify the location in my windows I’m passing through works for both gallery and active users, but for some reason I can’t get preview video feed. Would you be able to explain to me how this works? Thanks for your help.

Hi @jacksonbgee,

Can you please provide more context around when you are setting up the preview element and how you are doing so?

Thanks!

Hi John @jon.lieblich ,

I’d be happy to call to clarify if that’s within the scope of support. This has been part of a educational project.

I’ve created a function that I call when joining a meeting along those that show the active user and set up the gallery. I apologize , It seems that the formatting is messed up through the post. I’ve passed through the rect generated by my GetCurrentPinViewRect(); and it works for both the active user and gallery. I just can’t seem to get a preview feed. My intent was to have a dedicated preview view of the user during their meetings.

the lower is the function used to start the video and set position

m_rcSelfView is the rect calculated by GetCurrentPinViewRect();

void CCustomizeUIVideoMgr::ShowPinVideo()
{
GetCurrentPinViewRect();
if (NULL == m_pPinElem)
{
ZOOM_SDK_NAMESPACE::IVideoRenderElement* pVideoElement = NULL;
m_customUIVideoFlow.CreateVideoElementFlow(&pVideoElement, ZOOM_SDK_NAMESPACE::VideoRenderElement_PRVIEW);
m_pPinElem = dynamic_cast<ZOOM_SDK_NAMESPACE::IPreviewVideoRenderElement*>(pVideoElement);
if (NULL == m_pPreviewElem)
return;
}
m_customUIVideoFlow.ShowPreviewVideo(m_pPinElem, m_rcSelfView);

}

ZOOM_SDK_NAMESPACE::SDKError CCustomizeUIVideoFlow::ShowPreviewVideo(ZOOM_SDK_NAMESPACE::IPreviewVideoRenderElement* pVideoElement, RECT rc)
{
if(pVideoElement)
{
ZOOM_SDK_NAMESPACE::SDKError err = ZOOM_SDK_NAMESPACE::SDKERR_UNKNOWN;
err = pVideoElement->SetPos(rc);
err = pVideoElement->Start();
return err;
}
return ZOOM_SDK_NAMESPACE::SDKERR_UNINITIALIZE;
}

ZOOM_SDK_NAMESPACE::SDKError CCustomizeUIVideoFlow::CreateVideoElementFlow(ZOOM_SDK_NAMESPACE::IVideoRenderElement** pVideoElement,ZOOM_SDK_NAMESPACE::VideoRenderElementType type)
{
if(m_pVideoContainer)
{
ZOOM_SDK_NAMESPACE::SDKError err = ZOOM_SDK_NAMESPACE::SDKERR_UNKNOWN;
err = m_pVideoContainer->CreateVideoElement(pVideoElement, type);
return err;
}
return ZOOM_SDK_NAMESPACE::SDKERR_UNINITIALIZE;
}

Hi @jacksonbgee,

Thanks for providing the code snippet. For future reference, the dev forum has markdown support so you can surround your code snippet with ``` before and after to retain formatting. :slightly_smiling_face:

Apologies, but from the information provided it still isn’t clear when exactly you are trying to setup the video preview. Please let me know when this is being done, preferably in terms of SDK callbacks, so that we can assist further.

Thanks!