SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: HTML Help

  1. #1
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML Help

    hello
    i need help with this

    <p><embed width="128" height="128" src="http//:www. etc"></p>

    its a plug in using front page, it will be a link to some race car sounds i want on my web site BUT i only want it to play once per visitor?
    can you help?
    pete
    Last edited by ralph.m; Aug 7, 2013 at 01:58. Reason: removed email address

  2. #2
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried the html5 audio tag with autoplay?

  3. #3
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by truegether View Post
    Have you tried the html5 audio tag with autoplay?
    not sure what that is can someone just give me the html i need
    thanks

  4. #4
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,939
    Mentioned
    215 Post(s)
    Tagged
    12 Thread(s)
    Hi there,

    Could you provide the full embed code?

  5. #5
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <p>embed width="128" height="128" src="http://www.angelfire.com/ga2/petergiles/images/aston.mp3"></p>

  6. #6
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,939
    Mentioned
    215 Post(s)
    Tagged
    12 Thread(s)
    Try this:

    Code:
    <audio src="http://www.angelfire.com/ga2/petergiles/images/aston.mp3" autoplay>
      Your browser does not support the <code>audio</code> element.
    </audio>

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by talbotracer View Post
    <p>embed width="128" height="128" src="http://www.angelfire.com/ga2/petergiles/images/aston.mp3"></p>
    Doesn't that play just once anyway by default?

    Or did you mean you want to remember the visitor and then not play the sound again when they re-visit? (Would need cookies and a script).

  8. #8
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,939
    Mentioned
    215 Post(s)
    Tagged
    12 Thread(s)
    Quote Originally Posted by Paul O'B View Post
    Doesn't that play just once anyway by default?
    It does, but with player controls, which I had understood that the OP didn't want.

    It is also worth pointing out that not all browsers can play mp3 files (for example FireFox and Opera)

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Pullo View Post
    It does, but with player controls, which I had understood that the OP didn't want.
    Ah ok

    It is also worth pointing out that not all browsers can play mp3 files (for example FireFox and Opera)
    I know nothing about audio files but I notice that both the above methods play in Firefox but only the audio tag version doesn't play in Opera.

  10. #10
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,939
    Mentioned
    215 Post(s)
    Tagged
    12 Thread(s)
    Quote Originally Posted by Paul O'B View Post
    I know nothing about audio files but I notice that both the above methods play in Firefox but only the audio tag version doesn't play in Opera.
    Ah sorry, I meant the FF 3.5 branch.
    FF otherwise supports the mp3 format as of v21 (but on Windows only).

    I just double checked, it seems I was wrong about Opera:
    http://en.wikipedia.org/wiki/HTML5_A...d_audio_codecs

  11. #11
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B View Post
    Doesn't that play just once anyway by default?

    Or did you mean you want to remember the visitor and then not play the sound again when they re-visit? (Would need cookies and a script).
    what i want is for the sound to play when a visitor comes to the page, but as i have several pages on my site i do not want it to play again if they go back to the same page, after they go and if they come back it can play again


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
  •