d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Html Question
Add Reply New Topic New Poll
Member
Posts: 1,781
Joined: Mar 16 2007
Gold: 0.00
Mar 3 2014 01:59pm
I was given a sample code and just had to fill in some pieces to make an audio file play on a webpage. My code looks like

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="song_name" type="application/x-shockwave-flash">
<param name="Deadly_Combo_-_07_-_Like_Dis" value="Deadly_Combo_-_07_-_Like_Dis.mp3"/>
<param name="autoplay" value ="true"/>
<!--[if !IE]>-->
<object type="audio/mpeg" data="Deadly_Combo_-_07_-_Like_Dis.mp3">
<param name="Deadly_Combo_-_07_-_Like_Dis" value="Deadly_Combo_-_07_-_Like_Dis.mp3"/>
<param name ="autoplay" value="true"/>
<!--<![endif]-->
</object>

In IE it loads my page with a white box at the bottom (i assume that is the player) but nothing actually happens. That box is no longer there in Firefox.

Im still new at this, is my mistake blatantly obvious?
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Mar 4 2014 06:31am
Code
<audio autoplay="autoplay" controls="controls">
<source src="mysong.mp3" />
</audio>

Member
Posts: 2,217
Joined: Sep 10 2007
Gold: 35.88
Mar 4 2014 12:26pm
you get a white box in IE because there is conditional code that only get's parsed in IE.
aside from that, the code is atrocious.
I'd consider html 5

This post was edited by grievance on Mar 4 2014 12:27pm
Member
Posts: 29,723
Joined: Jun 11 2007
Gold: 279.52
Mar 4 2014 12:56pm
Quote (Azrad @ Mar 4 2014 12:31pm)
Code
<audio autoplay="autoplay" controls="controls"> 
  <source src="mysong.mp3" /> 
</audio>

http://makeameme.org/media/templates/250/trollface.jpg


lol this
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll