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.

Hello @Laurence,

Can you please try running the following commands,

  1. cd ios
  2. pod deintegrate
  3. sudo gem install cocoapods-clean
  4. pod clean
  5. pod setup
  6. pod install

Warm Regards,

CometChat Pro
Mayur Bhandari

Hey @Laurence,

Hope this was helpful! Please try the steps mentioned above and let us know if you have any questions.
You can also write to us at help@cometchat.com for more help.

Regards,
Provesha

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