# Video is not getting rendered on canvas

**URL:** <https://devforum.zoom.us/t/video-is-not-getting-rendered-on-canvas/55032>\
**Category:** Web\
**Created:** [July 31, 2021, 10:22am UTC](https://devforum.zoom.us/t/video-is-not-getting-rendered-on-canvas/55032 "2021-07-31T10:22:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![imran03](https://avatars.discourse-cdn.com/v4/letter/i/cc9497/32.png) [@imran03](https://devforum.zoom.us/u/imran03)\
**Post date:** [July 31, 2021, 10:22am UTC](https://devforum.zoom.us/t/video-is-not-getting-rendered-on-canvas/55032/1 "2021-07-31T10:22:38Z")

</div>

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

**Error**  
I’m not getting any error

**Which Web Video SDK version?**  
I’m using the version v1.1.3

**Device (please complete the following information):**

- Device: HP Probook
- OS: Fedora 34
- Browser: Chrome
- Browser Version 92.0.4515.107 (Official Build) (64-bit)

```auto
this.zoomClient.on('connection-change', async payload => {
			if (payload.state === 'Connected') {
				this.stream = await this.zoomClient.getMediaStream({
					video: true,
					audio: true
				});

				this.stream.startVideo('video-canvas').then(res => {
					try {
						const session = this.zoomClient.getSessionInfo();
						const canvas = document.querySelector('#video-canvas');
						this.stream.renderVideo(canvas, session.userId, 300, 200, 0, 0, 1);
					} catch (error) {
						console.log(error);
					}
				});
			}
		});

```

---

<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 2, 2021, 3:20am UTC](https://devforum.zoom.us/t/video-is-not-getting-rendered-on-canvas/55032/2 "2021-08-02T03:20:43Z")

</div>

Hey @imran03

Thanks for your feedback.

There are some mistakes in your code. `getMediaStream` method has no parameters and the optional parameter of `startVideo` is an object.

And the self video stuck 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.

And add one more notice, make sure you have applied an [OT](https://developer.chrome.com/origintrials/#/view_trial/303992974847508481) for `SharedArrayBuffer`, since Chrome 92, `SharedArrayBuffer ` can only be accessed in an isolated site.

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:** [September 1, 2021, 1:21pm UTC](https://devforum.zoom.us/t/video-is-not-getting-rendered-on-canvas/55032/3 "2021-09-01T13:21:30Z")

</div>

Closed on September 1, 2021, 1:21pm UTC

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