Send and play audio message

This commit is contained in:
Gregoire Parant
2020-09-20 17:12:27 +02:00
parent 4c7e458e52
commit 45ad4bbb36
7 changed files with 117 additions and 24 deletions
+9
View File
@@ -199,6 +199,15 @@ export class Connection implements Connection {
});
}
public uploadAudio(file : any){
return Axios.post(`${API_URL}/upload-audio-message`, {file}).then((res: any) => {
return res.data;
}).catch((err) => {
console.error(err);
throw err;
});
}
public closeConnection(): void {
this.socket?.close();
}