Issue with Virtual Background When Using Newer Zoom SDK Versions

Video SDK Type and Version
zoom/videosdk Web Version 2.2.0 and 2.2.5

Description
We’re using stream.createProcessor to implement our custom virtual background feature. However, starting from version 2.2.0 of the Video SDK, we began encountering a problem with this functionality.

When a user joins a call for the second time, we receive the following error:


{ type: 'INVALID_PARAMETERS', reason: 'You have already created this Processor', errorCode: 6121 }

It seems that the processor is created correctly the first time, but on subsequent attempts to join a call, the SDK considers that the processor is already created and does not allow us to create it again. The issue is that there is no method available in the SDK to destroy or reset the processor, so the only workaround is to refresh the entire page.

We also tried saving the created processor from the first call and reusing it in later calls, but that approach doesn’t work either.

This issue is currently blocking us from upgrading to the latest versions of @zoom/videosdk. We would appreciate any guidance or a fix for this problem.

Error?

{ type: 'INVALID_PARAMETERS', reason: 'You have already created this Processor', errorCode: 6121 }

How To Reproduce
Steps to reproduce the behavior including:

  1. Start a Zoom call using a custom video processor with @zoom/videosdk version 2.2.0 or above.
    Example code:
const processor = await this.stream.createProcessor(videoProcessorOptions);
await this.stream.addProcessor(processor);
  1. The first call works as expected. End the call.

  2. Attempt to join a new call and run the same processor setup code again.

  3. You will receive the error

Hey @Rafael_Goulart

Thanks for your feedback.

This is indeed an issue in Video SDK Web, and we will fix it in the next version.

For now, the workaround is to call destroyClient after leaving the session and then createClient again and make sure to rebind all the necessary events afterward.

Thanks
Vic

Hey @vic.yang

I had already tried using destroyClient after leaving the session and creating a new client instance, but unfortunately, the issue still persists the error continues to appear when trying to use createProcessor again.

Given that, I’ll wait for the next version with the fix.
Do you have an estimated release date for it?

Hi @Rafael_Goulart

I had already tried using destroyClient after leaving the session and creating a new client instance, but unfortunately, the issue still persists the error continues to appear when trying to use createProcessor again.

We tested the workaround using destroyClient, and it works. Below are the code snippets:

await client.leave();
await ZoomVideo.destroyClient();
client = ZoomVideo.createClient();
await client.init("en-US", "Golbal");
initEvents();
await client.join("TOPIC", "JWT_TOKEN", "NAME", "PASSCODE");
const stream = client.getMediaStream();
const processor = await stream.createProcessor(params);

Do you have an estimated release date for it?

The next release is expected around late August.

Thanks
Vic