# Not rendered by attachVideo() when blur is enabled in createLocalVideoTrack()

**URL:** <https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [May 24, 2024, 8:24am UTC](https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632 "2024-05-24T08:24:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![H-Takesue](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/h-takesue/32/60015_2.png) [@H-Takesue](https://devforum.zoom.us/u/H-Takesue)\
**Post date:** [May 24, 2024, 8:24am UTC](https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632/1 "2024-05-24T08:24:15Z")

</div>

**Video SDK Web and Version**  
Zoom Web Video SDK 1.11.0  
Google Chrome  
Version 125.0.6422.76 (arm64)

**Description**  
Once start() to canvasTag with blur enabled after createLocalVideoTrack(), even after stop(), attachVideo() will not render any video other than its own.  
When start() is done to videoTAg without blur enabled, it works fine.  
The same is true for video-sdk-sample.

There is no error in attachVideo() itself.

---

<div class="post-metadata">

**Author:** ![H-Takesue](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/h-takesue/32/60015_2.png) [@H-Takesue](https://devforum.zoom.us/u/H-Takesue)\
**Post date:** [May 31, 2024, 8:58am UTC](https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632/2 "2024-05-31T08:58:08Z")

</div>

We have investigated with 1.11.6 following an update of the Zoom Web Video SDK and have confirmed the same behavior.

About the operations we performed

1. launch videosdk-web-sample locally by npm run start.
2. Launch 2 browser windows and access each window.
3. In one window A, enter /preview, start camera, and do background blur.
4. Browser back in window A and return to the menu.
5. In window B, go to /video and turn on the camera.
6. Go to /video in window A and turn on the camera
7. The camera content that should be sent from window A is not rendered in window B because it is completely dark.

I am currently designing a transition like google meet that checks the preview before the session starts and then starts the session as is.

If I apply blur on the preview, it will not be a correct preview if the image is not sent to the other party. (I want to have blur during the session).

Is there any workaround for this?

---

<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 31, 2024, 12:22pm UTC](https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632/3 "2024-05-31T12:22:06Z")

</div>

Hey @H-Takesue

Thanks for your feedback.

May I assume that you are testing on Windows Chrome?

As you mentioned, you launched two browsers on the same computer. If you didn’t specify the camera ID, both browsers will use the default camera. When the second browser (window A) starts the video, it will fail because the camera is already occupied by the first browser (window B), resulting in a black screen in window B when viewing A.

It would be better if you could share the session ID with us for troubleshooting purposes.

To keep the preview audio/video settings in the session, you can implement this yourself. Store the state chosen during the preview and set the corresponding parameters in the session. Both `stream.startAudio` and `stream.startVideo` have options to specify the preset settings.

> **[AudioOption | Zoom Video SDK for Web - 1.11.6](https://marketplacefront.zoom.us/sdk/custom/web/interfaces/AudioOption.html)**
>
> Documentation for Zoom Video SDK for Web - 1.11.6

> **[CaptureVideoOption | Zoom Video SDK for Web - 1.11.6](https://marketplacefront.zoom.us/sdk/custom/web/interfaces/CaptureVideoOption.html)**
>
> Documentation for Zoom Video SDK for Web - 1.11.6

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![H-Takesue](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/h-takesue/32/60015_2.png) [@H-Takesue](https://devforum.zoom.us/u/H-Takesue)\
**Post date:** [May 31, 2024, 2:24pm UTC](https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632/4 "2024-05-31T14:24:20Z")

</div>

Thank you for your reply.

The test was performed using google chrome on a Mac book pro.  
MacBook Pro 14-inch,2021  
M1 Max  
Sonoma 14.4.1

When I checked the same situation locally again, the session id was eGOZ4UFISRSpmgn1XbkiOQ==

In localVideo, when Blur is not used, the camera information is properly displayed instead of a black screen.

This only happens when using Blur in localVideo.

---

<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:** [June 3, 2024, 3:00am UTC](https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632/5 "2024-06-03T03:00:50Z")

</div>

Hey @H-Takesue

I’m sorry, our sample app might be somewhat misleading regarding the preview feature.

When you launch this sample, you will join the session by default, but the preview feature is typically a pre-session operation. To correct this behavior, you need to leave the session first and then navigate to the preview page. This way, after you finish the preview and return, you can click join to rejoin the session. This is for the pre-session virtual background feature.

For the in-session virtual background preview, you can directly call the `stream.previewVirtualBackground` method to preview the video.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![H-Takesue](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/h-takesue/32/60015_2.png) [@H-Takesue](https://devforum.zoom.us/u/H-Takesue)\
**Post date:** [June 5, 2024, 2:12am UTC](https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632/6 "2024-06-05T02:12:24Z")

</div>

Hello Vic

Thank you for your reply.

I changed the timing of the join method to the timing of the transition from the preview screen to the session screen and verified it.

Both the preview rendered on the video and the preview rendered on the blurred canvas rendered correctly on the session screen.

We also verified that the background specification on the session screen also works correctly.

Thank you very much for sharing this information.

---

<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:** [July 5, 2024, 12:13pm UTC](https://devforum.zoom.us/t/not-rendered-by-attachvideo-when-blur-is-enabled-in-createlocalvideotrack/110632/7 "2024-07-05T12:13:03Z")

</div>

Closed on July 5, 2024, 12:13pm UTC

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