# Each client capturing and downloading their own video ONLY

**URL:** <https://devforum.zoom.us/t/each-client-capturing-and-downloading-their-own-video-only/57379>\
**Category:** Web\
**Created:** [September 13, 2021, 6:40pm UTC](https://devforum.zoom.us/t/each-client-capturing-and-downloading-their-own-video-only/57379 "2021-09-13T18:40:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![poufy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/poufy/32/31025_2.png) [@poufy](https://devforum.zoom.us/u/poufy)\
**Post date:** [September 13, 2021, 6:40pm UTC](https://devforum.zoom.us/t/each-client-capturing-and-downloading-their-own-video-only/57379/1 "2021-09-13T18:40:50Z")

</div>

I am quite new to zoom’s web video SDK. I am using the sample react app. After investigating for a bit, I can’t seem to find a way to capture ONLY my video as a client (a simple button for each client that will record their own video for 5 seconds). I saw that we could record the video of the canvas that contains all participant videos, but that is not what I am looking for.

I tried to create an empty canvas and render the video to it and then try to capture an image from that canvas.

```auto
const inputCanvas = document.getElementById("different-canvas");
const userId = zmClient.getCurrentUserInfo().userId;
let stream = await zmClient.getMediaStream();
stream.renderVideo(inputCanvas, userId, 1920, 1080, 0, 0, 3);

// And I try to download an image like this
      let url = inputCanvas.toDataURL();
      let a = document.createElement('a');
      document.body.appendChild(a);
      a.href = url;
      a.download = 'frame.png';
      a.click();
      window.URL.revokeObjectURL(url);

```

However, when I render the stream to another canvas, the original one disappears (seems like I can’t render one stream to 2 canvases at the same time). Is there a better way to do this? Would appreciate any information.

---

<div class="post-metadata">

**Author:** ![poufy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/poufy/32/31025_2.png) [@poufy](https://devforum.zoom.us/u/poufy)\
**Post date:** [September 14, 2021, 12:54pm UTC](https://devforum.zoom.us/t/each-client-capturing-and-downloading-their-own-video-only/57379/2 "2021-09-14T12:54:43Z")

</div>

I managed to capture the individual videos of each participant like this

```auto
      let video = document.createElement("video");
      const inputCanvas = document.createElement('canvas');
      // Get connected devices.
      const devices = await ZoomVideo.getDevices();
      // Get the first camera Id.
      const selectedCameraId = devices[0].deviceId
      // Create a local video track (Mainly used for testing camera preview -> lower quality?)
      const localVideo = ZoomVideo.createLocalVideoTrack(selectedCameraId);
      // Start the video by passing it an html video element.
      await localVideo?.start(video);

```

However, the video resolution is 640x360, can’t we change the resolution of the local video track to 720p?

---

<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:** [September 15, 2021, 10:06pm UTC](https://devforum.zoom.us/t/each-client-capturing-and-downloading-their-own-video-only/57379/3 "2021-09-15T22:06:46Z")

</div>

Hey @poufy ,

The Web Video SDK can only send 360p at the moment.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![poufy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/poufy/32/31025_2.png) [@poufy](https://devforum.zoom.us/u/poufy)\
**Post date:** [September 16, 2021, 1:37pm UTC](https://devforum.zoom.us/t/each-client-capturing-and-downloading-their-own-video-only/57379/5 "2021-09-16T13:37:41Z")

</div>

I see. However it seems like passing the captureOptions and specifiying the width and height to be 1280x720 gives a better video quality when using localVideoTrack

---

<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:** [September 16, 2021, 8:42pm UTC](https://devforum.zoom.us/t/each-client-capturing-and-downloading-their-own-video-only/57379/6 "2021-09-16T20:42:35Z")

</div>

Hey @poufy ,

Correct. 🙂 The main use case for localVideoTrack is a “preview” of your video before joining a session. 🙂

You should also be able to do your self recording use case.

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:** [October 17, 2021, 6:43am UTC](https://devforum.zoom.us/t/each-client-capturing-and-downloading-their-own-video-only/57379/7 "2021-10-17T06:43:07Z")

</div>

Closed on October 17, 2021, 6:43am UTC

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