Page 1 of 1

MP3 made simple

Posted: Sun Nov 06, 2011 4:52 pm
by Rolf
Create an UDT called 'mp3' with the content:

Code: Select all

echo '<embed type="application/x-shockwave-flash" flashvars="audioUrl=' . ($params[file]) . ' "src="http://www.google.com/reader/ui/3523697345-audio-player.swf" width="400" height="27" quality="best" style="z-index:0;" wmode="transparent"></embed>';
You call this UDT in a page like:

Code: Select all

{mp3 file="path/to/file.mp3"}
Or

Code: Select all

{mp3 file="http://www.buispost.eu/path/to/file.mp3"}
Example: http://historisch.zeijen.nu/radio-omroep-zeijen

Grtz. Rolf

Re: MP3 made simple

Posted: Mon Nov 28, 2011 7:55 pm
by micahgodbolt
Nice tip! Certainly a nice quick, light option for hosting mp3 files without installing some big module.

Re: MP3 made simple

Posted: Mon Dec 19, 2011 5:40 pm
by merrony
Thank you so much! None of the module-based players seem to work reliably (possibly due to postgresql) and this does the job quickly and easily.

Re: MP3 made simple

Posted: Mon Jan 23, 2012 5:04 am
by Kareng
I'm trying to use this solution to embed an audio player on my church's website. It's not working for me. I'm not a developer so please bear with me as I explain what's going on.

First some background: I successfully iframed a Google calendar onto one of our pages by going into CMS, opening the page, going to the HTML source editor and copying the iframe coding for the google calendar. It's working well: http://www.christchurchuccft.org/events.html

I assumed it would be similar for embedding the google reader audio player. I uploaded my audio files to Amazon S3, inserted the URLs into the code, opened our home page in the CMS, went to HTML source editor, copy and pasted the code, and hit "update." Alternatively I have also just turned off the wysiwyg editor and tried to paste the code there and "Submit." In every case, the code doesn't stay in the file after I save it. Nothing is embedded. When I go back into HTML source, the code I had copied and saved is gone.

What am I doing wrong? Is embedding of players somehow turned off for our pages, and how can I change that in the admin? (I didn't set up the site, but I have been poking around in it for a while.)

Here's the code I have been trying to paste:

<embed type=”application/x-shockwave-flash” src=”http://www.google.com/reader/ui/3523697 ... player.swf” flashvars=”audioUrl=http://praisebandaudiofiles.s3.amazonaw ... lyAway.mp3
” width=”400″ height=”27″ quality=”best”></embed>

Do I need to paste it elsewhere on the site, not directly into the page where I want the player to appear? Is there something wrong with my Amazon s3 setup perhaps? Sorry for all the dumb questions. :-) Thanks for any help.

Re: MP3 made simple

Posted: Mon Jan 23, 2012 8:03 am
by Rolf
Hi Kareng

Try to rename you sound file: I'llFlyAway.mp3 and remove the '
For example iwillflyaway.mp3

Hope this helps,

Rolf :)

Re: MP3 made simple

Posted: Mon Jan 23, 2012 8:04 pm
by Kareng
Thanks, I'll try that. I'm pretty sure I tried other files already that didn't have an apostrophe, but I'll definitely give it a try.

Re: MP3 made simple

Posted: Wed Mar 28, 2012 3:19 am
by fearmydesign
Thank you, this works perfect!
I have a question, is there a way to de-active some controlers to adjust for a smaller width? for example, I wanted to make the width only 150px for a small window, but I only want to show the 'Play' & 'Pause' buttons for example, is this possible? or is there a compressed version of the player?

For now I just placed it in the body of my content where the width is 600px so its look good.

Thank you

Re: MP3 made simple

Posted: Wed Mar 28, 2012 5:05 pm
by Rolf
@fearmydesign
I Googled this http://muzso.hu/2006/09/27/flashvars-fo ... gle-videos

grtz. Rolf