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

**URL:** <https://devforum.zoom.us/t/cant-share-screen-on-safari-when-some-one-already-shared-first/112985>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [July 3, 2024, 10:15am UTC](https://devforum.zoom.us/t/cant-share-screen-on-safari-when-some-one-already-shared-first/112985 "2024-07-03T10:15:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dunt](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dunt/32/60077_2.png) [@dunt](https://devforum.zoom.us/u/dunt)\
**Post date:** [July 3, 2024, 10:15am UTC](https://devforum.zoom.us/t/cant-share-screen-on-safari-when-some-one-already-shared-first/112985/1 "2024-07-03T10:15:31Z")

</div>

**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**

 ![log on safari when start share on chrome](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/0/e01c5f7abd8a2b6c54506412a890d45f4432ee8a.png)

 ![log on chrome when share on safari](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/7/27b8326353d14df984477b4b0a516994237b41ee.png)

**Troubleshooting Routes**  
The troubleshooting attempt types you’ve already exhausted, including testing with the appropriate sample app (found on [Zoom · GitHub](https://github.com/zoom)).

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

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [July 3, 2024, 10:37am UTC](https://devforum.zoom.us/t/cant-share-screen-on-safari-when-some-one-already-shared-first/112985/2 "2024-07-03T10:37:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dunt](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dunt/32/60077_2.png) [@dunt](https://devforum.zoom.us/u/dunt)\
**Post date:** [July 4, 2024, 1:57am UTC](https://devforum.zoom.us/t/cant-share-screen-on-safari-when-some-one-already-shared-first/112985/3 "2024-07-04T01:57:08Z")

</div>

Sincerely thanks, Vic.  
Fixed this problem. 🫂

---

<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:** [August 3, 2024, 11:57am UTC](https://devforum.zoom.us/t/cant-share-screen-on-safari-when-some-one-already-shared-first/112985/4 "2024-08-03T11:57:47Z")

</div>

Closed on August 3, 2024, 11:57am UTC

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