# Mediastream UpdateVideoMask and getVideoMaskStatus not working?

**URL:** <https://devforum.zoom.us/t/mediastream-updatevideomask-and-getvideomaskstatus-not-working/94218>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [August 30, 2023, 2:59pm UTC](https://devforum.zoom.us/t/mediastream-updatevideomask-and-getvideomaskstatus-not-working/94218 "2023-08-30T14:59:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanPiccolo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/danpiccolo/32/41394_2.png) [@DanPiccolo](https://devforum.zoom.us/u/DanPiccolo)\
**Post date:** [August 30, 2023, 2:59pm UTC](https://devforum.zoom.us/t/mediastream-updatevideomask-and-getvideomaskstatus-not-working/94218/1 "2023-08-30T14:59:51Z")

</div>

### Before Creating a New Topic:

I’m expecting the virtual mask (a blur) to work

- Zoom Developer Changelog for Dev Product Changes:  
[Stream | Zoom Video SDK for Web - 2.2.0](https://marketplacefront.zoom.us/sdk/custom/web/modules/Stream.html#getVideoMaskStatus)

* * *

**Description**  
I am currently using 1.8.7 and I can’t seem to set the virtual mask on my system. Has anyone successfully done this

**Browser Console Error**  
When trying to check the video mask status, I get this error:  
this[WR].getVideoMaskStatus is not a function

When trying to set the mask status manually:

````auto
[12:30] Fahim Ahmed

index.umd.js:1 Uncaught (in promise) 

{type: 'INVALID_OPERATION', reason: 'Cannot update mask'}

(anonymous) @ index.umd.js:1

updateVideoMask @ index.umd.js:1

n.value @ index.umd.js:1

r.value @ index.umd.js:1

JA.o.value @ index.umd.js:1

value @ index.umd.js:1

blur @ ZoomCreate.js:205

onClick @ ZoomCreate.js:294

callCallback @ react-dom.development.js:4164

invokeGuardedCallbackDev @ react-dom.development.js:4213

invokeGuardedCallback @ react-dom.development.js:4277

invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291

executeDispatch @ react-dom.development.js:9041

processDispatchQueueItemsInOrder @ react-dom.development.js:9073

processDispatchQueue @ react-dom.development.js:9086

dispatchEventsForPlugins @ react-dom.development.js:9097

(anonymous) @ react-dom.development.js:9288

batchedUpdates$1 @ react-dom.development.js:26140

batchedUpdates @ react-dom.development.js:3991

dispatchEventForPluginEventSystem @ react-dom.development.js:9287

dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465

dispatchEvent @ react-dom.development.js:6457

dispatchDiscreteEvent```

**Which Web Video SDK version?**
I am using 1.8.7

**Video SDK Code Snippets**

````

console.log(mediaStream?.isSupportVirtualBackground());  
console.log(mediaStream?.getVideoMaskStatus());  
mediaStream.startVideo({ videoElement: document.querySelector(‘#self-view-video’), virtualBackground: mediaStream?.isSupportVirtualBackground() ? { imageUrl: ‘blur’ } : false }).then(() =\> {  
console.log(“----------------current user started video----------”);  
console.log(zmClient.getAllUser());

```
            if(!mediaStream?.isSupportVirtualBackground()) {
                console.log("--- trying video mask ---");
                try {                    
                    mediaStream.updateVideoMask().catch(err => {
                        console.log("--- update video mask not supported ---")
                        console.log(err);
                    });
                }
                catch(error) {
                    console.log("Update mask not supported");
                }
            }  

            setIsCameraOn(true);
            setIsCameraLoading(false)
        }).catch((error) => {
            console.log("---------camera error----------", error);
            setIsCameraLoading(false)
            failed("Check your camera, either it is taken or not available or don't have permission!", 4000);
        })

```

```auto

**Device (please complete the following information):**
- OS: Ubuntu 20.04
- Browser: Chrome
- Browser Version Version 116.0.5845.140 (Official Build) (64-bit)

**Additional context**
Add any other context about the problem here.
```

---

<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:** [September 1, 2023, 12:29am UTC](https://devforum.zoom.us/t/mediastream-updatevideomask-and-getvideomaskstatus-not-working/94218/2 "2023-09-01T00:29:19Z")

</div>

Hey @DanPiccolo

Thanks for your feedback.

It’s a known issue and it will be fixed in the upcoming release.

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:** [September 7, 2023, 2:16am UTC](https://devforum.zoom.us/t/mediastream-updatevideomask-and-getvideomaskstatus-not-working/94218/3 "2023-09-07T02:16:29Z")

</div>

Hey @DanPiccolo

The latest Video SDK Web has fixed this issue, could you upgrade it and try it again?

> **[Zoom Video SDK- web - 1.8.10](https://devsupport.zoom.us/hc/en-us/articles/18598109985037-Zoom-Video-SDK-web-1-8-10)**
>
> Published September 6, 2023
> Enhanced
> 
> Added a prompt for recommending the latest version in the console.
> 
> Fixed
> 
> Resolved issues with the video mask feature.
> Fixed the problem with a black screen o...

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:** [October 7, 2023, 12:17pm UTC](https://devforum.zoom.us/t/mediastream-updatevideomask-and-getvideomaskstatus-not-working/94218/4 "2023-10-07T12:17:14Z")

</div>

Closed on October 7, 2023, 12:17pm UTC

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