# Multiple videos instead of the active video in Video SDK

**URL:** <https://devforum.zoom.us/t/multiple-videos-instead-of-the-active-video-in-video-sdk/46681>\
**Category:** Web\
**Tags:** faq\
**Created:** [March 26, 2021, 11:55am UTC](https://devforum.zoom.us/t/multiple-videos-instead-of-the-active-video-in-video-sdk/46681 "2021-03-26T11:55:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![treedis](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/treedis/32/25135_2.png) [@treedis](https://devforum.zoom.us/u/treedis)\
**Post date:** [March 26, 2021, 11:55am UTC](https://devforum.zoom.us/t/multiple-videos-instead-of-the-active-video-in-video-sdk/46681/1 "2021-03-26T11:55:53Z")

</div>

I’m trying to achieve showing all participants videos instead of just the active speaker. In the documentation they use event\_video\_active\_change, but I thought of using event\_peer\_video\_state\_change like this:

```auto
client.on('peer_video_state_change', async(payload) => {
  try {
    if (payload.action === 'Start') {
      await stream.startRenderVideo(canvas, quality, payload.userId, '');
    } else {
      await astream.stopRenderVideo();
    }
  } catch (error) {
    console.log(error);
  }
});

```

Do you think it’s possible, and if not, can I even achieve something like this? Seeing the current speaker is nice, but my app needs to show all 3-4 guests at the same time.

---

<div class="post-metadata">

**Author:** ![ktae13](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ktae13/32/24978_2.png) [@ktae13](https://devforum.zoom.us/u/ktae13)\
**Post date:** [March 26, 2021, 4:41pm UTC](https://devforum.zoom.us/t/multiple-videos-instead-of-the-active-video-in-video-sdk/46681/2 "2021-03-26T16:41:43Z")

</div>

1. Using `peer-video-state-change` is right approach.
2. I am not sure if `startRenderVideo` is still available. I couldn’t find it in their lib.
3. `renderVideo(canvas: HTMLCanvasElement, userId: number, width: number, height: number, x: number, y: number, videoQuality: VideoQuality, additionalUserKey?: undefined | string): Promise<"" | Error>` is the answer for this.  
3.1 As far as I understand, you can use one canvas to display multiple videos. Just set right size, and anchor position. This might help. [Stream | @zoomus/instantsdk](https://marketplacefront.zoom.us/sdk/custom/web/modules/stream.html#rendervideo)

Thanks,  
Best,  
KB

---

<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:** [March 29, 2021, 5:47pm UTC](https://devforum.zoom.us/t/multiple-videos-instead-of-the-active-video-in-video-sdk/46681/3 "2021-03-29T17:47:13Z")

</div>

Thanks for sharing the solution @ktae13 ! 🙂

@treedis , please let us know if that helps!

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:** [April 29, 2021, 3:47am UTC](https://devforum.zoom.us/t/multiple-videos-instead-of-the-active-video-in-video-sdk/46681/4 "2021-04-29T03:47:57Z")

</div>

Closed on April 29, 2021, 3:47am UTC

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