1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

playing an MP3 on the forum

Discussion in 'XenForo Questions and Support' started by AndreaMarucci, Mar 22, 2012.

  1. AndreaMarucci

    AndreaMarucci Well-Known Member

    I've an MP3 file I would like to attach to a post and let all other users to hear it. Is it possible to do that?
  2. Kent

    Kent Active Member

    You could use a standard flash-based MP3 player, or use HTML5 audio to play it.
    Not all browsers support MP3 with the audio element out of copyright concerns, though, so you'd have to convert it to OGG.

    One way you could do this is with a BB Code Media Site.
    Media Site ID: html5audio (or just "audio")
    Embed HTML:
    <audio src="{$id}" controls>HTML5 Audio not supported</audio>
    Then use it like so:
    You may also want to show the file path and link to it, so users can see what it is before playing it.
  3. AndreaMarucci

    AndreaMarucci Well-Known Member

    Sorry but I've not understood what I've to do...

    appeared like

  4. AndreaMarucci

    AndreaMarucci Well-Known Member

    Created but there's something I've done incorrectly. If you can tell me what to put where I'll be grateful..
  5. Kent

    Kent Active Member

    It seems XenForo transforms URLs on its own (wraps URL tags around it), even when using the BB Code editor. Quick work-around:
    <audio src="http://yoursite.com/media/{$id}" controls>HTML5 Audio not supported</audio>
    Then use:
  6. kyrgyz

    kyrgyz Well-Known Member

    Kent likes this.

Share This Page