mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add generate string method
This commit is contained in:
@@ -763,7 +763,10 @@ export class NewPublicationPage implements OnInit {
|
||||
path: '',
|
||||
});
|
||||
|
||||
this.videoconvertService.convertVideo(fullPath,directory.uri,'mp4');
|
||||
const stringGerada = this.gerarStringAleatoria();
|
||||
console.log(stringGerada);
|
||||
|
||||
this.videoconvertService.convertVideo(fullPath,directory.uri,stringGerada,'mp4');
|
||||
|
||||
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
|
||||
|
||||
@@ -814,6 +817,18 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
gerarStringAleatoria() {
|
||||
const caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
let stringAleatoria = '';
|
||||
|
||||
for (let i = 0; i < 4; i++) {
|
||||
const indiceAleatorio = Math.floor(Math.random() * caracteres.length);
|
||||
stringAleatoria += caracteres.charAt(indiceAleatorio);
|
||||
}
|
||||
|
||||
return stringAleatoria;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user