Zoom Web SDK: Cannot update shared video quality when screen share is not started on updateSharingCanvasDimension

Description
I use the VideoSDK to share camera, audio & screen on a single room between 2 participants. The sharing is ok, but i get a canvas (or video) for screen share very big: 1512*982. So i tried to call the Stream function updateSharingCanvasDimension (Stream | Zoom Video SDK for Web - 1.10.5) but i got this error: {type: ‘INVALID_OPERATION’, reason: ‘Cannot update shared video quality when screen share is not started’}

The share is active and visible on both side, host and other participant so screen share is started…

Browser Console Error
{type: ‘INVALID_OPERATION’, reason: ‘Cannot update shared video quality when screen share is not started’}

Which Web Video SDK version?
@zoom/videosdk”: “^1.10.5”

Video SDK Code Snippets
( this.stream?.isStartShareScreenWithVideoElement() ? this.stream.startShareScreen(document.querySelector('#my-screen-share-content-video')) // document.querySelector('#my-screen-share-content-video').style.display = 'block' : this.stream.startShareScreen(document.querySelector('#my-screen-share-content-canvas')) // document.querySelector('#my-screen-share-content-canvas').style.display = 'block' ).then(() => { this.stream?.updateSharingCanvasDimension(ZOOM_VIDEO_SPECS.width, ZOOM_VIDEO_SPECS.height); this.stream?.updateSharedVideoQuality(ZOOM_VIDEO_SPECS.quality); // document.querySelector(#my-screen-share-content-${previewRenderElementScreen}).width = ZOOM_VIDEO_SPECS.width; // document.querySelector(#my-screen-share-content-${previewRenderElementScreen}).height = ZOOM_VIDEO_SPECS.height; this.setState({ previewRenderElementScreen, }, resolve); }).catch(err => { this.handleError(err, 'StartScreen', { previewRenderElementScreen }); resolve(); });

To Reproduce(If applicable)
Steps to reproduce the behavior:
Create client
Get Zoom token
Join room
Start sharing audio, video & screen
Call updateSharedVideoQuality stream function

Device (please complete the following information):
I tried on ChromeV120 & FirefoxV121 on MacOs Sonoma 14.2.1

Thanks for your help

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

Hey @managexam

Sorry for the late reply.

From the error message, it seems like you may have incorrectly called the stream.updateSharedVideoQuality method. This method is only effective when optimized for shared video is enabled.

Thanks
Vic