Playing Videos On Website With HTML5 – FLV | MP4 | WMV

Playing videos on web pages is our discussion this time, where we will try to play files with flv, mp4, wmv, and other formats on web pages with the help of html5 and javascript plugins.

Playing videos on the website is sometimes difficult, but if you already know the right and powerful plugins then everything will feel easier.

Watching
Image By: waferboard

On this occasion tutorial-webdesign.com will try to play videos with video.js, Video.js is a javascript and css that can make our work easier, and already supports html5, even now video.js is called “HTML5 Video Player” although we can also call it “Flash video player”.

How to use it is quite easy, try following the steps below.

HTML
Create an html file with the name index.html, then between the head and /head write the following script


What you need to see there are two files, namely video-js.css and video.js, where both files are obtained from the official video.js website or the video.js github page

For the body, just write the following script

It can be seen that the script above uses the html5 tag, namely video and is added to the data-setup from video.js.

You can replace the following parts:

poster: (image that appears before the video is played).
Autoplay: true/false.
src: for PATH location and filename.
To make it easier we can also generate the desired code.