We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16680
    • 73 Posts
    Hi guys,

    It’s time for one of those big "DON’T DO IT MAAAN!"-questions again.

    So an ’acquaintance’ called me today and asked if I could do a website. Fair enough.

    But then he told me that it _needed_ to have some background music running on it. He had a composer working on the piece as we spoke.

    I of course tried explaining him the disadvantages of having auto playing utterly annoying background music on a site in 2010, but there was no stopping him.

    And then I thought about it. How would one really do this?

    I mean, I have always just resented the very thought of doing it and have never really tried it.

    As I see it the two best options available are:

    The Frameset Path

    The Ajax Path


    But which one is to prefer over the other? Yes I know that I can also <embed>/<link>/<param>/<onload> something together, but I generally try to make my sites validate and be available for other things than IE, so I will not even think about going down that road. Those tags, are like Mordor, bad things happen when you talk about them..

    Anyways, The Ajax Path seems to be the most appealing to me, (frames are oldschool), but then again I would also loose alot of the functionality a website normally offers. Linking, history etc.

    So what do you guys think? How would you implement music on a ModX site nowadays?

    Of course pop-up is also an option, but hey, we can do better right.. right?

    .cb
      Signature on it&#39;s way
      • 5340
      • 1,624 Posts
      I was asked to do the same but did not get to that part

      I think the best solution is to use a flash player and put a mute button somewhere in the page. If you want continuous music for an html website then I guess you have to use ajax or iframe or flash.

      I have a simple website so ajax for me. Might be harder for more complex websites. I’ll stay away from iframes and popups.

      I’d love to see other opinions.
        • 4041
        • 788 Posts
        Maybe mPlayer is worth a try:

        http://modxcms.com/extras/package/302
          xforum
          http://frsbuilders.net (under construction) forum for evolution
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Then there’s Flowplayer, my favorite... http://static.flowplayer.org/plugins/streaming/audio.html
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 16680
            • 73 Posts
            Hi cipa, Breezer and Sottwell,

            Thanks for the replies.

            cipa: I agreee, that is also the only options that I see

            Breezer, Sottwell: I know both mPlayer and Flowplayer, but that does not solve the problem of having continuous music playing on a website where users are navigating different pages etc. It’s not so much whether I should use mPlayer og Flowplayer or something else that I am looking for. I am asking how to best implement music, without it starting over every time a user clicks a link.
            And at the same time, how to implement it without loosing too much fucntionality such as linking, history etc.
              Signature on it&#39;s way
              • 3749
              • 24,544 Posts
              Maybe the client would go for an opt-in strategy where users click on a button to start the music. That’s often the only way to keep me from immediately fleeing from a site with music. wink

              Having music that continues when you switch pages could be done with JS, I think, but that’s even *more* annoying, IMO.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting