How to set gallery view as default view with video SDK UI tooklit

I am using UI toolkit in react application and have enabled the sharedArrayBuffer. I can see now option to switch to ‘Gallery View’

My question is, is there any way where I can set gallery view as the default view?

Hey @dhanashree.bodas we’re working on adding the ability to select default view for the UI Toolkit in a future release.

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"]')?.click();
      [...document.querySelectorAll("span")].filter((span) => 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.

Thanks you for the prompt response @ekaansh.zoom. I will try this out