# Use GalleryView in Livestream

**URL:** <https://devforum.zoom.us/t/use-galleryview-in-livestream/115208>\
**Category:** Video SDK\
**Created:** [August 7, 2024, 12:38pm UTC](https://devforum.zoom.us/t/use-galleryview-in-livestream/115208 "2024-08-07T12:38:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathan6](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jonathan6/32/61276_2.png) [@jonathan6](https://devforum.zoom.us/u/jonathan6)\
**Post date:** [August 7, 2024, 12:38pm UTC](https://devforum.zoom.us/t/use-galleryview-in-livestream/115208/1 "2024-08-07T12:38:05Z")

</div>

**Video SDK Type and Version**  
VideoSDK V1.11.10

**Description**  
When I start the livestream it always starts in Active-Speaker-Mode and therefore only displays a single speaker at a time. I know from the Zoom Client that it is possible to switch to a GalleryView-Mode.

How can I trigger the GalleryView-Mode for a Livestream in the VideoSDK?

Thank you for your help!!

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [August 8, 2024, 12:30pm UTC](https://devforum.zoom.us/t/use-galleryview-in-livestream/115208/2 "2024-08-08T12:30:51Z")

</div>

Hey @jonathan6 I’m assuming you’re using the Video SDK UI Toolkit. In which case I think this could be a feature request for default layout. However in the mean time there’s a hacky way to achieve what you’d like by using this snippet:

```js
uitoolkit.onSessionJoined(() => {
      (document.querySelector('[aria-label="Change view"]') as HTMLButtonElement)?.click();
      [...document.querySelectorAll("span")].filter((span: HTMLSpanElement) => span.textContent?.includes("Gallery"))[0].click();
    });

```

It’ll access the layout button and click on the grid menu item automatically when a session is joined.

---

<div class="post-metadata">

**Author:** ![jonathan6](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jonathan6/32/61276_2.png) [@jonathan6](https://devforum.zoom.us/u/jonathan6)\
**Post date:** [August 9, 2024, 8:42am UTC](https://devforum.zoom.us/t/use-galleryview-in-livestream/115208/3 "2024-08-09T08:42:44Z")

</div>

Hey @ekaansh.zoom

Thanks for your reply! I think for my question it does not matter if I use the UI-Kit or not (I am no using UI-Kit) - let me explain why:

My questions refers to the Output of the Livestream. So when I initialize the LivestreamClient and go live on e.g. YouTube via RTMP, I have very little control over the video layout that gets outputted to YouTube. It seem like the Livestream is always rendered in ActiveSpeaker-Mode. Instead I would like to be able to switch the Livestream to Gallery-View as well.

I hope that this clarifies my issue.

Thanks for your help! 🙂

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [August 12, 2024, 10:15am UTC](https://devforum.zoom.us/t/use-galleryview-in-livestream/115208/4 "2024-08-12T10:15:18Z")

</div>

Hey @jonathan6

Update: Sorry, the Video SDK doesn’t have the ability to customize the live-stream layout at the moment. I’ll create a feature request for it internally and we’ll add it to our roadmap.

However, you can use the REST API: [Zoom Video SDK API](https://developers.zoom.us/docs/api/rest/reference/video-sdk/methods/#operation/sessionLiveStreamStatusUpdate) with the `layout` set to `gallery_view` to change the live-stream/RTMP feed.
