Function updateVideoOptions not working

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

Hi @atabidze1 ,

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

Thanks,
Rehema

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

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

TypeScript file -

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

Hi @atabidze1 ,

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

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,
        }
}})

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

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

and

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

but nothing changes.
Do you have working example?

Thanks.
Aleksi

@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.

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