On page load, play mp3

Discussion in 'Web Design & Coding' started by sean.ferguson, Sep 7, 2004.

  1. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
    how do i get a php page to play a locally stored mp3 (/public_html/this.mp3) once the page has loaded? I would also need a start & stop button.. but rather than buttons just simple text links is what i want. The start button will only be used to restart the mp3 after you have already pressed the 'stop' button. If you get what i mean :p
    -----------------------
    [mp3] [start] [stop]
     
    SPeedY_B likes this.
  2. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Could be done with the <PARAM> and <OBJECT> HTML thingy, but don't ask me how... The buttons would require an ActiveX control thingy, but that would only work for IE, since only IE is the only browser supporting ActiveX
     
  3. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    The only way I could think to do it would be to call an external application such as Quicktime, Windows Media Player or even Real One player (not sure if that will handle mp3 when embedded?) then use the controls from that.
     
  4. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    I remember seeing a Dutch newssite, with video-popups, which had play/pause and stop buttons in imageform and they worked with my FireFox. But they now use a new system, which only uses the standard play controls from embedded WMP.
     
  5. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    why would you want to embed mp3 into a page? background music is intensley annoying from my perspective - I'd much rather have a link to said mp3 to download should I desire than have it forced upon me.

    if you're dead set on doing it though it might eb easier to put it into a flash thingie that has buttons to start/stop/rewind/fastforward/pause/play buttons on it

    you could move to more advanced things from there
     
  6. dreamliner77

    dreamliner77 The Analog Kid

    Messages:
    4,702
    Location:
    Red Sox Nation
    /me agrees is LordOfLA
     
  7. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    yeah I agree with LordOfLA as well, I like to browse with my own music not someone elses
     
  8. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    If i hear someone elses music the webpage gets closed faster tahn i can say "Crap"
     
  9. Lee

    Lee OSNN Proxy

    When I used to run a Cricket website I used to have as an intro 'Soul Limbo midi' a.k.a. the music the BBC used for Cricket.

    I got thousands of requests from non English/UK people for that midi.

    I know what you mean about music on sites it's annoying, the worst I came across was Mario brothers just playing continually, my daughter just kept it playing loudly during her puter hour and refused to turn down the sound, now that was annoying.