# Self Video is not rendering on safari browser

**URL:** <https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [May 24, 2023, 11:05am UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952 "2023-05-24T11:05:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rinki](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rinki/32/48806_2.png) [@rinki](https://devforum.zoom.us/u/rinki)\
**Post date:** [May 24, 2023, 11:05am UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952/1 "2023-05-24T11:05:17Z")

</div>

**This is my code its working on Chrome browser but not working on safari browser**

```
  const selfcanvas = this.$refs.selfViewCanvas;
  const selfvideoView = this.$refs.selfViewVideo;
  const canvasWidth = 320;
  const canvasHeight = 180;
  const xOffset = 0;
  const yOffset = 0;
  const videoQuality = 2;

  this.isVideo=true;

  // Check if the browser is Safari
  function isSafari() {
    return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
  }

  // if Desktop Chrome, Edge, and Firefox with SharedArrayBuffer not enabled, Android browsers, and on devices with less than 4 logical processors available
  if(this.stream.isRenderSelfViewWithVideoElement() || isSafari()) {
     // start video - video will render automatically on HTML Video element
     this.stream.startVideo({ videoElement: selfvideoView, mirrored: true }).then(() => {
        // show HTML Video element in DOM
        selfvideoView.style.display = 'block'
     }).catch((error) => {
       console.log(error)
     })
  // desktop Chrome, Edge, and Firefox with SharedArrayBuffer enabled, and all other browsers
  } else {
     // start video
    await this.stream.startVideo().then(() => {
        // render video on HTML Canvas element
        this.stream.renderVideo(selfcanvas, this.client.getCurrentUserInfo().userId, canvasWidth, canvasHeight, xOffset, yOffset, videoQuality).then(() => {
           // show HTML Canvas element in DOM
           selfcanvas.style.display = 'block';
          this.selfCanvasSt = 'block';
        }).catch((error) => {
           console.log(error)
        })
     }).catch((error) => {
        console.log(error)
     })
  }

```

---

<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:** [May 24, 2023, 1:19pm UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952/2 "2023-05-24T13:19:42Z")

</div>

Hi @rinki ,

Thanks for your post and welcome to the forum! When attempting to render your self-view video, are you getting any error(s) in your Safari console? Also, what version of the Web Video SDK are you using, and what version of Safari?

Thanks,  
Rehema

---

<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:** [May 25, 2023, 1:54am UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952/3 "2023-05-25T01:54:44Z")

</div>

Hey @rinki

> ```JavaScript
> // if Desktop Chrome, Edge, and Firefox with SharedArrayBuffer not enabled, Android browsers, and on devices with less than 4 logical processors available
> if(this.stream.isRenderSelfViewWithVideoElement() || isSafari()) {
> // start video - video will render automatically on HTML Video element
> this.stream.startVideo({ videoElement: selfvideoView, mirrored: true }).then(() => {
> // show HTML Video element in DOM
> selfvideoView.style.display = 'block'
> }).catch((error) => {
> console.log(error)
> })
> }
> 
> ```

In the code snippets above, ` isSafari()` is not a condition for rendering self-view with Video element. Could you try to remove this condition and check whether the issue gets solved?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![rinki](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rinki/32/48806_2.png) [@rinki](https://devforum.zoom.us/u/rinki)\
**Post date:** [May 25, 2023, 4:48am UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952/4 "2023-05-25T04:48:51Z")

</div>

Hello @rehema.zoom  
Thanks for reply. Currantly I am using @zoom1234/videosdk": “^1.5.5” version and Safari Version 16.4 . and safari console getting error [Error] Error when trying to check for local RTC peer connection: TypeError: n.addStream is not a function. (In ‘n.addStream(h)’, ‘n.addStream’ is undefined)

Thanks,  
Rinki

---

<div class="post-metadata">

**Author:** ![rinki](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rinki/32/48806_2.png) [@rinki](https://devforum.zoom.us/u/rinki)\
**Post date:** [May 25, 2023, 5:48am UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952/5 "2023-05-25T05:48:27Z")

</div>

Hello @vic.yang  
Thanks for reply. I removed isSafari() this condition but still showing this error [Error] Error when trying to check for local RTC peer connection: TypeError: n.addStream is not a function. (In ‘n.addStream(h)’, ‘n.addStream’ is undefined)

Thanks,  
Rinki

---

<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:** [May 25, 2023, 6:04am UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952/6 "2023-05-25T06:04:47Z")

</div>

Hey @rinki

That doesn’t matter. It’s just an early warning on the console and we have handled the case inside Video SDK.

Thanks  
Vic

---

<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:** [May 25, 2023, 6:09am UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952/7 "2023-05-25T06:09:28Z")

</div>

Hey @rinki

Safari 16.4 introduces an issue that can break the video rendering. We have already released the version to fix it.

Could you try the latest version of Video SDK (1.7.7)? And the minimum fixed version is 1.7.0.

> **[Zoom Video SDK - web - 1.7.0](https://devsupport.zoom.us/hc/en-us/articles/13993303771405-Zoom-Video-SDK-web-1-7-0)**
>
> Published March 31, 2023
> Added
> 
> 
> checkFeatureRequirements API to check browser compatibility with supported features.
> 
> reclaimHost method to allow the original host to reclaim host privileges when ...

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:** [June 24, 2023, 4:09pm UTC](https://devforum.zoom.us/t/self-video-is-not-rendering-on-safari-browser/88952/8 "2023-06-24T16:09:30Z")

</div>

Closed on June 24, 2023, 4:09pm UTC

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