Audio and video options are not correctly passed when joining a session

Hi there!

I finally found time to try out your React Native SDK. The API is so similar to my own implementation that I was able to swap it out without any problems. \o/

Still, I’m having trouble with the boolean options of the joinSession call on iOS. After joining the session with these options, the audio is still muted.

audioOptions: {
  connect: true,
  mute: false,
},

Debugging the native code audioOption.mute is always true.

audioOption.mute = [audioOptionConfig valueForKey:@"mute"];

It seems that the values from the NSDictionary must be interpreted with boolValue first. Same for the video options, of course.

Cheers,
Bernd

Hey @blindgaenger ,

Happy to hear you were able to get started easily! :slight_smile:

As for the mute value, by default the value will be true so the user will be muted for privacy reasons, until they umute themselves.

Let me know if that helps!

Thanks,
Tommy

Hi Tommy,

Thanks for your answer. The default is fine, but I can’t override it.

Sorry, I think I should have made it clearer that this is a bug report. So here it is with the correct template.

Description

In the React Native SDK, a JoinSessionConfig can be used to set whether or not a user is muted when joining a session. On iOS, these options are called the SessionContext.

Errors

Setting the mute option has no effect and the audio will always remain muted after joining the session.

Which React Native Video SDK version?

NPM Package: @zoom1234/react-native-videosdk: 1.1.1
iOS Framework: zoom-video-sdk-iOS-1.1.1

Video SDK Code Snippets

Joining a session from the React Native SDK (code from the official SDK example):

await zoom.joinSession({
  sessionName: params.sessionName,
  sessionPassword: params.sessionPassword,
  token: token,
  userName: params.displayName,
  audioOptions: {
    connect: true,
    mute: false, // ← should have an effect
  },
  videoOptions: {
    localVideoOn: true,
  },
});

To Reproduce(If applicable)

Steps to reproduce the behavior:

  1. Use the official react-native-zoom-video-sdk/example
  2. Change the audioOption to mute: false (which it already is).
  3. Start the app.
  4. Join a session.
  5. The local user is muted.

Screenshots

Both screenshots from debugging in Xcode of the same debugging session with the config shown above.

The incoming NSDictionary audioOptionConfig shows the correct values.

After retrieving the vales from the dictionary the mute value is still true.

Smartphone (please complete the following information):

  • Device: iPhone XS Max
  • OS: iOS 15.1

Additional context

Boolean values have to be interpreted with boolValue when retrieved from an NSDictionary. I’ve patched the code of my local Pod to use boolValue and it works as expected now.

audioOption.mute        = [[audioOptionConfig valueForKey:@"mute"] boolValue];

The same must be applied to the other boolean options as well.

Hi @tommy, I just wanted to follow up before the topic is closed. Has the problem already been addressed or do you need more information?

Cheers,
Bernd

Hey @blindgaenger ,

Thanks for the in-depth write up! We are taking a look at this issue and will share an update shortly. (ZOOM-330058)

We do apologize for the delayed response.

-Tommy

1 Like

Hi @tommy. Nice! thanks for taking care of this.

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

Hey @blindgaenger ,

We found the bug. This does not only apply to the “mute” option, but also impact other options as well. We will fix this in the next React Native Video SDK release. :slight_smile:

Thanks,
Tommy

Hi Tommy, any update on when the next release will be? We are also experiencing this issue.

Hi @NickM, thanks for using the dev forum.

The v1.2.0 release of the React Native wrapper will be available toward the end of this month. In case you weren’t already aware, the best places to stay up-to-date with new SDK releases are the #new-releases category and the changelog.

Thanks!