Error trying to unmuteAudio in zoom.audioHelper

Ok, so I’m trying to integrate the Video SDK into a React Native app. I’ve managed to get the sample app provided to run (tho the documentation is lacking in some places), so I started trying to integrate it in my own app.

I can join and leave sessions, I can sent text chat messages, and delete chat messages. but my problem (at least on the Android end running on a Pixel 3 emulator) is toggling audio and video.

If I toggle the audio (I’m reusing a lot of the code from the sample app, but as javascript rather than typescript), so a simple: await zoom.audioHelper.unmuteAudio(mySelf.userid) would silently fail to unmute. So , instead I used a .then/.catch to see what response or error were generated, and it responds into the then, with an ERROR… ZoomVideoSDKError_Load_Module_Error and I haven’t been able to find any info on this that is helpful to me.

A similar issue is happening when trying to use zoom.videoHelper.startVideo(). It returns a successful response, but the response is ZoomVideoSDKError_Internal_Error

Currently using the latest React Native SDK (1.5.3), and example of the onPressAudio function is below:

const onPressAudio = async () => {
      const mySelf = new ZoomVideoSdkUser(await zoom.session.getMySelf());
      const muted = await mySelf.audioStatus.isMuted();
      setIsMuted(muted);

      if(muted) {
        zoom.audioHelper.unmuteAudio(mySelf.userId)
          .then(res => console.log("unmute successful: " + res))
          .catch(err => console.log("could not unmute: " + err));
      }
      else {
        zoom.audioHelper.muteAudio(mySelf.userId)
          .then(res => console.log("mute successful: " + res))
          .catch(err => console.log("could not mute: " + err));
      }
    };

And here’s a screenshot of my directory structure for Android and iOS (with the matching SDKs for react native SDK 1.5.3)

Adding a screen shot so you can see that the SDK seems to be installed correctly (I can create sessions and send text messages for example between the Video SDK sample app (on the right, on an iphone emulator on a mac), and my app (on the left, on an android emulator on Ubuntu) . And if the sample app mutes/unmutes, the audio icon changes in my app, etc)

Hi @DanPiccolo , thanks for the post!

To reproduce the problem, I need some extra information from you. From the post, I know that you are trying to run sample app in Video SDK React Native 1.5.3 on Pixel 3 emulator(please correct me if there is mistake). Can you please also clarify which API level the emulator you are using? Thank you.

Not quite! It’s code from the sample app in interesting into a section of my own application (different scale, colours etc)

What do you mean by api level?

Sincerely,

Dan

Got it. Have you tried to run the sample app and see if the problem exists?

API level is the level of Android platform, you can see the api level of the emulator you are using in Device Manager if you are using Android Studio. And the minimum api level we support is 31, so there might be issues running the app on a device below api level 31.

image

It’s not a problem with the sample app (turning on and off audio or video), well not on android even at its current api level.

On iOS on the sample app turning on and off video is a problem, audio is ok

The API level is on 30. I will create a new device with a higher level and see if it works and let you know.

Sincerely,

Dan

Hi @DanPiccolo , thanks for your updates. IOS simulators do not have cameras, so we can’t turn on the video on iOS simulators. But if you test the video feature on a real iOS device, I believe it can work. Please let me know if you have further questions, thanks.

Using a Pixel 3a emulator with API 31 still gives the same issues with muting and turning on and off video. I will try API 33 and get back to you

Sincerely,

Dan

Ok, API 31 gave the same issues. I tried with a physical Android device, with the same issues as well.
Attempted to use API 33, and it’s a buggy mess that refuses to bundle most of time, or crashes, or disconnects from Metro so you get no debug messages, etc
In any event, using a Pixel3a in API 33 in the emulator still gives me the same issues.

My question is this a configuration error on my end? I’m wondering if I’m missing something?

ADDITIONAL update: I have an iOS emulator running the react native sample app ( I am remoting into an iMac from a different location) and the mic on the iMac picks up the ambient room audio (people talking in my corporate office), and I get the audio streamed to the app I’m trying to integrate Zoom Video SDK into… so I can join to a zoom session, I can receive chat messages, and I can receive audio. I cannot unmute (I’ve even tried forcing being umuted at join, with no luck), nor can I turn on the video, either in an android emulator, or a physical android phone.

Ok, I think I’ve solved the problem. It was a permissions issue… sigh… very unhelpful error messages.

Hi @DanPiccolo , glad to hear that the problem is solved! I will share the feedback of unspecified error messages to the team and see what we can do to improve, thanks for the feedback.

For your previous questions:

  1. API 31would be enough to enable all the features we provide including video and audio, so you can run the app on device with API 31 and above.

  2. For your second question, iOS simulator doesn’t have camera, so the video feature cannot be enabled on an iOS simulator, we can only turn on video on a physical iOS device.

Hey @DanPiccolo, thanks again for working through this - I would love to chat with you regarding the RN documentation and how we can make improvements there. Do you have time in the near future to meet and discuss this?

I can probably make the time. Let me know how to reach you/schedule a time

1 Like