# Components View "defaultViewType" not affecting anything

**URL:** <https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170>\
**Category:** Web\
**Created:** [April 21, 2023, 11:48am UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170 "2023-04-21T11:48:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nemanja.zivkovic.dev](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nemanja.zivkovic.dev/32/47832_2.png) [@nemanja.zivkovic.dev](https://devforum.zoom.us/u/nemanja.zivkovic.dev)\
**Post date:** [April 21, 2023, 11:48am UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170/1 "2023-04-21T11:48:38Z")

</div>

I see that your Meeting SDK embedded API offers an option to choose defaultViewType here:

> **[InitOptions | ZOOM Web SDK Components](https://marketplacefront.zoom.us/sdk/meeting/web/components/interfaces/InitOptions.html)**
>
> Documentation for ZOOM Web SDK Components

But this doesn’t affect anything.

I’ve already seen people going towards very hacky unstable solutions [here](https://devforum.zoom.us/t/zoom-component-view-not-setting-default-view-as-gallery-no-errors-opens-in-ribbon-view/84157/6).

If you exposed the customizable property I believe you want it to work.

Using the embedded ZoomMtg:

```auto
import ZoomMtgEmbedded, { SuspensionViewType } from "@zoomus/websdk/embedded";

```

My Init snippet:

```auto
    await client.init({
      debug: true,
      zoomAppRoot: meetingSDKElement,
      language: "en-US",
      customize: {
        video: {
          popper: { disableDraggable: true },
          isResizable: false,
          defaultViewType: "gallery" as SuspensionViewType,
          // defaultViewType: SuspensionViewType.Gallery,
        },
        chat: {
          popper: {
            disableDraggable: true,
          },
        },
      },
    });

```

Either an enum or string with a casting doesn’t change the result – nothing happens.  
There are no errors in the console.  
The meeting works fine but the default view is not applied.  
Headers for ArrayBuffer are passed.

Please tell me if you need anything more from my side.

---

<div class="post-metadata">

**Author:** ![SamA](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sama/32/47713_2.png) [@SamA](https://devforum.zoom.us/u/SamA)\
**Post date:** [April 25, 2023, 8:05pm UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170/2 "2023-04-25T20:05:45Z")

</div>

+1 We encountered this issue as well. `defaultViewType` doesn’t seem to affect anything. Also SuspensionViewType doesn’t seem to exist. Passing `SuspensionViewType.Gallery` breaks the compilation. Looking forward to a fix. Thanks!

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 25, 2023, 10:48pm UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170/3 "2023-04-25T22:48:44Z")

</div>

@nemanja.zivkovic.dev ,

Thank you for posting in the Zoom Developer. With regard to defaultViewType, the view should be set during the initialization process of the SDK. Can you share if that is what you are seeing on your end?

---

<div class="post-metadata">

**Author:** ![nemanja.zivkovic.dev](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nemanja.zivkovic.dev/32/47832_2.png) [@nemanja.zivkovic.dev](https://devforum.zoom.us/u/nemanja.zivkovic.dev)\
**Post date:** [April 26, 2023, 9:54am UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170/4 "2023-04-26T09:54:12Z")

</div>

I pasted the snippet of the init call, you can see the defaultViewType set to “gallery” but the meeting starts in the ribbon mode No matter what value is set for defaultViewType it has no effect. The meeting always starts with the same view.

This is not a new issue as there is a bit older post here [Zoom Component View not setting default view as gallery, no errors. Opens in ribbon view - #6 by linzblue5](https://devforum.zoom.us/t/zoom-component-view-not-setting-default-view-as-gallery-no-errors-opens-in-ribbon-view/84157/6)

I’ve already given examples and links in the original post, or I misunderstood your question?

I am using Typescript and the @zoomus/websdk is version 2.11.0.

---

<div class="post-metadata">

**Author:** ![nemanja.zivkovic.dev](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nemanja.zivkovic.dev/32/47832_2.png) [@nemanja.zivkovic.dev](https://devforum.zoom.us/u/nemanja.zivkovic.dev)\
**Post date:** [May 4, 2023, 2:29pm UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170/5 "2023-05-04T14:29:27Z")

</div>

@donte.zoom any update on the issue? It’s kinda blocking my client MVP launch ☹

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [May 5, 2023, 2:52am UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170/6 "2023-05-05T02:52:36Z")

</div>

Hi, @nemanja.zivkovic.dev and @SamA ,

I am not able to reproduce the described behavior on my end. When entering the meeting, Gallery View is the default view. Please see this walk-through video for reference :

https://www.loom.com/embed/3cd47b4a1e924baba5444d881e6ea909

Can you confirm if your site has sharedBufferarray enabled? If not, here is our support documentation on this topic:

### Gallery View, Virtual Background, and 720p on web

[https://developers.zoom.us/docs/meeting-sdk/web/gallery-view/](https://developers.zoom.us/docs/meeting-sdk/web/gallery-view/)

## Client Init Used in Demo Example

```auto
client.init({
      debug: true,
      zoomAppRoot: meetingSDKElement,
      language: 'en-US',
      customize: {
        video: {
          popper: { disableDraggable: true },
          defaultViewType: "gallery",
        },
        meetingInfo: ['topic', 'host', 'mn', 'pwd', 'telPwd', 'invite', 'participant', 'dc', 'enctype'],
        toolbar: {
          buttons: [
            {
              text: 'Custom Button',
              className: 'CustomButton',
              onClick: () => {
                console.log('custom button');
              }
            }
          ]
        }
      }
    });

```

Let me know if this helps.

---

<div class="post-metadata">

**Author:** ![nemanja.zivkovic.dev](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nemanja.zivkovic.dev/32/47832_2.png) [@nemanja.zivkovic.dev](https://devforum.zoom.us/u/nemanja.zivkovic.dev)\
**Post date:** [May 18, 2023, 3:17pm UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170/7 "2023-05-18T15:17:49Z")

</div>

Shared Buffer is enabled. Probably people that are having the same issue are using NextJS. It is the recommended framework right now by React so maybe you guys could create an example in NextJS.  
That would probably help a lot and you could probably recreate the issue we are having.

---

<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 18, 2023, 1:18am UTC](https://devforum.zoom.us/t/components-view-defaultviewtype-not-affecting-anything/87170/8 "2023-06-18T01:18:01Z")

</div>

Closed on June 18, 2023, 1:18am UTC

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