# Video in not getting render on canvas

**URL:** <https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197>\
**Category:** Web\
**Created:** [July 15, 2021, 11:57am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197 "2021-07-15T11:57:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nirbhay.ram](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirbhay.ram/32/26942_2.png) [@nirbhay.ram](https://devforum.zoom.us/u/nirbhay.ram)\
**Post date:** [July 15, 2021, 11:57am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/1 "2021-07-15T11:57:55Z")

</div>

**Description**  
Video is not getting rendered on the canvas in fact of successfully promise returned while mediaStream.renderVideo.

**Error**  
After connecting to the meeting, when I start my video it renders successfully on the canvas. But, after that when I disable my video and enable my video again, promise to render video returns success but my video is not displayed on canvas.

**Which Web Video SDK version?**  
web video sdk ^1.1.0. I have tested on latest version (1.1.3) but issue still persist

**To Reproduce**  
To reproduce the issue, try to toggle the video multiple times.

**Device :**

- Device: MacBook Pro (16-inch, 2019)
- OS: 11.2
- Browser: Chrome
- Browser Version 91.0.4472.114

**Additional context**  
Have clone the same code here in react-demo directory

> **[zoom/sample-app-videosdk](https://github.com/zoom/sample-app-videosdk)**
>
> zoom videosdk web demo. Contribute to zoom/sample-app-videosdk development by creating an account on GitHub.

---

<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 16, 2021, 2:01am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/2 "2021-07-16T02:01:12Z")

</div>

Hey @nirbhay.ram

Thanks for your feedback.

This is a known issue. We use `ImageCapture` in Video SDK, but it has potential problems that may cause video stuck. So we introduce [WebCodecs](https://github.com/w3c/webcodecs) to improve the issue. Since the API is not stable yet, you should register an [origin trial](https://developer.chrome.com/origintrials/#/register_trial/-7811493553674125311) to enable this feature.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![nirbhay.ram](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirbhay.ram/32/26942_2.png) [@nirbhay.ram](https://devforum.zoom.us/u/nirbhay.ram)\
**Post date:** [July 16, 2021, 7:22am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/3 "2021-07-16T07:22:35Z")

</div>

Hey @vic.yang

Thanks for prompt reply.

I have tried to activate WebCodecs experimental feature and seems that it resolves the problem.

It seems that this is experimental feature for chrome which is not going to release in near future. What about other browser? (safari, firefox)

And also what is release plan for video sdk to allow more than 9 videos rendering?

---

<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 16, 2021, 7:43am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/4 "2021-07-16T07:43:22Z")

</div>

Hey @nirbhay.ram

Safari and Firefox are limited in rendering video. They can only support a single video rendering at the same time.

Rendering more than 9 videos at the same may lead to high CPU and memory usage, so we still limit the capacity.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![nirbhay.ram](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirbhay.ram/32/26942_2.png) [@nirbhay.ram](https://devforum.zoom.us/u/nirbhay.ram)\
**Post date:** [July 16, 2021, 9:34am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/5 "2021-07-16T09:34:53Z")

</div>

Hey @vic.yang

Currently I am trying to render more than 1 videos on **different canvas** in safari as well as firefox and it’s seems that videos are getting render once. Then after toggling video it black out.

When can we expect full support for both the browser as well?

Thanks  
Nirbhay

---

<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 16, 2021, 9:57am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/6 "2021-07-16T09:57:37Z")

</div>

Hey @nirbhay.ram

That depends on the ability of the browser. In Video SDK, rendering multiple videos requires [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffscreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas). And it would be better if [WebAssembly SIMD](https://github.com/WebAssembly/simd/blob/main/proposals/simd/SIMD.md) is enabled.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![nirbhay.ram](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirbhay.ram/32/26942_2.png) [@nirbhay.ram](https://devforum.zoom.us/u/nirbhay.ram)\
**Post date:** [July 16, 2021, 11:24am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/7 "2021-07-16T11:24:04Z")

</div>

Hey @vic.yang

Thanks for clearing things out.

There is also one more problem while positioning video on canvas in firefox and safari, it is not getting positioned as expected. It positioned perfectly in chrome. Are you guys aware of that issue?

Thanks  
Nirbhay

---

<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:** [July 16, 2021, 6:57pm UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/8 "2021-07-16T18:57:17Z")

</div>

Hey @nirbhay.ram ,

Could you show a screenshot of the positioning issue and your HTLM Canvas and CSS code so we can reproduce the issue? It could just be a CSS edge case in Firefox/Safari and not an issue with the Video SDK rendering.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![nirbhay.ram](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nirbhay.ram/32/26942_2.png) [@nirbhay.ram](https://devforum.zoom.us/u/nirbhay.ram)\
**Post date:** [July 18, 2021, 4:47am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/9 "2021-07-18T04:47:40Z")

</div>

Hey @tommy,

I am using the same react sample app code.

> **[zoom/sample-app-videosdk](https://github.com/zoom/sample-app-videosdk)**
>
> zoom videosdk web demo. Contribute to zoom/sample-app-videosdk development by creating an account on GitHub.

Connect two participant with video on in firefox and you will able to see the issue.

Thanks  
Nirbhay

---

<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 19, 2021, 1:57am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/10 "2021-07-19T01:57:16Z")

</div>

Hey @nirbhay.ram

That’s a known issue, and we will fix it in the future release.

Thanks  
Vic

---

<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 22, 2021, 6:27am UTC](https://devforum.zoom.us/t/video-in-not-getting-render-on-canvas/54197/12 "2021-08-22T06:27:43Z")

</div>

Closed on August 22, 2021, 6:27am UTC

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