# Where to customize Video Layout

**URL:** <https://devforum.zoom.us/t/where-to-customize-video-layout/67108>\
**Category:** Windows\
**Created:** [April 6, 2022, 5:17pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108 "2022-04-06T17:17:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacksonbgee](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jacksonbgee/32/36681_2.png) [@jacksonbgee](https://devforum.zoom.us/u/jacksonbgee)\
**Post date:** [April 6, 2022, 5:17pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/1 "2022-04-06T17:17:33Z")

</div>

**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

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [April 7, 2022, 5:25pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/2 "2022-04-07T17:25:54Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![jacksonbgee](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jacksonbgee/32/36681_2.png) [@jacksonbgee](https://devforum.zoom.us/u/jacksonbgee)\
**Post date:** [April 7, 2022, 5:34pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/3 "2022-04-07T17:34:29Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![jacksonbgee](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jacksonbgee/32/36681_2.png) [@jacksonbgee](https://devforum.zoom.us/u/jacksonbgee)\
**Post date:** [April 8, 2022, 3:51pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/4 "2022-04-08T15:51:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [April 8, 2022, 10:38pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/5 "2022-04-08T22:38:47Z")

</div>

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`](https://marketplacefront.zoom.us/sdk/meeting/windows/class_i_preview_video_render_element.html) 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. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![jacksonbgee](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jacksonbgee/32/36681_2.png) [@jacksonbgee](https://devforum.zoom.us/u/jacksonbgee)\
**Post date:** [April 26, 2022, 4:50am UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/6 "2022-04-26T04:50:07Z")

</div>

@jon.zoom 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.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [April 27, 2022, 9:04pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/7 "2022-04-27T21:04:42Z")

</div>

Hi @jacksonbgee,

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

Thanks!

---

<div class="post-metadata">

**Author:** ![jacksonbgee](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jacksonbgee/32/36681_2.png) [@jacksonbgee](https://devforum.zoom.us/u/jacksonbgee)\
**Post date:** [May 4, 2022, 3:04am UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/8 "2022-05-04T03:04:28Z")

</div>

Hi John @jon.zoom ,

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;  
}

---

<div class="post-metadata">

**Author:** ![jacksonbgee](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jacksonbgee/32/36681_2.png) [@jacksonbgee](https://devforum.zoom.us/u/jacksonbgee)\
**Post date:** [May 5, 2022, 1:24pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/10 "2022-05-05T13:24:34Z")

</div>

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;  
}

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [May 5, 2022, 10:34pm UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/11 "2022-05-05T22:34:04Z")

</div>

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. 🙂

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [June 5, 2022, 8:34am UTC](https://devforum.zoom.us/t/where-to-customize-video-layout/67108/12 "2022-06-05T08:34:24Z")

</div>

Closed on June 5, 2022, 8:34am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
