Audio permition asked on statRecording method

This commit is contained in:
Eudes Inácio
2022-05-27 16:53:09 +01:00
parent ce7cee0876
commit 1294a6f82a
4 changed files with 8 additions and 4 deletions
@@ -157,7 +157,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.scrollToBottom();
this.getChatMembers();
VoiceRecorder.requestAudioRecordingPermission();
this.deleteRecording();
this.loadFiles();
}
@@ -287,6 +287,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
async startRecording() {
VoiceRecorder.requestAudioRecordingPermission();
if(await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) =>{return result.value})){
if(await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => {return result.value})){
//if(await this.hasAudioRecordingPermission()){