Automatically stop audio player after 10 seconds

Discussion in 'PHP' started by kelkadir, Sep 2, 2010.

  1. #1
    Hello to all,

    Can anyone please assist in the following?:
    I have an embed code that needs to play only the first 10 seconds of an mp3 or audio file
    <EMBED
    SRC="clip.mp3"
    WIDTH=144 HEIGHT=60
    STARTTIME="00:00"
    ENDTIME="00:10"
    >

    Unfortunately all the MP3 is getting streamed and the STARTTIME and ENDTIME work on Netscape only

    Is there any way to stop an audio file from streaming after a number of seconds?

    If there is a way to crop the mp3 during the upload process, I would appreciate your help in this direction

    Thanks

    Simon
     
    Last edited: Sep 2, 2010
    kelkadir, Sep 2, 2010 IP
  2. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    maybe start it with JS, then setTimeout 10000 to innerHTML it to =""
     
    krsix, Sep 2, 2010 IP
  3. kelkadir

    kelkadir Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Could you or anyone please indicate how I could do that
    I am not that good in javascript
    What about the loading time of the page? is it included in the setTimeout 10000? or will the count down start after the page has loaded?

    Thank you!
    Simon
     
    Last edited: Sep 2, 2010
    kelkadir, Sep 2, 2010 IP
  4. kelkadir

    kelkadir Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    To anyone who's been stormed by the same issue, I got a practical solution by implementing the JW Player.
     
    kelkadir, Sep 3, 2010 IP