# Web Video sdk screenshare not working in mobile (instantSDk)

**URL:** <https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741>\
**Category:** Web\
**Created:** [May 21, 2021, 7:21am UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741 "2021-05-21T07:21:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddhant28r](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/siddhant28r/32/27374_2.png) [@siddhant28r](https://devforum.zoom.us/u/siddhant28r)\
**Post date:** [May 21, 2021, 7:21am UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/1 "2021-05-21T07:21:44Z")

</div>

**Description**  
I m trying to build a screen-sharing service. Everything is working fine for desktop-to-desktop sharing, but when i share my screen from desktop and receive on mobile device, I am receiving the undefined stream for mobile.

**Error**  
Not able to get the shared canvas on mobile.

**Which Web Video SDK version?**  
I am using zoom web video sdk version 1.9.1 (instankSDK)

**Screenshots**  
Received Stream in case of Desktop

 ![Screenshot 2021-05-21 at 12.45.30 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/c/9c9265c6f2bf23dc3471fe9344d6a2f0e5129fdf.png)

In case of Mobile I am getting receivedSharingCanvas as undefined

---

<div class="post-metadata">

**Author:** ![siddhant28r](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/siddhant28r/32/27374_2.png) [@siddhant28r](https://devforum.zoom.us/u/siddhant28r)\
**Post date:** [May 21, 2021, 7:22am UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/2 "2021-05-21T07:22:37Z")

</div>

Received Stream for Mobile

 ![Screenshot 2021-05-21 at 12.50.42 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/0/2/02b31aaa4cd7438efd2ddc5ac43d8bf5c8b196af.png)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 24, 2021, 3:17pm UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/3 "2021-05-24T15:17:11Z")

</div>

Hey @siddhant28r ,

Thanks for reporting this issue to us. Can you please share steps to reproduce the issue and the browsers and browser versions you are using?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![siddhant28r](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/siddhant28r/32/27374_2.png) [@siddhant28r](https://devforum.zoom.us/u/siddhant28r)\
**Post date:** [May 24, 2021, 9:01pm UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/4 "2021-05-24T21:01:33Z")

</div>

Hey @tommy ,  
I am trying to integrate the instantSdk with vue3,

Steps to reproduce the issue:

1. Create a meeting,
2. Now, I am trying to do the next mentioned steps on a single button click  
2.1 Join members in the meeting,  
2.2 And simultaneously start sharing the screen of the host (I am  
using firebase notifications to add members to the meeting (member is added in the meeting  
when a particular firebase event happens))  
2.3 I have put a watcher on ‘activeScreenChange’ so that when the host’s screen is sent via stream,  
‘activeScreenChange’ will get triggered and render the screen on canvas, and this works fine in  
desktop.
3. **Issue:-** But for mobile I receive an empty stream every time (issue happens when i try to share  
screen from desktop and receive on mobile)
4. There is one more issue when we share screen from chrome to firefox, everything works fine for 1st time but after that we just see black screen in firefox (even after receiving the stream), but if we share from firefox to chrome then everything works fine (this issue is in desktop)

I have tested this  
on Chrome - Version 90.0.4430.212, and Firefox - Version 88.0.1 (for desktop)  
on Chrome - Version 83.0.4103.101 (for mobile)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 26, 2021, 3:45pm UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/5 "2021-05-26T15:45:39Z")

</div>

Hey @siddhant28r ,

> [@siddhant28r](#):
>
> **Issue:-** But for mobile I receive an empty stream every time (issue happens when i try to share  
> screen from desktop and receive on mobile)

For mobile browsers, unfortunately they are not fully supported yet. [https://marketplace.zoom.us/docs/sdk/video/web#browser-support](https://marketplace.zoom.us/docs/sdk/video/web#browser-support)

> [@siddhant28r](#):
>
> There is one more issue when we share screen from chrome to firefox, everything works fine for 1st time but after that we just see black screen in firefox (even after receiving the stream), but if we share from firefox to chrome then everything works fine (this issue is in desktop)

Can you please explain this further? Are you saying it works fine the 1st time, but when you stop screensharing and then screen share again it does not work and there is a black screen?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![siddhant28r](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/siddhant28r/32/27374_2.png) [@siddhant28r](https://devforum.zoom.us/u/siddhant28r)\
**Post date:** [May 26, 2021, 4:04pm UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/6 "2021-05-26T16:04:03Z")

</div>

Hi @tommy ,  
Thanx for the update on mobile support.

And  
=\> Yes, if we **re-share** screen from firefox to chrome then there’s only black screen.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 1, 2021, 3:37pm UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/7 "2021-06-01T15:37:00Z")

</div>

Thanks @siddhant28r .

> [@siddhant28r](#):
>
> And  
> =\> Yes, if we **re-share** screen from firefox to chrome then there’s only black screen.

Can you check to see if there are any errors in the browser console when this black screen occurs?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![siddhant28r](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/siddhant28r/32/27374_2.png) [@siddhant28r](https://devforum.zoom.us/u/siddhant28r)\
**Post date:** [June 2, 2021, 10:08am UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/8 "2021-06-02T10:08:11Z")

</div>

Hi @tommy ,  
Nope, there aren’t any errors in the console.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 4, 2021, 7:29pm UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/9 "2021-06-04T19:29:05Z")

</div>

Hey @siddhant28r ,

I believe this is due to the canvas element needing the width and height set. Example:

```auto
<canvas id="canvas" width="1920" height="1080"></canvas>

```

In my testing, the Canvas was 0 hight and 0 width in safari / firefox unless I explicitly set the width and height.

Let me know if that helps. 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![siddhant28r](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/siddhant28r/32/27374_2.png) [@siddhant28r](https://devforum.zoom.us/u/siddhant28r)\
**Post date:** [June 7, 2021, 8:20am UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/10 "2021-06-07T08:20:38Z")

</div>

Hi @tommy ,  
In my case i have used canvas inside a div that has fixed width and height and then i m giving width and height as 100% to the canvas, won’t it work?

```auto
<div id="canvas-holder" width="1920" height="1080">
    <canvas id="canvas" class="dimensions"></canvas>
</div>

```

```auto
.dimensions {
   height: 100%;
   width: 100%;
}

```

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 8, 2021, 8:20pm UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/11 "2021-06-08T20:20:39Z")

</div>

Hey @siddhant28r ,

You can set the dimensions and aspect ratio / resolution on the canvas element as well.

```auto
<canvas id="canvas" class="dimensions" width="1920" height="1080"></canvas>

```

```css
.dimensions {
   height: 100%;
   width: 100%;
}

```

Thanks,  
Tommy

---

<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:** [July 9, 2021, 6:21am UTC](https://devforum.zoom.us/t/web-video-sdk-screenshare-not-working-in-mobile-instantsdk/50741/12 "2021-07-09T06:21:08Z")

</div>

Closed on July 9, 2021, 6:21am UTC

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