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

Embed or Object tags for media players, what are the problems?

You often see advice on embedding sites start with something like, "unfortunately the embed tag was never really accepted into HTML...bla bla bla." So they give you the object code to wrap the embed code in.
I've got IE6 and never have a problem with the simple embed tag for all video and audio players --but since  I can't test on IE7 I'm wondering is there a problem with IE7 and the embed tag -- or any browsers for that matter. Can someone simplify this?
Actually it's the object tags that I can never get working.
0
fredshovel
Asked:
fredshovel
  • 7
  • 6
  • 2
2 Solutions
 
frindoCommented:
The <embed> tag is actually depreciated according to W3C so the object tag is the correct way to go if you want to follow web standards. People still use the <embed> tag to force mozilla browsers to work (they sometimes have problems with the object tag)
0
 
fredshovelAuthor Commented:
Thanks for your reply but this really doesn't answer the question, which was, "but since I can't test on IE7 I'm wondering is there a problem with IE7 and the embed tag -- or any browsers for that matter?"
I'd like to know if I continue to use only the embed tag are there any audiences that I can't reach -- and why would I use the object tag (especially when I can't get it working) if the embed tag works in all browsers?

Thanks

FredShovel
0
 
frindoCommented:
W3C's goal tends to be to reduce the number of single function tags (like embed) and replace them with multi-purpose ones (like object). With <object> you can embed, pdfs, html files, and a variety of other file types while embed severely limits your options.

In terms of your own use, you should switch to object tags if you can because Microsoft officially ended support for the embed tag in IE 5.5 (http://support.microsoft.com/kb/303401) and despite the fact that as of now it currently works in IE7, sometimes it will prompt extra installs and there is no guarantee that it will work in future versions.

As a rule, you should try to stick to current standards as browser developers follow them, although at a delayed rate, and will eventually disabled depreciated features. (if not for awhile)
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
fredshovelAuthor Commented:
Thanks Frindo for that. Do you happen to know the correct object tags for the following.
At the moment I'm using:
WMP
<embed src="movie.wmv" width="480" height="375" CONTROLLER=true></embed>
For Flash I'm using:
<embed width="448" height="361" type="application/x-shockwave-flash" wmode="transparent"
src="http://MYSITE/misc/flvplayer.swf?file=http://MYSITE/video/test.flv"></embed>
AND FOR QUICKTIME'S MP3 player I'm using:
<embed src="http://MYSITE/audio/song1.mp3" width="300" height="42" ></embed>

Cheers



0
 
SheharyaarSaahilCommented:
see the second method here
http://www.streamalot.com/wm-embed.shtml
0
 
fredshovelAuthor Commented:
Thanks, but what's this supposed to mean?
<SELECT id=cancion onchange=document.all.music.filename=document.all.cancion.value; size=1 name=Music>
0
 
SheharyaarSaahilCommented:
try with second one please;
0
 
fredshovelAuthor Commented:
Well I tried with the correct URLs -- tried with wmv and asf files -- just get a broken link.
Have you tried this code?
0
 
SheharyaarSaahilCommented:
got it working like this;

<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="videofilename.wmv">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer"
WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>


*replace videofilename.wmv with your own wmv file name*
0
 
fredshovelAuthor Commented:
Thanks SheharyaarSaahil, this works.  Obviously it's the EMBED tag wrapped in an OBJECT wrapper -- and I just put the media in the same directory as the pages.  Can you explain why some code has to reference the URL and some just picks up the file in the main directory?
One thing: I think it may be somehting to do with my local PC but I have to click on the play button TWICE or it won't work. Is this the same for you at this site? http://www.wendyandthewalrus.onestop.net/page10.htm

Also do you have the object code for flash. I'm already uploading the JW player and linking to it as per the code in my previous post.
0
 
SheharyaarSaahilCommented:
>> Can you explain why some code has to reference the URL
where?

>> I have to click on the play button TWICE or it won't work
that's the issue with IE7 where you have to click an embedded object to activate it

>> Also do you have the object code for flash
http://www.adobe.com/devnet/activecontent/articles/devletter.html
0
 
fredshovelAuthor Commented:
I had several comments here, but I've just realised that when you assign points that your comments get deleted. Now I know why so many people don't tell us how they solved their problems -- because they get deleted and they can't be bothered posting them again.

Anyway thanks guys, I'm a bit wiser now.

Cheers.
0
 
SheharyaarSaahilCommented:
no fred, it doesn't happen, all the comments remain intact whether the question is closed or not;
i can see all the comments still here, can't you?
0
 
fredshovelAuthor Commented:
No I mean I made another rather lengthy post at the end -- then assigned points and hit 'submit' -- and the post got deleted -- so I suppose you're supposed to do it seperately.
0
 
SheharyaarSaahilCommented:
yeah, posting comment is different than assigning points, so you have to post the comment either before or after assiging points :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 7
  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now