# Is isRenderSelfView WithVideoElement necessary?

**URL:** <https://devforum.zoom.us/t/is-isrenderselfview-withvideoelement-necessary/97121>\
**Category:** Web\
**Tags:** api, video-sdk\
**Created:** [October 20, 2023, 8:54am UTC](https://devforum.zoom.us/t/is-isrenderselfview-withvideoelement-necessary/97121 "2023-10-20T08:54:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.kita](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/r.kita/32/48361_2.png) [@r.kita](https://devforum.zoom.us/u/r.kita)\
**Post date:** [October 20, 2023, 8:54am UTC](https://devforum.zoom.us/t/is-isrenderselfview-withvideoelement-necessary/97121/1 "2023-10-20T08:54:02Z")

</div>

According to the Zoom Video SDK documentation, I’ve implemented the code like this:

```auto
{mediaStream?.isRenderSelfViewWithVideoElement() ? (
  <video id={SELF_VIDEO_ID} />
) : (
  <canvas id={SELF_VIDEO_ID} />
)}

```

1. If I want to use only one of these elements (video or canvas), which one should I choose?

2. If I decide to stick with just one element and don’t use isRenderSelfViewWithVideoElement, what would be the performance difference, if any, under certain conditions?

---

<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 20, 2023, 9:58am UTC](https://devforum.zoom.us/t/is-isrenderselfview-withvideoelement-necessary/97121/2 "2023-10-20T09:58:28Z")

</div>

Hey @r.kita

Thanks for your feedback.

For performance optimization, on mobile browsers, rendering the self-view on the Video element provides better performance compared to the Canvas element.

However, in the case of SharedArrayBuffer enabled, it is more efficient to render both the self-view and other’s view on the same canvas.

To simplify the decision-making process, our Video SDK offers a method called `isRenderSelfViewWithVideoElement()` which indicates whether to use the Video element or the Canvas element.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![r.kita](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/r.kita/32/48361_2.png) [@r.kita](https://devforum.zoom.us/u/r.kita)\
**Post date:** [October 20, 2023, 2:36pm UTC](https://devforum.zoom.us/t/is-isrenderselfview-withvideoelement-necessary/97121/3 "2023-10-20T14:36:21Z")

</div>

We are not using SharedArrayBuffer, so we will go with the video elemen.

If performance improvements become necessary, we will add a check for isRenderSelfViewWithVideoElement.

Thank you!

---

<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:** [November 20, 2023, 12:36am UTC](https://devforum.zoom.us/t/is-isrenderselfview-withvideoelement-necessary/97121/4 "2023-11-20T00:36:53Z")

</div>

Closed on November 20, 2023, 12:36am UTC

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