Use GalleryView in Livestream

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

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:

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.

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! :slight_smile:

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 with the layout set to gallery_view to change the live-stream/RTMP feed.