# How to apply specific order on gallery video recording?

**URL:** <https://devforum.zoom.us/t/how-to-apply-specific-order-on-gallery-video-recording/106367>\
**Category:** Twilio Migration\
**Tags:** recording, video-sdk\
**Created:** [March 23, 2024, 4:48am UTC](https://devforum.zoom.us/t/how-to-apply-specific-order-on-gallery-video-recording/106367 "2024-03-23T04:48:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brendan.hill](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brendan.hill/32/57803_2.png) [@brendan.hill](https://devforum.zoom.us/u/brendan.hill)\
**Post date:** [March 23, 2024, 4:48am UTC](https://devforum.zoom.us/t/how-to-apply-specific-order-on-gallery-video-recording/106367/1 "2024-03-23T04:48:18Z")

</div>

I have a combination of 2-4 participants joining a session with identified roles, some of whom were silent observers. For example:

Bob: “salesperson”  
Anne: “client”  
Tim: “trainer” - silent observer, no video/audio  
John: “intern” - silent observer, no video/audio

I want to create a composed video recording where

- The participant identified as “salesperson” is always on the left
- The participant identified as “client” is always on the right
- No other people are included in the composed video
- The positioning of roles is independent of alphabetical ordering, or who joined the session first

Previously, we achieved this with Twilio’s Compositions feature we had a great deal of flexibility around the streams and positioning.

How can I achieve the same thing with a session recorded from Video SDK, specifically, the selection of which identifies are included ni the recording, and consistent control over their positioning?

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [March 27, 2024, 3:20pm UTC](https://devforum.zoom.us/t/how-to-apply-specific-order-on-gallery-video-recording/106367/2 "2024-03-27T15:20:59Z")

</div>

Hi @brendan.hill,

You should be able to achieve this specific order of rendering videos by using the [individual HTML element rendering method](https://zoomvideo.atlassian.net/browse/SCRT-1238) and the users’ `userID`. With this, you can specify the order each video is rendered, making sure the “salesperson” is rendered first, putting them to the left, and the “client” is rendered second, putting them to the right.

Alternatively, you can use the single [HTML canvas rendering method](https://zoomvideo.atlassian.net/browse/SCRT-1238) and specified `x` and `y` coordinates to adjust a user’s video position based on their `userID`. For example, you’d use the code below to render the “salesperson” video to the left, plugging in their `userID`:

```js
stream.renderVideo(
  document.querySelector('#participant-videos-canvas'),
  participants[0].userId, 960, 540, 0, 540, 2)

```

With values **0** and **540** representing the x and y coordinates.

Please let us know if this helps or any other questions you may have.

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 28, 2024, 6:58pm UTC](https://devforum.zoom.us/t/how-to-apply-specific-order-on-gallery-video-recording/106367/3 "2024-03-28T18:58:54Z")

</div>

Hey @brendan.hill ,

Happy to provide some insight to your use case.

> [@brendan.hill](#):
>
> Bob: “salesperson”  
> Anne: “client”  
> Tim: “trainer” - silent observer, no video/audio  
> John: “intern” - silent observer, no video/audio
> 
> I want to create a composed video recording where
> 
> - The participant identified as “salesperson” is always on the left
> - The participant identified as “client” is always on the right
> - No other people are included in the composed video
> - The positioning of roles is independent of alphabetical ordering, or who joined the session first

Users that are in a session who are not sending no video or audio, will not show up in the Zoom composed cloud recording. The order of the users in the recording who are sending video and audio will be in order of them joining the session.

If you need greater flexibility, you can use the [Individual audio and video files cloud recording option](https://developers.zoom.us/docs/video-sdk/web/recording/#recording-options), and than compose on your end.

Best,  
Tommy
