'getFIles' does not fire after audio record
Closed this issue · 0 comments
anki247 commented
Describe the bug
The event getFIles
does not fire after recording audio. Even cancel
event fires sometimes (mostly not). From 30 tries I saw once that getFiles
triggered with correct data which seem for me weird...
I also see that the recorded audio is saved in [Appfolder]/IQAudio
, but if there is no event I can not detect when I can look into this folder... :(
To Reproduce
- open app on real Device (for me it was iPad)
- call
openAudioPicker
withisCaptureMood: true
- record audio
- Done -> no event gets fired...
Expected behavior
getFiles
triggers with file info
NativeScript Info(please run tns info
):
- nativescript. Your current version is 5.3.4
- tns-core-modules. Your current version is 5.3.2
- tns-android. Your current version is 5.3.1
- tns-ios. Your current version is 5.3.1
Sample Code(please provide minimum code to reproduce problem):
const audioOption: AudioPickerOptions = {
android: {
isCaptureMood: true, // if true then voice recorder will open directly.
isNeedRecorder: true,
maxNumberFiles: 1,
isNeedFolderList: false,
},
ios: {
isCaptureMood: true, // if true then voice recorder will open directly.
maxNumberFiles: 1,
}
};
export const pickMusic = () => {
let mediaPicker = new Mediafilepicker();
mediaPicker.openAudioPicker(audioOption);
mediaPicker.on("getFiles", function (res) {
console.log('--> FILE ******************', res);
});
mediaPicker.on("error", function (res) {
console.log('--> Error: ', res);
});
mediaPicker.on("cancel", function (res) {
let msg = res.object.get('msg');
console.log('--> Cancel: ' , res);
});
}
Additional context
Log:
AVAudioSession.mm:249:HandleRouteChange: Posting AVAudioSessionRouteChangeNotification. Reason: 3
AVAudioSession.mm:249:HandleRouteChange: Posting AVAudioSessionRouteChangeNotification. Reason: 3
AVAudioSession.mm:2315:-[AVAudioSession privateInterruptionWithInfo:]: Posting AVAudioSessionInterruptionNotification (Begin Interruption). Was suspended:0