Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Embed object

Reply
Thread Tools

Embed object

 
 
jamiefmackay@hotmail.com
Guest
Posts: n/a
 
      03-14-2008
I have a web page that has a FLV file embedded in it, However the
video is not running.

It runs on a WIndows 2003 server, the IIS MIME type for .flv is set to
flv-application/octet-stream

Can FLV files be displayed on their own or do they have to be embedded
in an SWF file, SWF files are running okay on the page. Is my HTML
embed type correct, any other suggestions?

The HTML object code is below...

<object codebase="http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=9,0,0,0" title="<%#
Container.AttachmentText
%>" VIEWASTEXT>
<param name=movie value="<%# Container.AttachmentUrl %>">
<param name="quality" value="high">
<param name="bgcolor" value="#000000">
<param name="wmode" value="opaque" />
<embed src="<%# Container.AttachmentUrl %>" quality=high bgcolor=white
width="560" wmode="opaque" height="420" type="application/x-shockwave-
flash" pluginspage="http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash" title="<%#
Container.AttachmentText %>"></embed>
<noembed><%#Container.AttachmentText %></noembed>
</object>
 
Reply With Quote
 
 
 
 
cwdjrxyz
Guest
Posts: n/a
 
      03-15-2008
On Mar 14, 11:59 am, (E-Mail Removed) wrote:
> I have a web page that has a FLV file embedded in it, However the
> video is not running.
>
> It runs on a WIndows 2003 server, the IIS MIME type for .flv is set to
> flv-application/octet-stream


I use a Unix-Linux-Apache server. The mime type associated with the
extension .flv is video/x-flv. Many servers will already have this
mime type associated with .flv, since flash video is so often used.

> Can FLV files be displayed on their own or do they have to be embedded
> in an SWF file, SWF files are running okay on the page. Is my HTML
> embed type correct, any other suggestions?


There is, and never has been an official W3C embed tag. Embed is a
relic of the browser war era, and I believe was started by Netscape.
IE soon supported it, at least part of the time. One can avoid using
embed using proper modern object code.

> The HTML object code is below...
>
> <object codebase="http://download.macromedia.com/pub/shockwave/cabs/
> flash/swflash.cab#version=9,0,0,0" title="<%#
> Container.AttachmentText
> %>" VIEWASTEXT>
> <param name=movie value="<%# Container.AttachmentUrl %>">
> <param name="quality" value="high">
> <param name="bgcolor" value="#000000">
> <param name="wmode" value="opaque" />
> <embed src="<%# Container.AttachmentUrl %>" quality=high bgcolor=white
> width="560" wmode="opaque" height="420" type="application/x-shockwave-
> flash" pluginspage="http://www.macromedia.com/shockwave/download/
> index.cgi?P1_Prod_Version=ShockwaveFlash" title="<%#
> Container.AttachmentText %>"></embed>
> <noembed><%#Container.AttachmentText %></noembed>
> </object>


Forget the above code.

A modern flash movie is created in a flash encoder. There are pay
programs for less than $US 50 for encoding if one does not need all of
or can not afford the official flash suite. Use of an external .flv
flash video file along with a swf container file (can adjust size, use
various control bars, use large start buttons, add text etc) allows
much better control of the video and higher resolution than the old
fashioned .swf-only flash videos of the past. Ideally, one needs a
high resolution video file such as a vob or megpeg2 video file as
input for the encoder. However some encoders will allow you to use a
lone flv file as input, although this is not ideal as it may lower
resolution somewhat for the conditions for encoding selected. After
one encodes the video, you get a .flv flash video file and a .swf
container file as outputs. The .swf file automatically links to
the .flv file if you put both in the same directory on the server or
locally on the computer. Perhaps an example will help.

Go to my page at http://www.cwdjr.net/flash/Fatty.php to see an
example. Since php is used, go to http://www.cwdjr.net/flash/Fatty.txt
to view the code. The mime include at the top of the page is used to
serve the page as xhtml 1.1 when safe and as html 4.1 strict when not.
I suggest you replace the mime include with the usual start for an
html 4.01 page and not attempt to serve as xhtml 1.1 unless you have a
server set up to serve proper xhtml, which few people have. If you use
xhtml 4.01 strict, you should change all of the <blah /> xhtml self-
closed notation to the usual <blah> notation, but the page may still
work if you do not do so.

If one has a long flash movie and uses only a proper standard object
or invalid embed, it will not start playing on IE until it is
completely downloaded, which may take a long time. This can be
overcome by using a very short flash movie that plays before the main
movie. However, IE likes an ActiveX object, and most other modern
browsers can not use an ActiveX object as delivered. One can use
Microsoft conditional comments to route to the ActiveX object for
IE(and slight modifications thereof such as ATT/Yahoo DSL browser) and
to an ordinary object for other browsers. You will see this in the
txt. file I mentioned above. Note that the .flv is not even mentioned
in the code. When the computer starts to download the page from the
server, the .swf container file has an internal link to start
downloading the .flv to the temporary cache of the browser. If the
connection is fast enough for the video used, streaming of the video
can be started very soon before the .flv is completely downloaded.

If one has only an isolated .flv, this is only a video without a
player. There are players, such as one called FLV player and plugins
for some players that will allow playing of an isolated .flv. There
are also programs and plugins for players that will allow one to
capture an isolated .flv from a flv/swf video, and these capture it
from the temporary cache of the browser. To capture the video as
intended, one would have to capture both the .flv and swf that goes
with it. But this is not very practical for many commercial sites,
because the .swf container file often has links back to the video site
that may change and will not work offline.

The .flv in my example, which the .swf file automatically links to and
starts downloading to the temporary cache, is at http://www.cwdjr.net/flash/Fatty.flv
.. If you go there, it can be downloaded and played if you have a
player that will play an isolated flv. In this case you will have
quite a wait unless you have very high speed DSL, because the flv for
this nearly 5 minute video is about 21 MB, and usually the isolated
flv can not play until it is completely downloaded.

You could put an isolated flv up on a server for people to download
and play if they have a player for an isolated flv, but many may not
care to wait for a complete download if the flv file is large.

 
Reply With Quote
 
 
 
 
Travis Newbury
Guest
Posts: n/a
 
      03-15-2008
On Mar 14, 12:59 pm, (E-Mail Removed) wrote:
> I have a web page that has a FLV file embedded in it, However the
> video is not running.


FLV needs a Flash object to run. They do nothing by themselves.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
object to object -- embed instead code_wrong HTML 4 05-23-2006 10:05 PM
Object/Embed Helper Control? andchoi@gmail.com ASP .Net 0 11-21-2005 03:31 PM
<APPLET> or <OBJECT>/<EMBED>? Andrew Thompson Java 0 09-30-2005 02:46 AM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
embed element/object =?Utf-8?B?UmljaGFyZCBSb2NoZQ==?= ASP .Net 1 12-18-2004 04:13 PM



Advertisments