Embedding FLV Files into HTML
Nov
20
Written by:
11/20/2009 3:16 PM
Embedding FLV Files into HTML
There was a need this week to embed a FLV file into an HTML page and we had no experience in directly embedding this kind of content. I’ve embedded YouTube videos before into posts using Windows Live Writer or the embed code that YouTube provides. But actually hosting the file and finding the right embed for this kind of file and the server that is hosting the site was a challenge.
I found this great download that is super small and wraps the Adobe Media Player on the page using javascript. It is from longtailvideo.com and it’s called the JW FLV Media Player. After downloading the code, installing is just as simple as playing the contents of a folder on the server. The embed code is provided on the site:
<p id='preview'>The player will show in this paragraph</p>
<script type='text/javascript' src='swfobject.js'> </ script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=video.flv');
s1.write('preview');
</script>
You need to change the video.flv to the location and name of the video file you want to display. Also modify the location of the swfobject.js and the player.swf if they are not available in the same directory as the web page. There was an additional parameter I needed to change for this specific file and that was the stretching value. The exactfit value modified a flat and narrow video into a normal box video.
s1.addParam('flashvars','stretching=exactfit');
One final step allowed the FLV file to be recognized by Windows IIS. I found these instructions on It.Toolbox.com to add the .FLV Mime type to ISS. Once the Mime Type was added the file loaded perfectly and the player performed nicely for our organization. I don’t recommend hosting your own video files as the bandwidth and storage size are large. But if you need to host a few files locally, this is a very good solution.
17 comment(s) so far...
Re: Embedding FLV Files into HTML
Thanks for providing the embed code here. Embedding Flash video files within HTML codes really makes me to feel much excited. I will try it soon. Thanks for sharing such an interesting information here. Keep posting.
By david on
11/27/2009 3:08 AM
|
Embedding FLV Files into HTML
Hello!!I have two files, mymovie.FLV, and myplayer.SWF. Though it may be obvious, the FLV is the video file, and the SWF is the flash player. I've been having trouble figuring out the code to embed these two into HTML so that the FLV plays in the SWF player.....
By mountain tents on
11/28/2009 12:58 AM
|
Re: Embedding FLV Files into HTML
Really wonderful piece of information and I appreciate it that you shared something so useful with the readers of this blog.
By wristbands on
11/30/2009 7:09 AM
|
Re: Embedding FLV Files into HTML
Can't wait to try it out. Been looking for some help with this.
By Dan on
12/14/2009 1:24 PM
|
Re: Embedding FLV Files into HTML
It worked really well once we got the setting correct.
By Steve on
12/14/2009 1:34 PM
|
replica rolex watches
That is some informative stuff. Never knew that opinions could be this varied. Thanks for all the enthusiasm to offer such helpful information here.
By jinnie on
1/13/2010 7:46 AM
|
cash4laptops
Thank you for another insightful post! As a new prof-o-blogger, I find commenting tips helpful. It is sometimes hard to find the time to comment, but I fully intend to put your advice to the test this fall.Thanks!
By cash4laptops on
1/14/2010 1:46 AM
|
Re: Embedding FLV Files into HTML
I’m trying to add a flash player to my site. I’m self-taught, so i tend to intermingle different types of code. i’ve tried a few different versions of code for players, yours included, and I have the same problem every time, – I can’t hear any audio. Is there a common mistake I’m making that you can think of?
By rapid4me on
1/26/2010 2:06 AM
|
Re: Embedding FLV Files into HTML
How interesting, thanks alot for sharing the embedded code.
By Charleston on
2/23/2010 3:30 AM
|
Re: Embedding FLV Files into HTML
I have a small problem with JW FLV Media Player instead of showing me the image of the video while it is not playing it is showing me black. Will I need to place a .jpeg in front of the player or how?
By Cynthia on
3/30/2010 5:02 AM
|
Re: Embedding FLV Files into HTML
by Cynthia, I have tried this player on my site it is working great, you wouldn't have to put any jpeg image, the player is caching image and then placing it in its window.
By Frank on
5/30/2010 1:59 PM
|
Re: Embedding FLV Files into HTML
Thanks for the info, I have tried it and up until now there as been no problems.
By Laptops Wanted on
5/30/2010 2:57 PM
|
Re: Embedding FLV Files into HTML
Very good samlpe, I needed such one for my work. You released me from lot of headache, guy!
By Migrain on
7/4/2010 3:53 AM
|
Re: Embedding FLV Files into HTML
It is really interesting Flv deliver video into flash.this code is so simple and easy to use after using this it properly work in my pc..is there any software also available for same??
By Venice Hotels on
8/5/2010 4:01 AM
|
Re: Embedding FLV Files into HTML
Many hosting companies will actually provide tools to do this. Unfortunately, Adobe doesn't do a very good job of getting the word out. I honestly believe that if Adobe were to create a viable resource page with solutions for various setups there would be a lot less of the "Death to Flash" sentiment.
By Cheap Hosting on
9/3/2010 5:54 PM
|
Re: Embedding FLV Files into HTML
Interesting.. will try FLV embedding now. Thanks for the share!
By Charleston on
2/17/2011 12:33 AM
|
Re: Embedding FLV Files into HTML
In the post has been define the HTML coding so that can be know and how to work and used in this coding so that can be able to understand and know that regarding post. Mostly are very like it .
By SEO on
12/21/2011 7:36 AM
|