zoom / videosdk-ui-toolkit-web

The Zoom Video SDK UI toolkit is a prebuilt video chat user interface powered by the Zoom Video SDK.
https://www.npmjs.com/package/@zoom/videosdk-ui-toolkit
Other
10 stars 8 forks source link

UIKit: SharedArrayBuffer disabled. 720p, Gallery View, and Virtual Background not available. #19

Closed AlexanderKapelyukhovskiy closed 4 months ago

AlexanderKapelyukhovskiy commented 4 months ago

After testing the Zoom Web UI Toolkit on our test environment (which is served over HTTPS), we encountered the following error message:

"UIKit: SharedArrayBuffer disabled. 720p, Gallery View, and Virtual Background not available."

To address this error, I followed the instructions provided in the Zoom documentation (https://developers.zoom.us/docs/video-sdk/web/sharedarraybuffer/) and added the following headers to our server responses:

Cross-Origin-Embedder-Policy: credentialless Cross-Origin-Opener-Policy: same-origin However, after adding these headers, the Zoom Web UI Toolkit stopped working entirely, and I observed the following error in the browser console:

"Access to script at 'https://source.zoom.us/videosdk/1.9.8/lib/js_media.min.js' from origin 'https://***.com/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

Request:

Could you please provide a workaround for enabling the Virtual Background feature with the Zoom Web UI Toolkit? It seems that the suggested workaround to address the SharedArrayBuffer error is conflicting with the approach used by the UI Toolkit, and the added headers are blocking the js_media.min.js script from loading.

tommygaessler commented 4 months ago

Hey @AlexanderKapelyukhovskiy , happy to help, which version of the UI Toolkit are you using?

AlexanderKapelyukhovskiy commented 4 months ago

Thank you for your quick response @tommygaessler. We are using "@zoom/videosdk-ui-toolkit": "1.9.8"

tommygaessler commented 4 months ago

Hey @AlexanderKapelyukhovskiy , can you please upgrade to the latest 1.10.8-1? You are on the beta version, and the issue is not happening in the latest GA version.

https://www.npmjs.com/package/@zoom/videosdk-ui-toolkit

AlexanderKapelyukhovskiy commented 4 months ago

After updating the version of the Zoom UI Toolkit, unfortunately, the issue persists. Upon further investigation, it seems that when our code calls the joinSession() function internally, it attempts to load a script from the URL https://source.zoom.us/videosdk/1.9.8/lib/js_media.min.js. However, due to the presence of the Cross-Origin-Opener-Policy: same-origin header, this loading process is blocked.

To address this issue, I propose making the location from which the Zoom UI Toolkit loads the videoSDK file configurable. By allowing developers to specify a different location, such as an asset folder within our application, we can circumvent the restrictions imposed by the same-origin policy. This would provide a viable solution to the problem encountered with the current setup.

Thank you for considering this suggestion @tommygaessler, and I look forward to hearing your thoughts on how we can proceed.

AlexanderKapelyukhovskiy commented 4 months ago

Hi @tommygaessler,

I hope this message finds you well. I wanted to check in regarding the issue we discussed earlier. If there are any additional details needed to help resolve the problem, please don't hesitate to reach out.

As we're nearing our release, it's crucial for us to address this issue, especially since it's impacting our customers' ability to utilize virtual backgrounds. Your assistance in resolving this matter would be greatly appreciated.

Thank you for your attention to this matter, and I look forward to hearing from you soon.

tommygaessler commented 4 months ago

Hey @AlexanderKapelyukhovskiy , that version you shared, 1.9.8, is still the beta version.

It seems you have not upgraded or there is a caching issue. Please try upgrading again.

You can see in our sample app this issue does not happen: https://videosdk.dev/uitoolkit-canvas-gallery/

AlexanderKapelyukhovskiy commented 4 months ago

Hi @tommygaessler,

Thank you very much for your assistance and support.

Upon retesting, it appears that the issue has resolved itself, possibly due to a caching issue.

Our team is now eager to expand our virtual background library with additional images. However, we haven't come across any documentation or examples detailing how to do this within the Zoom UI toolkit for Web.

Could you please provide us with a link to relevant documentation or an example demonstrating how we can add new images to the virtual background feature?

Your guidance would be greatly appreciated.

Thank you again for your help!

tommygaessler commented 4 months ago

Hey @AlexanderKapelyukhovskiy , happy to hear that!

For adding more virtual backgrounds, it is on our roadmap. We are working on that feature for our next release.

AlexanderKapelyukhovskiy commented 3 months ago

Hi @tommygaessler,

I hope you're doing well.

I was wondering if there have been any updates regarding the possibility of adding new images for virtual backgrounds?

Thank you!