Can't share screen on safari when some one already shared first

Description
Can’t share screen on Safari browser when some one already shared first in meeting room.

Browser Console Error
Have no Console error

Which Web Video SDK version?
video sdk version 1.11.6

Video SDK Code Snippets
start share:

async startShareScreen(sourceId) {
try {
// Determine how to render the screen sharer’s content
if (state.mediaStream.isStartShareScreenWithVideoElement()) {
Logger.info( [VIDEO-SDK JS] Start Share Screen Using Video ${sourceId});
let videoElement = document.getElementById(zoom_share_screen_video);
await state.mediaStream.startShareScreen(videoElement, {
displaySurface: sourceId === undefined || sourceId === null ? “window” : sourceId,
hideShareAudioOption: true
});
this.hideShareView();
videoElement.style.display = “none”;
} else {
Logger.info( [VIDEO-SDK JS] Start Share Screen Using Canvas ${sourceId});
let canvasElement = document.getElementById(zoom_share_screen_canvas);
await state.mediaStream.startShareScreen(canvasElement, {
displaySurface: sourceId === undefined || sourceId === null ? “window” : sourceId,
hideShareAudioOption: true
});
this.hideShareView();
canvasElement.style.display = “none”;
}
} catch (error) {
Logger.error(‘[VIDEO-SDK JS] startShareScreen error’, error);
}
}

and received:

async startShareView(userId) {
Logger.info([VIDEO-SDK JS] Start Share View - ${userId});

let canvasElement = document.getElementById(`zoom_share_screen_canvas`);

if (canvasElement) {
  try {
    this.hideShareView();
    state.mediaStream.startShareView(canvasElement, userId);
    canvasElement.style.display = "block";
  } catch (error) {
    Logger.error('[VIDEO-SDK JS] startShareView error', error);
  }
}

}

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Join meeting with any browser and Safari browser (chrome and safari)
  2. Share screen from Chrome => Can see normally on Safari
  3. Stop share screen on Chrome
  4. Share screen on Safari => Chrome can’t see screen sharing from Chrome

Screenshots

Troubleshooting Routes
The troubleshooting attempt types you’ve already exhausted, including testing with the appropriate sample app (found on Zoom · GitHub).

Device (please complete the following information):

  • Device: Version 16.4 (18615.1.26.11.23)
  • OS: 16.4

Additional context
it work normally with Chrome vs Chrome, get error with Safari vs Chrome , Safari vs Safari

Actually if Safari shared screen first then stop share and start share screen from Chrome, can’t see screen sharing from Chrome on Safari.
case1: Safari share first => can see on Chrome normally => stop share on safari => start share on Chrome => can’t see screen share on Safari
case2: revert case 1. Chrome share first => can see on Safari => stop share on Chrome => start share on Safari => can’t see screen share on Chrome

Follow my investigation, I assume that:
on Safari, display share screen on Canvas element so on Canvas, just render only first time and can’t rerender on Canvas again so it got trouble ?

Thanks.

Hey @dunt

Thanks for your feedback.

From the code snippet you shared, it appears that you are reusing the same canvas for rendering both self-screen sharing and remote screen sharing.

If so, it is currently a limitation. It is required to use different canvases for these two scenarios.

Thanks
Vic

1 Like

Sincerely thanks, Vic.
Fixed this problem. :people_hugging: