Get video duration when input a video file avi , wmv

I get video duration file in the following way:

 let video = document.createElement('video');

                    video.preload = 'metadata';
                    video.src = URL.createObjectURL(item);
let time = video.duration;

This works with formats: mov, mkv, mp4
but how can you get the duration of files in the format: avi, wmv?

I would be glad for any help!

14 thoughts on “Get video duration when input a video file avi , wmv”

Leave a Comment