<embed> HTML code equivalent.

Closed Forum
Locked
true411
Guest

<embed> HTML code equivalent.

Post by true411 »

I know embed works fine with Ie.
It does not with firefox cause it is not W3 protocols.

is there an equivalent.
I do not want to embed flash.
Or anything that the user hase to install plugin.

I am embeding a small 2meg audio recording in wav format.
I just want the person surfing to be able to click and hear it.

Simple, like it is with Ie.

thanks
User avatar
Orbite
Posts: 3757
Joined: November 4th, 2002, 8:23 pm
Contact:

Post by Orbite »

Code: Select all

<object type="audio/wav" width="100" height="50" data="file.wav">
  <param name="filename" value="file.wav">
  <param name="autostart" value="false">
  <param name="loop" value="false">
</object>


Notice that the referenced file must be inscribed twice: in the data and the filename parameter.

An interesting read : A List Apart: Bye Bye Embed explains how to embed other multimedia content (Quicktime and WMV) without using invalid markup.
Guest
Guest

Post by Guest »

Thanks, but my concern is that this embeded file is smack bang there waiting for the Surfer/Visitor to the page in IE. Problem that I am trying to get arround is that you must click and install a plugin. I am looking for something more seamless.

Surfer's can be click happy, and not want to bother and be turned away.
Or in many cases ignorant and not sure how or what it is all about, and veer(click) away in fright.

I know I suck for being such a stickler, but it is the issue I have, and I fear there is no true solution where Firefox is concerned.

I much rather have people use Firefox, and I do not want toadvertise that it is best viewed using IE. That would be a travesty.

Is there a way to make it as straight forward for the visitor in Firefox as it is in IE?
User avatar
Orbite
Posts: 3757
Joined: November 4th, 2002, 8:23 pm
Contact:

Post by Orbite »

The code I've shown you will trigger whatever plugin the visitor has already installed to handle wav files. It is exactly as straighforward as the <embed> tag and it doesn't take no more and no less than the <embed> tag to work.

For users too stupid or unwilling to install a single plugin, you could include a direct link to the audio file inside the <object> tag :

Code: Select all

<object type="audio/wav" width="100" height="50" data="file.wav">
  <param name="filename" value="file.wav">
  <param name="autostart" value="false">
  <param name="loop" value="false">

  <a href="file.wav">Download the audio file</a> or install the audio plugin of your choice to play it.

</object>


But, I think you are worrying too much. Users too lazy or unable to install a single audio pluging won't hear what other, concurent, web sites also have to offer. It won't disavantage you in particular.
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Post by trolly »

See here for a solution which works for both FF and IE (the post from Vectorspace):
http://forums.mozillazine.org/viewtopic.php?t=439880

Seems that IE does not know what to do with the data attribute.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
Guest
Guest

Post by Guest »

Thx

I read up on it :)
User avatar
Orbite
Posts: 3757
Joined: November 4th, 2002, 8:23 pm
Contact:

Post by Orbite »

trolly wrote:Seems that IE does not know what to do with the data attribute.


... And that's why the referenced file must be inscribed twice: in the data and the filename parameter. No need for IE conditional comment tags.
Locked