mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
video player add to web
This commit is contained in:
@@ -221,15 +221,15 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
/* this.convertVideoToBase64(data[0].fullPath) */
|
||||
this.fileType = "video/mp4"
|
||||
/* this.fileType = "video/mp4"
|
||||
await Filesystem.writeFile({
|
||||
path: data[0].name,
|
||||
data: data[0].fullPath,
|
||||
directory: FilesystemDirectory.Data,
|
||||
}).then(async (dir) => {
|
||||
console.log('DIR ', dir)
|
||||
const base64Video = await this.convertVideoToBase64(dir.uri);
|
||||
/* let resultUrl = decodeURIComponent(dir.uri);
|
||||
const base64Video = await this.convertVideoToBase64(dir.uri); */
|
||||
let resultUrl = decodeURIComponent('documents://' + data[0].fullPath);
|
||||
Filesystem.readFile({ path: resultUrl, encoding: Encoding.UTF8, })
|
||||
|
||||
.then(async (content) => {
|
||||
@@ -241,8 +241,8 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedVideo = "data:video/mp4;base64," + content.data;
|
||||
this.photoOrVideo = false;
|
||||
})
|
||||
.catch((err) => console.error(err)); */
|
||||
});
|
||||
.catch((err) => console.error(err));
|
||||
/* }); */
|
||||
|
||||
} catch (error) {
|
||||
console.log('record video error: ', error)
|
||||
|
||||
Reference in New Issue
Block a user