Jump to content

Embedding Music


Joe2209
 Share

Recommended Posts

I'm trying to embed music on a page, and I managed to discover the valid way of doing this, however, IE doesn't display the player - it just displays something that looks like a textarea. :/ Any ideas?Here's the HTML code I'm using to embed the music:

<object data="myfile.mp3" type="audio/wav" width="280" height="45" standby="Loading..." title="Testing">								 <param name="AutoStart" value="false" />								 <param name="AnimationAtStart" value="true" />								 <param name="EnableContextMenu" value="true" />								 <param name="FileName" value="myfile.mp3" />								 <param name="ShowAudioControls" value="true" />								 <param name="ShowPositionControls" value="true" />								 <param name="ShowStatusBar" value="true" />							  								 <param name="ShowControls" value="true" />								 <param name="xVolume" value="50" />									<object width="300" height="100" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading..." type="application/x-oleobject" title="Testing">									   <param name="AnimationAtStart" value="true" />									   <param name="AutoStart" value="false" />									   <param name="EnableContextMenu" value="true" />									   <param name="FileName" value="myfile.mp3" />									   <param name="ShowAudioControls" value="true" />									   <param name="ShowPositionControls" value="true" />									   <param name="ShowStatusBar" value="true" />									   <param name="ShowControls" value="true" />									   <param name="xVolume" value="50" />										  <strong>Your media player and/or the music file failed to load properly or to render the music file accordingly.</strong>									</object>							  </object>

It's standards-compliant, and it works beautifully in Firefox, but IE doesn't like it. :)Firefox:firefox.pngIE:internet_exploder.pngFrom now on, we're going to refer to "IE" or "Internet Explorer" as Internet Exploder - its new name. :)

Link to comment
Share on other sites

I'm trying to embed music on a page, and I managed to discover the valid way of doing this, however, IE doesn't display the player - it just displays something that looks like a textarea. :/ Any ideas?Here's the HTML code I'm using to embed the music:
<object data="myfile.mp3" type="audio/wav" width="280" height="45" standby="Loading..." title="Testing">								 <param name="AutoStart" value="false" />								 <param name="AnimationAtStart" value="true" />								 <param name="EnableContextMenu" value="true" />								 <param name="FileName" value="myfile.mp3" />								 <param name="ShowAudioControls" value="true" />								 <param name="ShowPositionControls" value="true" />								 <param name="ShowStatusBar" value="true" />							  								 <param name="ShowControls" value="true" />								 <param name="xVolume" value="50" />									<object width="300" height="100" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading..." type="application/x-oleobject" title="Testing">									   <param name="AnimationAtStart" value="true" />									   <param name="AutoStart" value="false" />									   <param name="EnableContextMenu" value="true" />									   <param name="FileName" value="myfile.mp3" />									   <param name="ShowAudioControls" value="true" />									   <param name="ShowPositionControls" value="true" />									   <param name="ShowStatusBar" value="true" />									   <param name="ShowControls" value="true" />									   <param name="xVolume" value="50" />										  <strong>Your media player and/or the music file failed to load properly or to render the music file accordingly.</strong>									</object>							  </object>

It's standards-compliant, and it works beautifully in Firefox, but IE doesn't like it. :)Firefox:firefox.pngIE:internet_exploder.pngFrom now on, we're going to refer to "IE" or "Internet Explorer" as Internet Exploder - its new name. :)

i know for a fact that this is Flash. Dude your on the wrong Forum. :)
Link to comment
Share on other sites

@RahXephon:This produces invalid markup, as you need to use EMBED tags.
Made this page ([removed]) using this guys flash player and have it valid XHTML strict. He uses JavaScript to display the flash player. My versions is a little dated though, he might have changed it since then. Edited by RahXephon
Link to comment
Share on other sites

I downloaded that player RahXephon recommended (you can get the player here)I just uploaded the important files to my server, then used the code below to show it:

<object id="flash_object" type="application/x-shockwave-flash" width="230" height="20" data="http://www.domain.com/mp3player.swf?file=http://www.domain.com/my_music_file.mp3">								 <param name="movie" value="http://www.domain.com/mp3player.swf?file=http://www.domain.com/my_music_file.mp3" />								 <param name="wmode" value="transparent" />							  </object>

All you do is upload the player files to your server, then put the code above in your page to display the player. Be sure to edit "domain.com" with your own domain, and include the correct URL to the MP3 file - that's it. :)

Link to comment
Share on other sites

  • 1 month later...
I downloaded that player RahXephon recommended (you can get the player here)I just uploaded the important files to my server, then used the code below to show it:
<object id="flash_object" type="application/x-shockwave-flash" width="230" height="20" data="http://www.domain.com/mp3player.swf?file=http://www.domain.com/my_music_file.mp3">								 <param name="movie" value="http://www.domain.com/mp3player.swf?file=http://www.domain.com/my_music_file.mp3" />								 <param name="wmode" value="transparent" />							  </object>

All you do is upload the player files to your server, then put the code above in your page to display the player. Be sure to edit "domain.com" with your own domain, and include the correct URL to the MP3 file - that's it. :)

Hmmm....so this actually makes a little player on your site. Is there a way to make it just onLoad? It seems to mess a bit with the animation that I have on the site...more importantly...is there a way to make it stay playing so that when a visitor goes to my next page, they don't have to restart?Thanks!http://www.ivyla.com/company.htmlhttp://www.ivyla.com/studio.html
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...