i am building a web application with angular, i want when a user tries to upload any video, it will only upload the first 2 minutes of the video file, and not the whole video file, but i dont know how to do it with angular, i have searched online but i cant find anything useful,
Here's my code
<input type="file" #fileInput name="videoFile" (change)="onSelectedFile($event)"/>
onSelectedFile(event){
this.selectedFile = <File>event.target.files[0]
this.preview(this.selectedFile)
var reader = new FileReader();
reader.readAsDataURL(this.selectedFile);
reader.onload = (_event) => {
this.video = reader.result
this.http.post(this.url, ...)
}
}
pls how can i only upload only the first 2 minutes of the uploaded video