# Function updateVideoOptions not working

**URL:** <https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453>\
**Category:** Web\
**Created:** [September 20, 2023, 2:45pm UTC](https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453 "2023-09-20T14:45:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![atabidze1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/atabidze1/32/46321_2.png) [@atabidze1](https://devforum.zoom.us/u/atabidze1)\
**Post date:** [September 20, 2023, 2:45pm UTC](https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453/1 "2023-09-20T14:45:54Z")

</div>

I am trying to change defaultViewType and viewSizes on click but nothing happens. Click function logs properly, but on zoom window nothing changes.

How to resolve this or is it there other way to change view Type?  
If you have right way to call this function please share.

- OS: Windows 11
- Browser: Chrome latest version
- WebSdk: 2.16.0

---

<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:** [September 22, 2023, 7:02pm UTC](https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453/2 "2023-09-22T19:02:16Z")

</div>

Hi @atabidze1 ,

Could you attach a code snippet of where you’re implementing this function?

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![atabidze1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/atabidze1/32/46321_2.png) [@atabidze1](https://devforum.zoom.us/u/atabidze1)\
**Post date:** [September 23, 2023, 1:36pm UTC](https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453/3 "2023-09-23T13:36:00Z")

</div>

Hi @rehema.zoom  
I have bare minimum to start zoom meeting in angular component  
Html -

```auto
<div  
  class="zoom-container"
  id="meetingSDKElement"
></div>
<button (click)="changeview()">change view</button>

```

TypeScript file -

```auto
ngOnInit(): void {
    this.initMeeting();
}

initMeeting() {
    try {
      let meetingSDKElement = document.getElementById('meetingSDKElement');
      this.client
        .init({
          debug: true,
          zoomAppRoot: meetingSDKElement!,
          language: 'en-US',
          customize: {
            video: {
              isResizable: false,
              popper: {
                disableDraggable: true,
              },
              viewSizes: {
                default: {
                  width: 1000,
                  height: 800,
                },
                ribbon: {
                  width: 1000,
                  height: 800,
                },
              },
              defaultViewType: SuspensionViewType.Active,
            },
            meetingInfo: [
              'topic',
              'host',
              'mn',
              'telPwd',
              'participant',
              'dc',
              'enctype',
            ],
            toolbar: {},
            participants: {
              popper: {
                disableDraggable: true,
              },
            },
            setting: {
              popper: {
                disableDraggable: true,
              },
            },
            chat: {
              popper: {
                disableDraggable: true,
              },
            },
            meeting: {
              popper: {
                disableDraggable: true,
              },
            },
            activeApps: {
              popper: {
                disableDraggable: true,
              },
            },
          },
        })
        .then((_) => {
          this.getJoinDetails();
        });
    } catch {
      console.log('ZOOM FAILED');
    }
  }

  changeview() {
    console.log("before");
    this.client.updateVideoOptions({
      viewSizes: {
        default: {
          width: 400,
          height: 700,
        },
      },
      defaultViewType: SuspensionViewType.Ribbon,
    });
    console.log("after");
  }

```

console logs “before” and “after” on click, no errors.

Thank you,  
Aleksi

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [September 26, 2023, 1:49am UTC](https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453/4 "2023-09-26T01:49:24Z")

</div>

Hi @atabidze1 ,

If you want to customize the views, could you try this?

```auto
If the user wants to customize the views other than the ribbon view:
updateVideoOptions({viewSizes: {
        default: {
          width: 400,
          height: 700,
        }
}})

If the user wants to customize the ribbon view:
updateVideoOptions({viewSizes: {
        Ribbon: {
          width: 400,
          height: 700,
        }
}})

If the user wants to customize all views:
updateVideoOptions({viewSizes: {
        default: {
          width: 400,
          height: 700,
        },
        ribbon: {
          width: 400,
          height: 700,
        }
}})

```

---

<div class="post-metadata">

**Author:** ![atabidze1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/atabidze1/32/46321_2.png) [@atabidze1](https://devforum.zoom.us/u/atabidze1)\
**Post date:** [September 26, 2023, 12:00pm UTC](https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453/5 "2023-09-26T12:00:16Z")

</div>

Hi @chunsiong.zoom  
Thanks for your respond.  
Actually for my case width and height is just test parameters to see if something changes.

Sorry, but non of your suggestions worked.

For me it is important to change ViewType with function.  
I am calling

```auto
this.client.updateVideoOptions({
      defaultViewType: SuspensionViewType.Ribbon,
});

```

and

```auto
this.client.updateVideoOptions({
      defaultViewType: SuspensionViewType.Active,
});

```

but nothing changes.  
Do you have working example?

Thanks.  
Aleksi

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [September 28, 2023, 3:43am UTC](https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453/6 "2023-09-28T03:43:42Z")

</div>

@atabidze1 ,

I’ve checked on this. The API is only used for the above mentioned sizing changes, and is not meant to be used for changing ViewType.

---

<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:** [October 28, 2023, 1:44pm UTC](https://devforum.zoom.us/t/function-updatevideooptions-not-working/95453/7 "2023-10-28T13:44:31Z")

</div>

Closed on October 28, 2023, 1:44pm UTC

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