mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -300,15 +300,25 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
startRecording() {
|
async startRecording() {
|
||||||
console.log('Recording');
|
if(await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) =>{return result.value})){
|
||||||
|
if(await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => {return result.value})){
|
||||||
if (this.recording) {
|
//if(await this.hasAudioRecordingPermission()){
|
||||||
return;
|
if (this.recording) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.recording = true;
|
||||||
|
VoiceRecorder.startRecording();
|
||||||
|
this.calculateDuration();
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!');
|
||||||
}
|
}
|
||||||
this.recording = true;
|
|
||||||
VoiceRecorder.startRecording();
|
|
||||||
this.calculateDuration();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -237,17 +237,25 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
startRecording() {
|
async startRecording() {
|
||||||
console.log('Recording');
|
if(await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) =>{return result.value})){
|
||||||
|
if(await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => {return result.value})){
|
||||||
if (this.recording) {
|
//if(await this.hasAudioRecordingPermission()){
|
||||||
return;
|
if (this.recording) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.recording = true;
|
||||||
|
VoiceRecorder.startRecording();
|
||||||
|
this.calculateDuration();
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!');
|
||||||
}
|
}
|
||||||
this.recording = true;
|
|
||||||
VoiceRecorder.startRecording()
|
|
||||||
.then((result: GenericResponse) => console.log(result.value))
|
|
||||||
.catch(error => console.log(error));
|
|
||||||
this.calculateDuration();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stopRecording() {
|
stopRecording() {
|
||||||
|
|||||||
@@ -282,14 +282,25 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
startRecording() {
|
async startRecording() {
|
||||||
|
if(await VoiceRecorder.canDeviceVoiceRecord().then((result: GenericResponse) =>{return result.value})){
|
||||||
if (this.recording) {
|
if(await VoiceRecorder.requestAudioRecordingPermission().then((result: GenericResponse) => {return result.value})){
|
||||||
return;
|
//if(await this.hasAudioRecordingPermission()){
|
||||||
|
if (this.recording) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.recording = true;
|
||||||
|
VoiceRecorder.startRecording();
|
||||||
|
this.calculateDuration();
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.toastService._badRequest('Para gravar uma mensagem de voz, permita o acesso do Gabinete Digital ao seu microfone.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.toastService._badRequest('Este dispositivo não tem capacidade para gravação de áudio!');
|
||||||
}
|
}
|
||||||
this.recording = true;
|
|
||||||
VoiceRecorder.startRecording();
|
|
||||||
this.calculateDuration();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stopRecording() {
|
stopRecording() {
|
||||||
|
|||||||
Reference in New Issue
Block a user