kevinresol / react-native-sound-recorder

Simplest Sound Recorder for React Native
MIT License
119 stars 36 forks source link

did you have exemple for “Options”?? #52

Closed ibingdian closed 3 years ago

ibingdian commented 3 years ago

did you have exemple for “Options”??


Options: iOS:

quality:Enum (Check out the constants prefixed with "QUALITY") format:Enum (Check out the constants prefixed with "FORMAT") bitRate:Int, default: not set (will fail on iPhone5 if set) channels:Int (1 or 2), default: 1 sampleRate:Int default: 16000 Android:

source:Enum (Check out the constants prefixed with "SOURCE") format:Enum (Check out the constants prefixed with "FORMAT") encoder:Enum (Check out the constants prefixed with "ENCODER_") channels:Int (1 or 2), default: 1 encodingBitRate:Int, default: 64000 sampleRate:Int default: 16000 Note that the above enums are platform-specific.

kevinresol commented 3 years ago

https://github.com/kevinresol/react-native-sound-recorder/pull/51#issuecomment-765059092

rasheedk commented 3 years ago
 SoundRecorder.start(
        SoundRecorder.PATH_CACHE + '/' + fileName + '.mp4',
        {
          quality: SoundRecorder.QUALITY_MAX,
          format : SoundRecorder.FORMAT_AAC_ADTS,

        }
      ).then(function () {
        console.log('started recording');

      });