mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
format video bug solved
This commit is contained in:
@@ -809,21 +809,35 @@ export class NewPublicationPage implements OnInit {
|
|||||||
path: '',
|
path: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
this.videoconvertService.convertVideo(fullPath,directory.uri,'mp4');
|
let fileObject ={};
|
||||||
|
this.videoconvertService.convertVideo(fullPath,directory.uri,'mp4').then(() => {
|
||||||
|
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
|
||||||
|
|
||||||
|
.then(async (content) => {
|
||||||
|
console.log(content.data)
|
||||||
|
this.filecontent = true;
|
||||||
|
fileObject = {
|
||||||
|
FileBase64: 'data:video/mp4;base64,' + content.data,
|
||||||
|
FileExtension: 'mp4',
|
||||||
|
OriginalFileName: 'video'
|
||||||
|
}
|
||||||
|
this.seletedContent.push(fileObject)
|
||||||
|
fileObject ={};
|
||||||
|
const deleteSecretFile = async () => {
|
||||||
|
await Filesystem.deleteFile({
|
||||||
|
path: 'output.mp4',
|
||||||
|
directory: Directory.Cache,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
deleteSecretFile().then((value) => {
|
||||||
|
console.log('delete file',value)
|
||||||
|
fileObject ={};
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((erro) => console.error('read converted video erro ', erro));
|
||||||
|
});
|
||||||
|
|
||||||
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
|
|
||||||
|
|
||||||
.then(async (content) => {
|
|
||||||
console.log(content.data)
|
|
||||||
this.filecontent = true;
|
|
||||||
let fileObject = {
|
|
||||||
FileBase64: 'data:video/mp4;base64,' + content.data,
|
|
||||||
FileExtension: 'mp4',
|
|
||||||
OriginalFileName: 'video'
|
|
||||||
}
|
|
||||||
this.seletedContent.push(fileObject)
|
|
||||||
})
|
|
||||||
.catch((erro) => console.error('read converted video erro ', erro));
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('record video ios erro, ', error)
|
console.log('record video ios erro, ', error)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user