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: @zoom/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.