datso / react-native-pjsip

A PJSIP module for React Native.
http://datso.github.io/react-native-pjsip
GNU General Public License v3.0
273 stars 233 forks source link

Change codec settings #44

Closed rcorrie closed 6 years ago

rcorrie commented 6 years ago

Added this method to the JS api:

// Not listed codecs are automatically will have zero priority
endpoint.changeCodecSettings({
  "PCMA/8000/1": 0,
  "G722/16000/1": 0,  // Zero means to disable the codec.
  "iLBC/8000/1": 210,
  "speex/8000/1": 0,
  "speex/16000/1": 0,
  "speex/32000/1": 0
})

NOTE: On android, if you enter a codec that cannot be found, the app just crashes. I would like to handle the error and pass it up to the JS side, but I still need to figure it out. @datso maybe you can enlighten me, I am new at native dev and appreciate the help.

resolves https://github.com/Carusto/react-native-pjsip/issues/39

rcorrie commented 6 years ago

@datso any plans on merging this one as well?

datso commented 6 years ago

Could you please fix the conflict ? It happens after the merge of the another one ? Thanks btw for the PR.

rcorrie commented 6 years ago

@datso done

datso commented 6 years ago

thanks, merged.