# stopVideo leaving black boxes behind in safari

**URL:** <https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068>\
**Category:** Video SDK\
**Created:** [February 6, 2025, 4:14pm UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068 "2025-02-06T16:14:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![LJ155](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LJ155](https://devforum.zoom.us/u/LJ155)\
**Post date:** [February 6, 2025, 4:14pm UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068/1 "2025-02-06T16:14:53Z")

</div>

We are upgrading from Video SDK Web 1.12.10 to 2.1.5 and note that stopRenderVideo() and renderVideo() are now deprecated.

We were using these to render to a canvas on Safari in our previous versions.

We’ve switched to using attachVideo() and detachVideo() for all browsers which is working fine in Chrome and allowing camera to be toggled on/off. On Safari and Firefox when the camera is toggled off after starting a black box is remaining for both remote and self view.

We are attaching the video to the video-player-container.

Is something additional needed on Safari? The example is still using renderVideo and stopRenderVideo in video-single.tsx so I cannot see how to use detachVideo() in safari.

---

<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:** [February 7, 2025, 2:47am UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068/2 "2025-02-07T02:47:50Z")

</div>

Hey @LJ155

Thanks for your feedback.

Could you share some code snippets related to the issue you mentioned so we can troubleshoot it?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![LJ155](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LJ155](https://devforum.zoom.us/u/LJ155)\
**Post date:** [February 7, 2025, 9:38am UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068/3 "2025-02-07T09:38:44Z")

</div>

Thanks, yes here’s our code -

```auto
      const videoResult = await stream.startVideo();
      if (typeof videoResult === 'string' || videoResult === undefined) {
        const video = await stream.attachVideo(
          userId,
          VideoQuality.Video_720P
        );
        if (video instanceof HTMLElement) {
          videoPlayerContainer.appendChild(video);
        }

```

This is attaching the video correctly in all browsers

```auto
 await stream.stopVideo();
      const elements = await stream.detachVideo(userId);
      if (Array.isArray(elements)) {
        elements.forEach(e => e.remove());
      }
      else {
        elements.remove();
      }

```

This removes the video in chrome, but is leaving black boxes behind in Safari and Firefox.

Thanks!

---

<div class="post-metadata">

**Author:** ![LJ155](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LJ155](https://devforum.zoom.us/u/LJ155)\
**Post date:** [February 12, 2025, 9:06am UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068/4 "2025-02-12T09:06:02Z")

</div>

Any ideas based on the above? Still leaving black boxes behind in Safari/Firefox.

We are currently rendering to a canvas using renderVideo() and stopRenderVideo().

Thanks!

---

<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:** [February 12, 2025, 10:09am UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068/5 "2025-02-12T10:09:02Z")

</div>

Hey @LJ155

Thanks for sharing the information with us.

It’s a known limitation on our end.

Currently, a workaround for Safari is to set `enforceMultipleVideos` to `true` in the `client.init` method.

We will fix the issue in the future release.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![LJ155](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LJ155](https://devforum.zoom.us/u/LJ155)\
**Post date:** [February 28, 2025, 4:01pm UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068/6 "2025-02-28T16:01:35Z")

</div>

Thanks, enforceMultipleVideos is still leaving the black boxes behind on safari and firefox.  
We will wait for the fix, thanks.

---

<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:** [March 13, 2025, 4:59am UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068/7 "2025-03-13T04:59:40Z")

</div>

Hey @LJ155

We have released Video SDK Web 2.1.10, which includes a fix for this issue.

Could you upgrade to the latest version and try again?

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![LJ155](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LJ155](https://devforum.zoom.us/u/LJ155)\
**Post date:** [March 13, 2025, 2:34pm UTC](https://devforum.zoom.us/t/stopvideo-leaving-black-boxes-behind-in-safari/126068/8 "2025-03-13T14:34:23Z")

</div>

Hi @vic.yang, that’s sorted it on our end! Thanks!
