# Issue changing video feed to canvas

**URL:** <https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800>\
**Category:** Web\
**Created:** [October 24, 2022, 9:40am UTC](https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800 "2022-10-24T09:40:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish.beetle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ashish.beetle/32/40136_2.png) [@ashish.beetle](https://devforum.zoom.us/u/ashish.beetle)\
**Post date:** [October 24, 2022, 9:40am UTC](https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800/1 "2022-10-24T09:40:25Z")

</div>

Version Data:  
zoom/videosdk: 1.4.1  
browser:  
chrome: Version 106.0.5249.119  
edge: Version 106.0.1370.52

Hi  
In my application, I have to change the video feed to one of the canvases as per business logic. When i try to stopRender of current feed and startVideo of new feed, i got the following error:

![video_error](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/7/77bf6cf7c9bb097d19a2b449723bb989d7037ecc.png)

Could you help me understand the cause and possible precautions I could take to avoid it? Are there any specific steps to be followed while switching a video feed?

Thanks  
Ashish

---

<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:** [October 28, 2022, 10:06am UTC](https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800/2 "2022-10-28T10:06:06Z")

</div>

Hey @ashish.beetle

Were you using Chrome or Edge but not enabling the SharedArrayBuffer?[Web SDK Gallery View and Virtual Background](https://marketplace.zoom.us/docs/sdk/overview/websdk-gallery-view/)

And if so, did you specify the same `id` attribute for the different canvases?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![ashish.beetle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ashish.beetle/32/40136_2.png) [@ashish.beetle](https://devforum.zoom.us/u/ashish.beetle)\
**Post date:** [October 28, 2022, 10:22am UTC](https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800/3 "2022-10-28T10:22:00Z")

</div>

Hi @vic.yang

I am using Chrome. I do not have SharedArrayBuffer enabled. I need to render the videos in separate canvases as per our ui requirement.

I did specify separate ids for each canvas.

Thanks  
Ashish

---

<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:** [October 31, 2022, 9:46am UTC](https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800/4 "2022-10-31T09:46:13Z")

</div>

Hey @ashish.beetle

I cannot reproduce the issue on my devices. Would you mind sharing the code snippets where the issues occur?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![ashish.beetle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ashish.beetle/32/40136_2.png) [@ashish.beetle](https://devforum.zoom.us/u/ashish.beetle)\
**Post date:** [October 31, 2022, 10:14am UTC](https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800/5 "2022-10-31T10:14:32Z")

</div>

Hi @vic.yang

The error happens when I try to stop the rendering of a user in a canvas and start the render of another user in the same canvas.

This switch may happen in succession as per business requirement.

Please advice if there is any error in my execution.

function to change the video

 ![change function](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/8/b8fe964cca1d635d8514e21bab7fcaef163879b1.png)

startMainVideo()

 ![startMainVideo](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/9/399a11400ba5c138527edd33f337b03916431185.png)

stopMainVideo()

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

Thanks  
Ashish

---

<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:** [November 1, 2022, 3:04am UTC](https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800/6 "2022-11-01T03:04:01Z")

</div>

Hey @ashish.beetle

The code works, and I tried similar code on my device, no issues.

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:** [December 1, 2022, 1:05pm UTC](https://devforum.zoom.us/t/issue-changing-video-feed-to-canvas/77800/7 "2022-12-01T13:05:03Z")

</div>

Closed on December 1, 2022, 1:05pm UTC

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