Yesterday I received an email from her, which includes a query, “how can we include the different formats of same video file to play it in different browsers”.
We all know that all browsers do not support same media formats of videos. So it’s a best practice to include different formats of videos to play it in different kind of browsers and devices. The browser will detect the supported format automatically and play that video file.
As per that post, videos were declared in an array to play them in a loop using HTML5.
var videoSource = new Array();
So now the question is, how can we include the other formats for the same video? If we declare the array like below, will it work? Continue reading