Event Description:
I have implemented a preview screen using a canvas element as was in the previous forum.
I also used ZoomVideo.createLocalVideoTrack();.
In that case, I am having trouble with the following events.
Start video call → change filters with background “none”, “blur”, and “white” respectively → background changes as normal with camera on.
In the state of 1, once the preview screen is closed with the button and after restarting, select either item for background “blur” or “white” → camera is turned on but not displayed with black background. However, if the background is “none”, it behaves as usual.
Reloading the screen and restarting the camera resolves the second issue.
Implementation details and possible cause of the event:
Use createLocalVideoTrack to create a new this.localVideoFilterTrack with this.localVideoFilterTrack undefined before entering the if statement.
public localVideoFilterTrack: LocalVideoTrack | undefined;
if (!this.localVideoFilterTrack) {
this.localVideoFilterTrack = deviceId
? ZoomVideo.createLocalVideoTrack(deviceId)
ZoomVideo.createLocalVideoTrack(); : ZoomVideo.createLocalVideoTrack(); }
}
Then the following elements will be placed in the videoCaptureValue in this.localVideoFilterTrack.
However, once the preview screen is closed with the button and after restarting
"videoCaptureValue": null
and null.
I think the reason this is happening is that the instance in this.localVideoFilterTrack also shows the same id before and after the restart and is not initialized.
Based on my understanding, does the issue occur when using a canvas element as the preview element and not passing the imageUrl parameter for the virtual background when starting the video
It’s a known flaw in Video SDK Web.
We will improve the localVideoTrack’s virtual background preview method in the next version.
I am passing the canvas element as an argument to the start method of LocalVideoTrack as follows.
In that case, the imageUrl should be passed as string without any problem. But still it does not work. Will this problem be improved in the next version or later?
The virtual background doesn’t work for preview.
This issue is related to the usage of enforceVirtualBackground: true when SharedArrayBuffer is disabled.