I'm using the following input code to allow mobile users to upload a video file into my webpage.
<input
type="file"
capture
id={'videoInput'}
accept="video/*"
onChange={handleChangeMediaFile}
/>
The only restriction I have is that the video should not be longer than 1 minute. I know that I can validate the video inside handleChangeMediaFile func and show a corresponding error to the user but that doesn't look like a very user-friendly solution to me.
Is it possible to split the video file that I receive in handleChangeMediaFile into multiple playable chunks and then upload them as separate videos?
If that's impossible, is there a way to automatically trim the video down to 60 seconds if it exceeds the limit?