getAudioOutputModes is undefined

getAudioOutputModes is undefined.]

I’m trying to get the list of audio modes,
I’m using this, but is not working:

callController.getAudioOutputModes().then(
      modes => {
        console.log('getAudioOutputModes :: modes', modes);
      }, error => {
        console.log('getAudioOutputModes :: error', error);
      }
);

I think it would be great if cometchat took care of managing the audio mode based on the list of available options and not always leaving it in the same mode and being the developer to configure the other scenarios.

@Laurence is the call active when you are calling this method?

Yes, the call is active.

I’m working with React Native

This is the error:

TypeError: callController.getAudioOutputModes is not a function. (In 'callController.getAudioOutputModes())', 'callController.getAudioOutputModes' is undefined.

@jitvar.patil any ideas?
I’m using “@cometchat-pro/react-native-chat”: “2.1.6” and “@cometchat-pro/react-native-calls”: “1.0.3”

Hello @Laurence,

The getAudioOutputModes() was added in the version 2.3.1-beta1. You can refer to the change log here.

The latest version of @cometchat-pro/react-native-chat is 2.3.1 & @cometchat-pro/react-native-calls is 2.0.3-beta1.

Please update to the latest version and your issue should be resolved.

Warm Regards,

CometChat Pro
Mayur Bhandari

Thank you! I’m going to update.

@mayur.bhandari

I updated the dependencies (@cometchat-pro/react-native-chat & @cometchat-pro/react-native-calls) and installed react-native-async-storage/async-storage and I get this error:

The following build commands failed:
	CompileC /Users/admin/Library/Developer/Xcode/DerivedData/microsaludmobile-dozgkgywtybiyrbkmfrzwsdejece/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-cometchat-rtc.build/Objects-normal/x86_64/CometChatRTCViewManager.o /Users/admin/projects/tfm/microsalud-mobile/node_modules/@cometchat-pro/react-native-calls/ios/CometChatRTCViewManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
	CompileSwift normal x86_64 /Users/admin/projects/tfm/microsalud-mobile/node_modules/lottie-react-native/src/ios/LottieReactNative/AnimationViewManagerModule.swift
	CompileSwift normal x86_64 /Users/admin/projects/tfm/microsalud-mobile/node_modules/lottie-react-native/src/ios/LottieReactNative/ContainerView.swift
(3 failures)

I’m using Mac OS, and I’m trying to run on iOS.