2 Ways to Play Your Audio on Google Sites

by on December 23, 2010

Google Sites is a great solution for teacher and student web pages.  However, for all that you can do on Google Sites, embedding an audio player so you can play an audio file that you created is not straightforward.

I decided to write this after seeing this on my Twitter stream yesterday:

On #GoogleSites with my kids right now... any way they can upload an audio file to the site?? #edtech #edchat #Google @Google ??
@cspiezio
Christina Spiezio

Method 1–Not easy, but you learn a lot!

Twitter is a great medium, but sometimes you have to interpret the tweet.  Although it seems like we just want to know how to upload, I assumed (maybe incorrectly) that not only did they want to upload but be able to play the file as well.  If uploading is all that needs to be accomplished, then Google Sites allows you to make a file cabinet page for just this purpose.  For a good explanation, watch:

Create a file cabinet page in Google Sites

Now, your file is now on your Google Site but how in the heck can you embed the mp3 on another page so it plays.  There are a few ways to do this, but I’m going to stick with a Google solution.

Google Reader has a player of its own.  If you use Google Reader and subscribe to a feed that has audio content, then you probably have noticed that the audio player is embedded right in the feed.  We’re going to use that to play audio in Google Sites.

Here is the HTML code you will need.  If you’re thinking that you don’t know HTML and this isn’t for you, it is just a copy and paste solution–no knowledge is needed:

<embed src="http://www.google.com/reader/ui/3523697345-audio-player.swf" flashvars="audioUrl=http://www.example.com/song.mp3" width="400" height="27" quality="best" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>

If this copy and paste doesn’t work, go here and it should work fine.

All you need to do is copy and paste the above code into Google Sites.  The text in red will need to be replaced with your own mp3 file.  You can leave the width alone or change it.

While in your Google Site, click on Edit Page and then click on HTML Copy and paste the above embed code.

Now, we need to replace the red URL with the address of your uploaded MP3.  For now, go ahead and click on update and save and you will see the audio player appear.

Navigate your way to your file cabinet page and right click on the “download” link and copy the link address:

Now, navigate back to the page with your embedded audio player, go to edit mode, click on the player, click properties and paste the URL.

Now here is the slightly tricky part.  The player is expecting an mp3 file but the pasted URL is not an mp3 file.  Fix that easily by appending  &type=.mp3 to the end of the URL.

Click on OK and Save and you’re done.  It should now play!

You can go to my test site and see the end result here.

You don’t necessarily have to use Google Sites to host your mp3 file.  You can use Google Docs, Dropbox, SugarSync, etc to host the file.  The important part is adding the &type=.mp3 to the end of the URL.  In addition, instead of using the Google Reader player, you could opt to insert a Google gadget into your site.  The procedure is the same!

Method 2–Easy and Free

Method 2 is by far the easiest and I have mentioned it before.  Use the great file sharing site DivShare.  DivShare allows you to upload all types of files and then creates the embed code for you!  The free account gives you 5 GB of storage and paid versions are quite reasonable.  Most users will be able to get by with the free version.

Here’s an example that I have embedded here which is the same if you use Google Sites.

In conclusion, the Divshare method is by far the fastest and easiest but involves a third party service.  Method 1 is far more difficult but you learn a lot about Google Sites, its capabilities and URL’s.

Hopefully, one of these methods will make embedding audio into your Google site a reality instead of a wish!

Related Posts Plugin for WordPress, Blogger...
  • http://twitter.com/19reka Reka-Zsuzsanna

    very helpful, thank you. Method No1 worked fine. I’d love to know if it’s possible to start the audio automatically… :)

    • Anonymous

      This will do the trick for autoplay–I just tested:

      To turn on the autoPlay function, add autoPlay=true to the MP3 file URL:
      flashvars=”audioUrl=http://www.example.com/song.mp3&autoPlay=true”

      So just add &autoPlay=true right after .mp3 and within the existing quotations

      Hope this helps!

  • Joe

    Wow! Thank you so much! Method 1 worked great!

  • Sean

    Hia,

    I have a number of Google Websites that need audio players.

    I have been using a ‘code wrapper’ to get Goggle to accept the audio player codes that I use.

    Unfortunately this does not work in Safari, Opera, Yahoo and now Chrome to!

    The Google MP3 player seems like the solution.

    I wonder if the player can be adapted to take a playlist? If yes, how?

    I have the MP3 files and the playlist already uploaded to my Sites.

    My Sites are:

    http://www.thewigorniastringquartet.com
    http://www.astariastringquartet.com

    Obviously the players only work in IE and Firefox.

    Can you help?

    My email is:

    seankgilde@hotmail.co.uk

    Many thanks.

    Sean

    • Anonymous

      I’ll see if I can look into it for you and I’ll let you know what I come up with!

  • reuben

    hi, thanks for this! it worked great for one page, but is there a way to have the music play continuously while the user is on the site? Is there also a way to start the mp3 at half the volume instead of full volume?
    thanks!

    • http://www.coachjeffreythomas.com Jeffrey Thomas

      Thanks–not sure offhand but I’ll take a quick look and see what I can find!

  • http://www.thewigorniastringquartet.com Sean Gilde

    Hia,

    I have mentioned my problems with getting an audio player onto Google Sites before. I have now started using Google Reader, (PS, for some reason Goggle Reader does work without having to add the ‘ &type=.mp3′ file extension to the audio files I insert into the Reader).

    This all seems to work fine, except in the Safari Browser. Google Reader, with or without the ‘ &type=.mp3′ bit, does not work.

    I have tried re. inserting the code using the Safari Browser, but as before, all I get is the outline of the Google Reader, but no ‘dials’ or anything. Needless to say, there is no audio.

    My question is: is this fixable, amendable or is there something I am doing wrong?

    Audio is very important to all of my Sites, as the product I sell is live sound (String Quartet) and the Audio is a sample of this. Audio not working in Safari, is a real problem for me, as I loose quote a lot of custom.

    Google Reader does work in Chrome, Firefox, Opera and IE.

    Any help greatly appreciated.

    Sean

    • http://www.coachjeffreythomas.com Jeffrey Thomas

      I took a look at one of your sites and see that you are using JWPlayer and that seems to be working ok. I think the main problem occurs when the mp3 is hosted by a site that does not give a direct link to the actual mp3 file. In other words the URL does not have a mp3 extension.

      Method 2 in my post mentioned Divshare as a place to host your mp3 files that also gives you a player but also allows you to use any player you want and use the direct mp3 link and this has worked well for me. Divshare has a free 5 GB plan but also has very reasonable paid plans. You can check it out at http://divshare.com

      Let me know if any of this helps or if I am misunderstanding your problem.

  • http://www.thesoloviolinist.com Sean Gilde

    Hia,

    Thanks so much for your reply.

    I do use the JWPlayer, which does work fine in Firefox, Opera and IE, but not in Safari, Yahoo or Chrome.

    This is why I have either changed all my audio players to Google Reader, or have given a link to the Google Reader (player) as this does work in Firefox, IE, Opera, Chrome and Yahoo.

    Unfortunately, Google Reader does not work in Safari at all. To see this problem you would have to view one of my Sites (see above) using the Safari Browser and looking at the Google Reader rather than the JWPlayer.

    I use Google Sites and host my MP3 files actually on the Sites themselves – in a place called ‘Attachments’. For the Google Reader, I then insert the URL where the MP3 file is stored – ie. in ‘Attachments’ and hey presto, it all works EXCEPT in Safari.

    So obviously the problem does not seem to be with the MP3 hosting.

    For Safari, I have tried your suggestion of adding the MP3 extension – still no luck.

    Also, in Safari, its not like the player appears but the sound is missing, no, the actual player itself does not show up, let alone the sound!

    I hope I have explained my problem better and would welcome any ideas.

    Many thanks.

    Sean

  • Callum

    Hi, I followed your instructions and the player shows up. But the file won’t play. Any suggestions?

    Callum

    • Anonymous

      I’ll look into it for you

  • Lmel

    can this work for .wav files too…if so..how?

  • mary

    Hi,
    I have my site on Google Sites. Haven’t manage to use the 1st method, so I created an account on DivShare. I uploaded an mp3 file and got an embed code of it, through I cannot use it on my Google Sites. Could you please explain how does it go?
    best,
    mary

  • Guest

    the Google Reader audio player does not work.

  • Who

    Ok your frist seemed like it’d be ok but the html coding is off because that frist method just doesn’t work i mean its awesome that u are posting this but the info has leaks like the player doesn’t show up when u save it’s just blank plz message me on wat needs to be done at Raver_Raven@yaho..com I look forward to hearing from u

  • Arihant

    HI Jeffery,

    I have been using google sites can you help me I need to play one music in all the pages, but the moment I go to other pages it stops music. It plays only in the page where I have created music icon,

  • bryzoned
  • donald cash

    I do not now I would like to now if someone can show me that will be helpful to me.

Previous post:

Next post: