You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you very much for the good work you did here. Excellent library.
I use the library for 2 things:
1 - Extract background image from audio files.
2 - Check if mp4 file is video or audio.
I use the parseBlob function.
My user uploads a file, before I upload it, in the browser I check the file type according to its mimeType, and according to the file type I upload it to a different server, video to another server and audio to another server.
My problem is with video/mp4 type files that are sometimes only video and sometimes only audio.
I saw in the library that you can get details about video in the object trackInfo.video?: IVideoTrack but no matter what file, with or without video I don't get this information.
I would be happy to help.
The text was updated successfully, but these errors were encountered:
i mange to check if video/mp4 is video by this code:
functionisVideoFile(file: File): Promise<boolean>{returnnewPromise((resolve,reject)=>{constvideoElement=document.createElement('video');videoElement.preload='metadata';videoElement.onloadedmetadata=()=>{resolve(videoElement.videoHeight>0);};videoElement.onerror=()=>{reject(newError('Unable to determine if the file is a video.'));};videoElement.src=URL.createObjectURL(file);});}
Has the question been asked before?
Question
First of all, thank you very much for the good work you did here. Excellent library.
I use the library for 2 things:
1 - Extract background image from audio files.
2 - Check if mp4 file is video or audio.
I use the
parseBlob
function.My user uploads a file, before I upload it, in the browser I check the file type according to its mimeType, and according to the file type I upload it to a different server, video to another server and audio to another server.
My problem is with
video/mp4
type files that are sometimes only video and sometimes only audio.I saw in the library that you can get details about video in the object
trackInfo.video?: IVideoTrack
but no matter what file, with or without video I don't get this information.I would be happy to help.
The text was updated successfully, but these errors were encountered: