SharedArrayBuffer support in sample Purejs-demo vs Reactjs-demo

Description
When running a sample on pure js, an error occurs, but when running a sample from the same archive on React js, there is no such problem. Everything runs in the same browser.

I ran two samples (pure and react) and connected them to one meeting

Browser Console Error

button-click-handlers.js:84 Error toggling video {type: ‘INVALID_PARAMETERS’, reason: ‘You must pass a

Which Web Video SDK version?
1.1.7

Video SDK Code Snippets

        try {
          isWebcamOn = !isWebcamOn;
          await (0,_video_video_toggler__WEBPACK_IMPORTED_MODULE_1__.toggleSelfVideo)(mediaStream, isWebcamOn);
          toggleWebcamButtonStyle();
        } catch (e) {
          isWebcamOn = !isWebcamOn;
          console.error('Error toggling video', e);
        }

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Run Purejs-demo sample
  2. Join to session
  3. Click on video-button
  4. See error

Screenshots
If applicable, add screenshots to help explain your problem.

Device (please complete the following information):

  • OS: [e.g. Windows 10]
  • Browser: [e.g. Chrome, Yandex]