Unverified Commit f4118b63 authored by Djorkaeff Alexandre's avatar Djorkaeff Alexandre Committed by GitHub
Browse files

[REGRESSION] Audio Recording (#2240)


Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>
parent c1f3f89c
......@@ -94,9 +94,6 @@ export default class extends React.PureComponent {
if (!didSucceed) {
return onFinish && onFinish(didSucceed);
}
if (isAndroid) {
filePath = filePath.startsWith('file://') ? filePath : `file://${ filePath }`;
}
const fileInfo = {
name: this.name,
mime: 'audio/aac',
......@@ -111,8 +108,9 @@ export default class extends React.PureComponent {
finishAudioMessage = async() => {
try {
this.recording = false;
const filePath = await AudioRecorder.stopRecording();
let filePath = await AudioRecorder.stopRecording();
if (isAndroid) {
filePath = filePath.startsWith('file://') ? filePath : `file://${ filePath }`;
const data = await FileSystem.getInfoAsync(decodeURIComponent(filePath), { size: true });
this.finishRecording(true, filePath, data.size);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment