Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Thanked 0 Times in 0 Posts

    Question Create An Audio Player With External Play buttons To Trigger Different Audio


    I was searching for coders forums and after trying to register here realized i'm already a member :D

    I have a joomla 3.3.0 site with the Gantry Framework, default theme installed, I also installed AddFullAjax plugin.
    My top nav menu/sub-menu items load articles with ajax effect, so the whole site doesn't reload when you click on a menu item, just the articles.

    I found a html5 example sort of did what I'm trying to achieve,
    Basically the gantry framework have a drawer position, that's where my top nav menu is.
    And just over that drawer position is the Top A position, I loaded a custom html module in there.

    What I'm trying to do is, have a nice looking player sit up in the Top A position,
    Then in each article I'd have a play button, each play button links to a different audio file/mp3 (a shoutcast stream that i end with /;something.mp3)
    Example: http://radio1.mysite.ie:9000/;mellow.mp3

    So if you click on menu item 1, you would load article 1,
    The play button in article 1 will load whatever audio into the player.

    If you click on menu item 2, you would load article 2,
    And the play button in article 2 would load different audio into the player.

    Hope someone can advise, been up all night my head is wrecked

    Thank you

  2. #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Thanked 626 Times in 605 Posts
    if "audio" is the id of your audio tag,

    <a href="http://radio1.mysite.ie:9000/;mellow.mp3"
     onclick="audio.src=this.href; audio.play(); return false;">
      Play Audio for Article</a>
    Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com


Posting Permissions

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