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
-
☆ 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=
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
-
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
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
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.