SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    London
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Valid xhtml music player...

    Hi there,

    Putting together a releases section for a record label, so there's I have hundreds of 45 sec samples of tracks to go on over 20 pages... At the moment I'm just linking to mp3s, I'm trying to keep my code xhtml strict valid...

    I just want utmost simplicity, play and stop, and to be ultra easy to update. Been searching all over but everything seems over complicated for what I require. I found this from a post on this forum

    http://www.elizabethcastro.com/html6...edmp3-new.html

    This is exactly what I would like, but wondering if anyone could point me in the direction of a tutorial on what I need to put in my own flash file to be able to do this? Or even better still a .fla I can customise myself!

    Thanks in advance

    Pat

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Not sure what you are asking for. If you want links links like the ones on that page, you could just use that code and insert your own file in place of their file:

    Code:
    <p>My MP3 
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"  codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="74" height="16">
        <param name="src" value="MyFile.mp3" /> 
        <param name="controller" value="true" /> 
        <param name="autoplay" value="false" />
    
        
    <!--[if !IE]>-->
    <object type="audio/mpeg" 
            data="MyFile.mp3" 
            width="49" height="16">
            <param name="autoplay" value="false" />
            <param name="controller" value="true" />
            
            </object>
    <!--<![endif]-->
        </object> </p>

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,868
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    You might need to get rid of the <p> tag around the object.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    London
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies...

    Sorry if I wasn't clear, I know I can use that same code in my pages but just change urls to point to my mp3s, but wanted to customize the player or play button itself. But I've just realised it's not a swf and some quick time plugin from the apple site!

    So basically I'd like to be able to do exactly as in the example but with a swf - using the same single swf for each play button but loading different mp3s externally through code in the html...

    Can anyone point to a tutorial that can show exactly this, rather than the full multi track xml player tutorials that come up when I do searches on this?

    Cheers

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    London
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Through more searching, I only just found that just using the embed tag alone could do it! no flash required

    Code:
    <ul>
         <li>
        <embed src="istock.wav" width=25 height=25 autostart=false repeat=true loop=true> </embed>Track 1</li>
        <li>Track 2</li>
        <li>Track 3</li>
        <li>Track 4</li>
        <li>Track 5</li>
        <li>Track 6</li>
    </ul>
    But this doesn't validate! ALso not customizable...

    Any ideas?

  6. #6
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    London
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Been frantically searching everywhere but nothing I try is an xhtml valid solution, it's driving me mad...had no idea embedding mp3s had so many complications!!!

    Found this,
    http://www.sean-o.com/jquery/jmp3/

    ...the top one is pretty much all I need... But the fla is waaaaaay complicated to customize as it's all done dynamically, and even then can only change background or foreground colours..

    Anyone?

  7. #7
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use the (X)HTML5 <audio> tag. It has a DOM API so you can roll your own controls. It works in Firefox 3.5, Chrome 3 and Safari (not yet in Opera or IE). Firefox supports Ogg Vorbis, Safari supports whatever QuickTime supports and Chrome supports both Ogg Vorbis and MP3 (I think). I think all three support WAVE, too.
    Simon Pieters

  8. #8
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    London
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Zcorpan

    Thanks for that, but the fact that it doesn't work in IE makes it a no go for me unfortunately :-(

    I've found a couple of solutions in flash, I'm having problems with the actionscript of one of them so started a new thread http://www.sitepoint.com/forums/showthread.php?t=638550 in the flash and actionscript forum...

    Thanks for your help


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •