• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2659
  • Last Modified:

Embed Flash .flv file into html.

I've got an .flv video file named DD_master_v4_042409.flv

I can't seem to find an understandable example online of how I would embed this into an HTML page using an object tag.
0
josephdaviskcrm
Asked:
josephdaviskcrm
  • 5
  • 3
1 Solution
 
josephdaviskcrmAuthor Commented:
So I'm trying to make this as basic as possible.  I have built the html below, but it is not working.  Can you tell me what I'm missing.  That url that you provided isn't very clear to me.
<html>
  <head>
  </head>
  <body>
    <object data="DD_master_v4_042409.flv">
    </object>
  </body>
</hmtl>

Open in new window

0
 
blacksixCommented:
Here is a simple example:
<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="550" height="400">
</embed>
</object>

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
josephdaviskcrmAuthor Commented:
Per your example I made the following.  It still doesn't seem to work.  All I'm getting is a box on the page that looks like it is supposed to hold an image, but the image never loads.  Is it ok that I'm using an .flv file instead of a .swf file?

Also, the .flv file is a 40mb file.  will that have any impact on how it is loading?  I'm running this html page that I'm working on from my local machine.  There shouldn't be a download time issue.
<object width="550" height="400">
  <param name="movie" value="DD_master_v4_042409.flv">
  <embed src="DD_master_v4_042409.flv" width="550" height="400"></embed>
</object>

Open in new window

0
 
blacksixCommented:
Sorry, didn't have an flv handy to test with and wanted to keep the code very simple, but I was way off base.

Here's the solution,

Download a free flv player
http://www.longtailvideo.com/players/jw-flv-player/

extract the contents to the same directory as your html file

then just paste the code from below and change the part of the code below that says
<param name="flashvars" value="file=video.flv&image=preview.jpg" />

you can even save a jpg file as the preview image that you want to show up before they press play.
	<!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->
 
	<script type="text/javascript" src="swfobject.js"></script>
	<script type="text/javascript">
		swfobject.registerObject("player","9.0.98","expressInstall.swf");
	</script>
 
	<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200">
		<param name="movie" value="player.swf" />
		<param name="allowfullscreen" value="true" />
		<param name="allowscriptaccess" value="always" />
		<param name="flashvars" value="file=video.flv&image=preview.jpg" />
		<object type="application/x-shockwave-flash" data="player.swf" width="328" height="200">
			<param name="movie" value="player.swf" />
			<param name="allowfullscreen" value="true" />
			<param name="allowscriptaccess" value="always" />
			<param name="flashvars" value="file=video.flv&image=preview.jpg" />
			<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>
		</object>
	</object>
 
	<!-- END OF THE PLAYER EMBEDDING -->

Open in new window

0
 
josephdaviskcrmAuthor Commented:
This thing is producing a javascript error on the page.  It says 'swfobject is undefined'  Do you know how I can get rid of that?  It is even occuring on their readme.html page.  I don't want to release a page with a javascript error to our clients.
0
 
josephdaviskcrmAuthor Commented:
Ok... I got it figured out.  I just moved the script tags into the head of the document.  It works fine now.  Thanks.
0
 
blacksixCommented:
good, glad it is working out. =)
0
 
josephdaviskcrmAuthor Commented:
Sorry... I thought I had closed this the other day when I solved the issue.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now