Page 1 of 1
embed video in website
Posted: Wed Jul 15, 2009 9:20 pm
by sobha
Hi,
Please tell me the best approach and source code to embed a avi and wmv video in my website using PHP or javascript.
Regards,
Sobha
Re: embed video in website
Posted: Wed Jul 15, 2009 11:37 pm
by iamngk
you have to convert .avi and .wmv video into flv format.(you can convert it through FFMpeg).
Then you can play those videoa through any flash vido player.
Re: embed video in website
Posted: Thu Jul 16, 2009 12:24 am
by sobha
Thanks for your reply.I converted my files to .flv format and tried the following code .But it is not working.Please help.
Code: Select all
<html><head><script type="text/javascript" src="swfobject.js"></script></head><body>
<p id="player"><a href="http://www.macromedia.com/go/getflashplayer">Get Flash</a> to see this player.</p>
<script type="text/javascript">
var so = new SWFObject('mediaplayer.swf','player','280','230','7');
so.addParam("allowfullscreen","true");
so.addVariable("file","LuanaNodaVideo.flv");
so.addVariable("height","230");
so.addVariable("width","280");
so.write('player');
</script></body>
</html>
Regards,
Sobha
Re: embed video in website
Posted: Thu Jul 16, 2009 1:43 am
by iamngk
is your falsh video player working good..? one more thing i noticed that your video1.html still use "LuanaNodaVideo.wmv" not "LuanaNodaVideo.flv".Also, that video file is not available in the folder.
in my system it does not show the flash player.. i tried with AC_RunActiveContent.js, please see video2.html in attachment.
i used my own video, player is comming in browser. but it is not playing the video. i hope there might be problem with your player please double check that.
Re: embed video in website
Posted: Thu Jul 16, 2009 2:37 am
by sobha
Thanks for your reply.As you told player is comming in browser. but it is not playing the video.Is it due to problem in mediaplayer.swf file.Do you have any other working codes?
Re: embed video in website
Posted: Thu Jul 16, 2009 3:38 am
by iamngk
yes it might be problem with mediaplayer.swf. are you sure with a input parameters to the player. are you sure "file" is parameter name? if that is correct, then problem with your player. try to use any other player(.swf) to play the video.
Re: embed video in website
Posted: Thu Jul 16, 2009 7:21 pm
by sobha
Hi,
Thanks for your reply.I made a slight modification in my code.Please check the video.html file in the attachment.Now this coding is working in my system .But it is not playing in the production system.Do i need to have any settings to be done in the server?
Regards,
Sobha
Re: embed video in website
Posted: Fri Jul 17, 2009 1:33 am
by iamngk
it is playing good in my system.. i hope that video.flv file might not uploaded properly in server.
check the file existence and file size in the server.
Re: embed video in website
Posted: Fri Jul 17, 2009 2:04 am
by sobha
Hi,
Thanks for your reply.That file is playing properly in server also when i directly double click that video.html file.But not playing when run through
http://localhost/video/video.html.
The image and player is displayed.But the video is not playing.Is it something related to IIS?
please help.
Regards,
Sobha