# Enabling WebCodec stops screen share feature from working in Chorme

**URL:** <https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145>\
**Category:** Web\
**Created:** [August 3, 2021, 10:32am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145 "2021-08-03T10:32:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hasan.md](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hasan.md/32/19300_2.png) [@hasan.md](https://devforum.zoom.us/u/hasan.md)\
**Post date:** [August 3, 2021, 10:32am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/1 "2021-08-03T10:32:31Z")

</div>

Hi @tommy and @vic.yang guys,  
We’ve been using web video sdk from day one and recently migrated to latest version(1.1.3).  
Since the beginning of Gallery view feature we’ve been facing an issue where restarting the camera takes a long time **(CS-3067)**. As per @tommy 's suggestion we started tinkering with WebCodecs experimental feature of Chrome.  
**It seems that the lag disappears as soon as we enable WebCodecs but the screen sharing feature stops working.**  
We tried using origin trial token and chrome flags to enable WebCodec in Chrome.

**Error screenshot:**

 ![webcodecScreensharingIssue](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/b/3b091d6d742618a38e554d29c6693b1f0700d751.png)

**Which Web Video SDK version?**  
1.1.0 and 1.1.3

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

1. Downlad react demo
2. Enable WebCodecs in Chrome (origin token or chrome flags)
3. Start videos
4. Strat screen sharing

**Result:**  
Screen sharing does not work. Error thrown from the screen sharing method.

**Device :**

- Device: Desktop
- OS: Windows 10 and Ubuntu 20.04
- Browser: Chorme
- Browser - Version 92.0.4515.131 (Official Build) (64-bit)

**Since screen sharing is a quintessential part of online meetings, we are not able to use the WebCodecs as a solution to the stuck camera problem. Please share with us a solution to this long persisting problem.**

**Also Cross Origin Isolation is a major hindrance to Single Page applications such as Angular and React.**  
**Could you guys please provide a detailed guide on how to enable Cross origin isolation for Angular in production?**  
Here’s our production configuartion:  
Proxy Server: Nginx  
WebServer: Apache  
Application framework: Angular 8  
OS: Ubuntu

Regards and Thanks,  
Mehedi Hasan  
Software Engineer

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 3, 2021, 3:51pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/2 "2021-08-03T15:51:45Z")

</div>

Yes! We are also facing the same issue in VideoSDK@1.1.3.  
I’ve enabled WebCodecs and SharedArrayBuffers origin trial but strange part is issue is **not there in local environment** but in production I’m getting this error.

---

<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:** [August 3, 2021, 8:41pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/3 "2021-08-03T20:41:56Z")

</div>

Hey @shoaib , @hasan.md ,

Thanks for reporting this issue, and apologies for the inconvenience. We are working on a fix and will release one soon. 🙂 Stay updated here: [https://marketplace.zoom.us/docs/changelog](https://marketplace.zoom.us/docs/changelog)

Here is the same issue for Web Client SDK that we fixed: [Enabling WebCodecs Origin Trial causes the screen sharing not to work properly](https://devforum.zoom.us/t/enabling-webcodecs-origin-trial-causes-the-screen-sharing-not-to-work-properly/54255)

Thanks,  
Tommy

---

<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:** [August 4, 2021, 3:15am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/4 "2021-08-04T03:15:35Z")

</div>

Hey @shoaib @hasan.md

Thanks for your feedback. Sorry for the unpleasant experience of Web Video SDK.

If the Web Codecs is enabled, you should pass the Video Element instead of Canvas Element to `stream.startShareScreen` method. Following is a quick way to determine whether the browser supports WebCodecs:

```javascript
function isSupportWebCodecs(){
  return typeof window.MediaStreamTrackProcessor === 'function'
}

```

We have updated the [react-demo](https://github.com/zoom/sample-app-videosdk/tree/master/react-demo) sample code, you can also refer to its implementation.

In the next release of Web Video SDK, we will provide detailed instructions on the console when the WebCodecs is enabled.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 8, 2021, 8:33pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/5 "2021-08-08T20:33:31Z")

</div>

@yic.yang I’m using origin trials for WebCodecs and SharedBuffer but

```auto
function isSupportWebCodecs(){
  return typeof window.MediaStreamTrackProcessor === 'function'
}

```

It always returns me `false`.

---

<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:** [August 9, 2021, 1:40am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/6 "2021-08-09T01:40:56Z")

</div>

Hey @shoaib

Thanks for your feedback.

Once the WebCodecs is enabled, this function will return true. Make sure there are two OTs applied on your page. `SharedArrayBuffer` and `WebCodecs` are independent features that require an OT.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 11, 2021, 12:37pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/7 "2021-08-11T12:37:20Z")

</div>

@vic.yang Yes, there are two meta tags that I have embedded one for `SharedArrayBuffer` and other for `WebCodecs`, but its returning `false` only. Does that mean that OTs are not applied on the page? and if that so then how come ScreenShare is not working.

---

<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:** [August 12, 2021, 1:20am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/8 "2021-08-12T01:20:24Z")

</div>

Hey @shoaib

The errors on consoles show that ’ e.desktopSharingValue.video.play is not a function ', which indicates Video SDK judges that WebCodecs was enabled. Video SDK will use VideoElement instead of CanvasElement to render sharing content.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 12, 2021, 6:33am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/9 "2021-08-12T06:33:28Z")

</div>

Hey @vic.yang! So, now I’m using VideoElement in chrome, now below error is occurring on screen share.

 ![Screenshot 2021-08-12 at 11.59.02 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/9/69a3cba38ef1d2d330341832176a9a47d11317ab.png)

---

<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:** [August 12, 2021, 7:07am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/10 "2021-08-12T07:07:24Z")

</div>

Hey @shoaib

Did you try our [react-sample-project](https://github.com/zoom/sample-app-videosdk/tree/master/react-demo) ? Can it work without error?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 12, 2021, 9:44am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/11 "2021-08-12T09:44:21Z")

</div>

@vic.yang Yes It works (there are no errors), but sometimes at receiving side I get black screen, but that I think is a different issue.  
We are almost done but this screen share issue on Chrome is blocking everything 😕.

 ![Screenshot 2021-08-12 at 3.05.20 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/0/305b433c90c073b5a7d6dd11b9cd0dea0ddc9aec.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:** [August 12, 2021, 3:46pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/12 "2021-08-12T15:46:38Z")

</div>

Hey @shoaib ,

Do you see any errors in the browser console when you see the black screen?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 12, 2021, 5:41pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/13 "2021-08-12T17:41:58Z")

</div>

@tommy No, There are no errors in the console.

Hey @hasan.md were you able to resolve this screen share issue on Chrome?

---

<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:** [August 13, 2021, 4:46pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/14 "2021-08-13T16:46:24Z")

</div>

Hey @shoaib ,

Which version of Chrome are you using?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 13, 2021, 6:53pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/15 "2021-08-13T18:53:47Z")

</div>

@tommy Version 92.0.4515.131 (Official Build) (x86\_64)

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 17, 2021, 9:05am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/16 "2021-08-17T09:05:42Z")

</div>

@tommy any updates on this?

---

<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:** [August 17, 2021, 5:57pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/17 "2021-08-17T17:57:34Z")

</div>

Hey @shoaib ,

I am not able to reproduce this issue. Can you please share a screenshot of the browser console when this issue happens?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![shoaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shoaib/32/28580_2.png) [@shoaib](https://devforum.zoom.us/u/shoaib)\
**Post date:** [August 17, 2021, 7:48pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/18 "2021-08-17T19:48:36Z")

</div>

@tommy I just need to resolve [this](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145) error that comes on invoking `startShareScreen` on Chrome. In other browsers its working.  
[This](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/4) solution by @vic.yang is giving another [error](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/9).

Kindly provide some solution as I’m stuck here.

---

<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:** [August 19, 2021, 9:24pm UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/19 "2021-08-19T21:24:05Z")

</div>

Hey @shoaib ,

For the first issue, we are releasing the fix in the Video SDK soon, but for now you can follow the fix in the sample app: [fix sharing webcodecs issue · zoom/videosdk-web-sample@046951a · GitHub](https://github.com/zoom/sample-app-videosdk/commit/046951ae851bb54afdcb810f115e627a188c18b9)

> [@Enabling WebCodec stops screen share feature from working in Chorme](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/3):
>
> Hey @shoaib , @hasan.md , Thanks for reporting this issue, and apologies for the inconvenience. We are working on a fix and will release one soon. slight_smile Stay updated here: [https://marketplace.zoom.us/docs/changelog](https://marketplace.zoom.us/docs/changelog) Here is the same issue for Web Client SDK that we fixed: [Enabling WebCodecs Origin Trial causes the screen sharing not to work properly](https://devforum.zoom.us/t/enabling-webcodecs-origin-trial-causes-the-screen-sharing-not-to-work-properly/54255) Thanks, Tommy

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:** [September 19, 2021, 7:24am UTC](https://devforum.zoom.us/t/enabling-webcodec-stops-screen-share-feature-from-working-in-chorme/55145/20 "2021-09-19T07:24:14Z")

</div>

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