# Is it possible to show video inside circular container in Zoom Web SDK?

**URL:** <https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781>\
**Category:** Web\
**Created:** [December 27, 2022, 11:38am UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781 "2022-12-27T11:38:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![harshita.kanal](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/harshita.kanal/32/44081_2.png) [@harshita.kanal](https://devforum.zoom.us/u/harshita.kanal)\
**Post date:** [December 27, 2022, 11:38am UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/1 "2022-12-27T11:38:44Z")

</div>

In the single canvas based integration of Web SDK, is it possible to show circular videos instead of rectangular?

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [December 27, 2022, 2:07pm UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/2 "2022-12-27T14:07:58Z")

</div>

Hi @harshita.kanal ,  
Thanks for your post! Yes, this is possible using the Video SDK. With CSS, you can customize the [canvas or video element](https://marketplace.zoom.us/docs/sdk/video/web/essential/video/) that will render your video.

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![harshita.kanal](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/harshita.kanal/32/44081_2.png) [@harshita.kanal](https://devforum.zoom.us/u/harshita.kanal)\
**Post date:** [January 11, 2023, 7:25am UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/3 "2023-01-11T07:25:17Z")

</div>

Thanks for the reply! However, the doc points to ways to update the position and dimensions of the videos, is there a way to render each individual video as circular, inside the single canvas?

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [January 12, 2023, 1:41pm UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/4 "2023-01-12T13:41:46Z")

</div>

Hi @harshita.kanal ,

Yes, this is possible. After subscribing each video input to the same canvas element, use CSS to customize the shape of the element to a circle. Example code is shown below (the first chunk pulled from the previously linked documentation)

```auto
let participants = client.getAllUser()

stream.renderVideo(document.querySelector('#participants-canvas'), participants[0].userId, 960, 540, 0, 540, 2)
stream.renderVideo(document.querySelector('#participants-canvas'), participants[1].userId, 960, 540, 960, 540, 2)
stream.renderVideo(document.querySelector('#participants-canvas'), participants[2].userId, 960, 540, 0, 0, 2)
stream.renderVideo(document.querySelector('#participants-canvas'), participants[3].userId, 960, 540, 960, 0, 2)

```

```auto
#participant-canvas {
  position: relative;
  box-sizing: border-box;
  width: 800px;
  height: 450px;
  background: rgb(32, 31, 31);
  margin: 1px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 1);
  shape-outside: circle(50%);
  clip-path: circle(6rem at 12rem 8rem);
}

```

Please let me know if this helps!

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![harshita.kanal](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/harshita.kanal/32/44081_2.png) [@harshita.kanal](https://devforum.zoom.us/u/harshita.kanal)\
**Post date:** [January 13, 2023, 9:24am UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/5 "2023-01-13T09:24:55Z")

</div>

Thank you! Really appreciate the help - I was able to get this to work with a single video in the view but not with multiple videos visible, can I achieve something like this image with a similar approach?

 ![Screenshot 2023-01-13 at 2.13.57 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/4/84d4d6c93d6a03380dac8ed480907ffcf0ec73eb.png)

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [January 13, 2023, 7:24pm UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/6 "2023-01-13T19:24:37Z")

</div>

Yes, you should be able to achieve this view without issue. How did your other videos render when you tried this? Also, could you share a code snippet of what you currently have?

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![harshita.kanal](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/harshita.kanal/32/44081_2.png) [@harshita.kanal](https://devforum.zoom.us/u/harshita.kanal)\
**Post date:** [January 16, 2023, 6:44am UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/7 "2023-01-16T06:44:31Z")

</div>

Hey, so with this approach - I could get only one video to show up as a circle and the other gets hidden - I assume this is because using clip path we are clipping the canvas view to the single circle, so anything around that gets hidden. Currently I have a single canvas element -

```auto
  <canvas
      className="video-track-component"
      id="zoomsdk-video-canvas"
      width={width}
      height={height}
    />

```

And I am applying this CSS to it -

```auto
  #zoomsdk-video-canvas {
    position: relative;
    box-sizing: border-box;
    shape-outside: circle(50%);
    clip-path: circle(6rem at 10rem 6rem);
  }

```

Other than that - the logic to subscribe each video input to the same canvas element is same as the documentation.

Thanks for the support!

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [January 18, 2023, 6:46pm UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/8 "2023-01-18T18:46:59Z")

</div>

Hi @harshita.kanal,  
Yep, I see what you’re saying. With that, the previously provided code snippets aren’t the best solution for this. Luckily, we have a customer who wrote an article on implementing more complex views with the Video SDK. I’ll link it [here](https://remotion.com/blog/building-zoom-in-web), along with [a repo](https://github.com/tommygaessler/bubbles) created by one of our team members who also implement a circular view of canvas elements. I believe these two resources will be useful guides for you to achieve your goal!

Thanks,  
Rehema

---

<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:** [February 18, 2023, 4:47am UTC](https://devforum.zoom.us/t/is-it-possible-to-show-video-inside-circular-container-in-zoom-web-sdk/80781/9 "2023-02-18T04:47:01Z")

</div>

Closed on February 18, 2023, 4:47am UTC

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