Friday, July 28, 2017

How to play video in your ASPX, HTML websites

Recall a situation you would want to play a video file on your ASPX or HTML websites. It seems a rare task for some developers and a  difficult task in the beginning simply because there is no any User Control yet available to perform this task. 
However I will want you to consider this as one of the simplest tasks in web developments. It is as simple as playing video files on your desktop applications. This is independent of the language being used to developed the website. 
Though there might be numbers of ways this could be performed by developers out there, however we would be looking into two generic ways this could be done using HTML 5 codes.
First:
 <object  height="320"  width="240" type="video/x-ms-wmv">
               <param  name="src" value="photo/konfam.wmv" />
            </object>
In the above codes, video player is declare as an object with height 320px (you are free to modify the size), width is set to 240 while the type of the object is specified to be Video of wmv extension.
Your video is not yet set to play for you have declare its source which was done in the Param tag set the name of the tag to 'src' while its value is set to the web address (url) of the video you are intending to play.
You can also use HTML 5 tag specifying your video web address to be played as data in the object tag while type is set to video as shown below. The html 5 tag is as shown below.
 <object data="videourl.avi" type="video/avi" />
 You can simply copy and paste the tags with little edit on the data supplied in the tags.



Share post with family and friends

Trending now

Part A: WORKING WITH CONTAINERS USER CONTOLS IN ASPX WEB PROJECT

ASPX is blessed with a very large number of user controls that developers can mix to design a user-friendly web application interface...

Follow by Email

Most Read Posts