Saturday, 02 February 2013 13:56

how to show video in web page

Written by 
Rate this item
(0 votes)

implementing video in asp.net or php pages is a great thing!.
there are a lot of players are available in web to show
video free.

flv or mp4 video formats are very fast and cheap in size.
so showing video in these formats is cool.

following are codes to show how one can run flv and mp4 videos in
their websites using jwplayer - http://www.longtailvideo.com/players/

first download the player from the above address and add all files in your
website root.

in head section of the page -

<script src="/Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script type="text/javascript" src="/jwplayer.js"></script>

<script type="text/javascript">

$(document).ready(function () {

$('#button_click').click(function () {
jwplayer("container_click").setup({
flashplayer: "player.swf",
file: "SC_Video_950px.mp4",
height: 370,
width: 680,autostart: true,
});
});

});

</script>


in body of the page -

Call the player on button click -
<div id="button_click" style="font-weight:bold; color:Blue;">
Click me to run video</div><br />
<div id="container_click">player shown here..</div>

I hope it helped you very much.don't forget to give a +1 for
that page in google search.

Read 3433 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest discussions

  • No posts to display.