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
@@ -144,7 +144,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
})
VoiceRecorder.requestAudioRecordingPermission();
//this.loadFiles();
}
@@ -289,6 +289,7 @@ export class GroupMessagesPage implements OnInit, 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()){
+2 -1
View File
@@ -159,7 +159,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
})
VoiceRecorder.requestAudioRecordingPermission();
this.getChatMembers();
}
@@ -222,6 +222,7 @@ export class MessagesPage implements OnInit, 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()){