PDA

View Full Version : Embeding .FLV videos



Scottie
Jan 14th, 2009, 05:38 AM
I want to embed videos onto my site, I have several formats, .flv, .avi and .wmv I only have experiance in HTML (XHTML) and CSS, what the easyest way to embed them using these two.

I've seen a couple of tutorials showing the embed code but it doesn't seem to be working for me.
<embed src="http://www.leviathanguild.co.cc/videos/TheBlackHandPromo.flv"
height="200" width="144">

If you can advise on where I'm going wrong, what files would be better than flv, andanything else you think could help me I'll be eternaly greatful.

This is a link to my site in case your interested: http://www.leviathanguild.co.cc/home.php

_Aerospace_Eng_
Jan 14th, 2009, 05:47 AM
I think flv is the best format for the web. The code you are using isn't going to work. Do a google search for JW Media Player. The documentation, wizards, and media player on that site should be all you need.

BoldUlysses
Jan 14th, 2009, 05:50 AM
The preferred method of embedding videos is the <object> tag (http://www.w3schools.com/tags/tag_object.asp). This article (http://www.alistapart.com/articles/byebyeembed/) details using the tag to embed several popular formats. Beyond that, do a Google search for "embed videos using object tag" and it should return some quality hits.

gnomeontherun
Jan 14th, 2009, 11:35 AM
To clarify why FLV won't work: its a video file played by Flash. So it requires a flash player, like the one suggested by Aero which I also like, and that player has to load the FLV before it will play.

I also think flv is the best, the best quality and best chances of having the right plugins.

Also look at using SWFObject to embed your Flash player, but I think thats documented on JW Player.

Rik.Kendell
Jan 15th, 2009, 02:29 PM
Here's what I use:


<div id="videoContent"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>

<script type="text/javascript" src="scripts/swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("flash/player.swf","ply","360","308","8","#ffffff");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars","file=ukVideoSm.flv&image=images/imgPreview1.jpg");
<!-- s1.addParam("menu", "false"); -->
s1.write("videoContent");
</script>


where ukVideoSm.flv is (obviously) .FLV and player.swf is the swf in which it, well, plays. It names the div (videoContent) in which it plays, so positioning is easy. You'll need swfobject.js which is easy enough, and it's much easier to play with than the code that Adobe Flash generates.

imgPreview1.jpg is the preview image - leave this out and the screen will be black until you press play.

I hope this helps!
Rik

Scottie
Jan 27th, 2009, 08:49 PM
Thx for your answers gays and gals, I think Aero's answer is the easyest so I've gone with that, using the JW Media Player.