After updating Zoom Video SDK from 1.12.14 to 2.1.5 issue with media stream instance

After updating Zoom Video SDK from 1.12.14 to 2.1.5, this condition stopped working for Safari Version 18.0.1 (20619.1.26.31.7):

const safariIsLoading = window.safari !== undefined ? (!mediaContext?.audio?.encode || !mediaContext?.audio?.decode) : false;

The issue is that in mediaContext, the values of audio.encode and audio.decode do not change to true after loading.

I also managed to reproduce this in sample application.
To do this, I simply commented out the configuration to enable SharedArrayBuffer in it:

https://github.com/zoom/videosdk-web-sample/blob/master/config-overrides.js#L12

const addDevServerCOOPReponseHeader = (config) => {
  // config.headers = {
  //   ...config.headers,
  //   'Cross-Origin-Embedder-Policy': 'require-corp',
  //   'Cross-Origin-Opener-Policy': 'same-origin'
  // };
  config.devMiddleware = {
    ...config.devMiddleware,
    writeToDisk: true,
  };
  return config;
};

after that I see that the application does not receive events:
{type: "audio", action: "encode", result: "success"}
{type: "audio", action: "decode", result: "success"}

https://github.com/zoom/videosdk-web-sample/blob/master/src/App.tsx#L251

  const onMediaSDKChange = useCallback((payload: any) => {
    const { action, type, result } = payload;
    console.log('onMediaSDKChange', payload);
    dispatch({ type: `${type}-${action}`, payload: result === 'success' });
  }, []);

@vic.yang, could you please confirm that this does not affect the functionality?
If so, I will simply remove the audio.encode and audio.decode check from our app’s code.


SharedArrayBuffer is disabled
Zoom Video SDK 2.1.5
React 17.0.2

{type: "audio", action: "encode", result: "success"}
{type: "audio", action: "decode", result: "success"}

Update: Events are not coming in all browsers, not just Safari

Hey @sergey77

Thanks for your feedback.

Sorry for the confusion caused by the previous code. It is no longer necessary to listen to the media-sdk-change event as a prerequisite for starting audio.

Since version 2.1.x, we have introduced WebRTC solutions, eliminating the need for audio encoding/decoding operations. Additionally, for compatibility, we now support audio functionality without waiting for audio encode/decode.

Thanks
Vic

3 Likes

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