We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24969
    • 120 Posts
    I am currently working of a spa site from a client. I have a request to put music playing on the site. While doing a check of the search engines all I can find is ones that instruct you how to place a media player on your page. I just need an invisible wav or mp3 player that will play a small sound clip. Any ideas how I can accomplish this with modx?

    admin: rewrote subject for those scanning topics
      The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.

      -Albert Einstein (1879 - 1955)

      Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
      • 25663 MODX Staff
      • 12,272 Posts
      I would start investigating options here: http://ajaxian.com/by/topic/sound
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Only Internet Explorer can play a sound internally, others need a plugin.

        A Google search on "play sound on web page" came up with a whole bunch of useful links to explain the situation and describe various methods.
        http://www.google.co.il/search?hl=en&q=play+sound+on+web+page&btnG=Google+Search&meta=&aq=o&oq=
          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
          • 24969
          • 120 Posts
          Thanks for this guys... Now lol how would you suggest I embed a music file into my modx installation?

          Exactly where in the source code for modx would it go?
            The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.

            -Albert Einstein (1879 - 1955)

            Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
            • 15083
            • 697 Posts
            If you open up your config.inc.php,
            remove the first 6 lines or so
            upload to your web server
            open your homepage....and press F5
            you might hear a sound?

            Joking of course smiley You want to play sound on a webpage, use flash. You are going to need to use a plugin to get to everyone....may as well be a plugin 99.9% of us already have.
              • 25663 MODX Staff
              • 12,272 Posts
              MODx just outputs what you put in the templates, chunks, snippets, etc. Just build the site and include it as you need. You don’t modify MODx.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 24969
                • 120 Posts
                oh... ok thanks
                  The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.

                  -Albert Einstein (1879 - 1955)

                  Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
                  • 3749
                  • 24,544 Posts
                  To give the user an option:
                  <a href="yourmidname.mid">Click here to play music </a>


                  To play automatically (with no option to turn it off):

                  <embed src="yourmusic.mid"> 
                  <noembed> <bgsound src="yourmusic.mid"> </noembed> 

                  To play with a small console that let’s the user turn it off:

                  <embed src="yourmusic.mid" 
                  width="140" height="40" autostart="false" loop="FALSE"> 
                  </embed>


                  I haven’t tested these. I think you want them in the <head> section of your template.

                  PS, I hate sites that autoplay music, but the client is always right. smiley
                    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