Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Adding google's flash mp3 player


Go to End


7 Posts   12647 Views

Avatar
mrwindupbird

Community Member, 26 Posts

25 October 2009 at 12:16am

Trying to add google's flash mp3 player to a page. I created a php page type and created a layout for it. Here is the code in the layout file:

<iframe src="http://mail.google.com/mail/html/audio.swf?audioUrl=http://www.mrwindupbird.com/test.mp3" style="width: 500px; height: 250px; border: 1px solid #aaa;"></iframe>

So what's happening is that the player is loading but the file won't play. The file, as you can see if you copy/paste the mp3 url into a browser, clearly exists. Any ideas?

Alternatively, I'm not married to google's player. If you guys have any other suggestions as to mp3 players for SS, I'm all ears.

btw - any DJs out there, or general fans of electro, that test.mp3 is an epic Daft Punk/Beastie Boys/Capsule remix. Check it out and feel free to download. It's rrrrrrreally good.

Avatar
bummzack

Community Member, 904 Posts

25 October 2009 at 12:35am

Hi there. Nice remix ;)
Don't know where you got this URL for the audio-player from (mail.google.com)? This one seems to work:
http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://www.mrwindupbird.com/test.mp3

Found here: http://www.labnol.org/internet/design/html-embed-mp3-songs-podcasts-music-in-blogs-websites/2232/

Avatar
mrwindupbird

Community Member, 26 Posts

25 October 2009 at 2:22am

haha, I found my link from the same site - http://labnol.blogspot.com/2006/08/google-mp3-player-found-in-gmail.html

So now that I've got this player working great, any chance you know how to make it autoplay? With the following code:

-------------------------------------------------

<iframe src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://www.mrwindupbird.com/test.mp3&autoplay=true" style="width: 500px; height: 250px; border: 1px solid #aaa;"></iframe>

-------------------------------------------------

I get the following error:

-------------------------------------------------

XML Parsing Error: not well-formed
Location: http://mrwindupbird.com/music/?stage=Stage
Line Number 42, Column 128:<iframe src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://www.mrwindupbird.com/test.mp3&autoplay=true" style="width: 500px; height: 250px; border: 1px solid #aaa;"></iframe>
-------------------------------------------------------------------------------------------------------------------------------^

-------------------------------------------------

Avatar
bummzack

Community Member, 904 Posts

25 October 2009 at 3:09am

Ampersands always have to be html-entity encoded. Should be:
http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://www.mrwindupbird.com/test.mp3&amp;autoplay=true

Avatar
mrwindupbird

Community Member, 26 Posts

25 October 2009 at 3:27am

hmmmm, that fixed the error on the page, but it's still not autoplaying... Halfway there! :)

Avatar
bummzack

Community Member, 904 Posts

25 October 2009 at 6:20am

I think it should be autoPlay=true

Avatar
yakky

Community Member, 1 Post

16 April 2010 at 9:49am

Just got autoplay working in IE 7 and FF 3.6 with this code

<embed type="application/x-shockwave-flash" src="https://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=<%=_AudioURL %>&autoPlay=true" width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />

Note the <% %> code is ASP.NET and should be replaced with your audio file URL.