react-native-sound-recorder icon indicating copy to clipboard operation
react-native-sound-recorder copied to clipboard

Constants are not present on the typescript type declarations

Open KecsetiIstvan opened this issue 3 years ago • 3 comments

Constants for the format, quality, source and encoder are not present on the type declaration, meaning, that using any of these options in a .ts file will result in an error message: Property 'CONSTANT_NAME_HERE' does not exist on type 'typeof import("react-native-sound-recorder")'

KecsetiIstvan avatar Jan 28 '22 10:01 KecsetiIstvan

Not only they are not declared, but I am starting to wonder if they actually work?

I am using the SoundRecorder.QUALITY_MAX, however the quality of the record is crazy low. I can barely hear anything when I replay it, whereas with react-native-audio the sound is crystal clear.

I really don't want to go back with react-native-audio for the reasons mentioned by this library, so I would like to understand if these constants being missing are a problem to the actual product?

pierroo avatar Feb 05 '22 15:02 pierroo

Not only they are not declared, but I am starting to wonder if they actually work?

I am using the SoundRecorder.QUALITY_MAX, however the quality of the record is crazy low. I can barely hear anything when I replay it, whereas with react-native-audio the sound is crystal clear.

I really don't want to go back with react-native-audio for the reasons mentioned by this library, so I would like to understand if these constants being missing are a problem to the actual product?

Missing declaration in typescript should not affect the functionality.

kevinresol avatar Feb 07 '22 06:02 kevinresol

Not only they are not declared, but I am starting to wonder if they actually work?

I am using the SoundRecorder.QUALITY_MAX, however the quality of the record is crazy low. I can barely hear anything when I replay it, whereas with react-native-audio the sound is crystal clear.

I really don't want to go back with react-native-audio for the reasons mentioned by this library, so I would like to understand if these constants being missing are a problem to the actual product?

They seems to work, I needed the encoder options and they are working just fine.

KecsetiIstvan avatar Feb 07 '22 09:02 KecsetiIstvan