mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
save
This commit is contained in:
@@ -83,6 +83,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
LoadedDocument: any = null;
|
||||
|
||||
recording = false;
|
||||
allowTyping = true;
|
||||
storedFileNames = [];
|
||||
lastAudioRecorded = '';
|
||||
durationDisplay = '';
|
||||
@@ -162,14 +163,14 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
onStart: ev => {
|
||||
Haptics.impact({ style: ImpactStyle.Light })
|
||||
this.startRecording();
|
||||
this.calculateDuration();
|
||||
//this.calculateDuration();
|
||||
},
|
||||
onEnd: ev => {
|
||||
Haptics.impact({ style: ImpactStyle.Light })
|
||||
this.stopRecording();
|
||||
setTimeout(() => {
|
||||
/* setTimeout(() => {
|
||||
this.loadFiles();
|
||||
}, 500);
|
||||
}, 500); */
|
||||
}
|
||||
}, true);
|
||||
longpress.enable();
|
||||
@@ -210,9 +211,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
this.recording = true;
|
||||
VoiceRecorder.startRecording();
|
||||
this.calculateDuration();
|
||||
}
|
||||
|
||||
stopRecording() {
|
||||
this.allowTyping = false;
|
||||
console.log('Stop');
|
||||
if (!this.recording) {
|
||||
return;
|
||||
@@ -232,6 +235,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
})
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.loadFiles();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
async deleteRecording(fileName){
|
||||
@@ -239,6 +245,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
directory: Directory.Data,
|
||||
path: fileName
|
||||
});
|
||||
this.allowTyping = true;
|
||||
this.lastAudioRecorded = '';
|
||||
this.loadFiles();
|
||||
}
|
||||
@@ -421,11 +428,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
"type": "audio/aac",
|
||||
"guid": '',
|
||||
/* "guid": '', */
|
||||
},
|
||||
attachments: [{
|
||||
"title": fileName ,
|
||||
"title_link": audioRef,
|
||||
"title_link": base64Response.url,
|
||||
"title_link_download": true,
|
||||
"type": "file"
|
||||
}],
|
||||
|
||||
Reference in New Issue
Block a user