Streaming Google Drive MP3s on WordPress

Here is how to stream MP3s from Google Drive on a free WordPress blog:

  1. Make sure the file, or folder it’s in, is set so “anyone on the internet can find and view” it. To do this, go to the “Share” option and click on “Advanced” at the bottom right. Make sure that the option selected is “Public on the web – Anyone on the Internet”.
  2. Get a shareable link. This will be a drive.google.com link. For example,
    https://drive.google.com/open?id=0ByZwfjn5SAsTOGNiY3ZvV3k4b3M
  3. Copy the ID. In the example above it’s 0ByZwfjn5SAsTOGNiY3ZvV3k4b3M.
  4. Use this ID to construct a docs.google.com link like this:
    https://docs.google.com/uc?authuser=0&id=0ByZwfjn5SAsTOGNiY3ZvV3k4b3M
  5. Add &type=.mp3 to the end of the link:
    https://docs.google.com/uc?authuser=0&id=0ByZwfjn5SAsTOGNiY3ZvV3k4b3M&type=.mp3
  6. Insert the link into an audio tag:
    [audio src="https://docs.google.com/uc?authuser=0&id=0ByZwfjn5SAsTOGNiY3ZvV3k4b3M&type=.mp3" /]
  7. Paste the audio tag into your blog post.

And hey presto! You’ve got audio streaming on your blog from MP3s on Google Drive.

Advertisements

5 thoughts on “Streaming Google Drive MP3s on WordPress

    1. I just tried it again and it still works. Does the audio player appear on your blog? If what you pasted into WordPress looks something like this: [audio src="https://docs.google.com/uc?authuser=0&id=0ByZwfjn5SAsTOGNiY3ZvV3k4b3M&type=.mp3" /] and it still doesn’t work, I’d guess there’s some permissions setting in Google Drive that’s preventing it.

      Liked by 1 person

  1. Hi, thanks for the perfect solution. it is working for me perfectly fine.
    1- I noticed that if i removed this part authuser=0& it still works. is this good or bad?
    2- In addition to the player, i want to enable downloading the file via a link. when I add <a href..etc to the code, it opens another window showing another player. I forced the mp3 files to be download, not open, via .htaccess rule. however, the rule does not affect this link. if I have a hosted mp3 file, it forced the dowload, but for the mp3 files done using this method, the browser opens them. is there a way to force download the files used in this method?thanks a lot.

    Like

    1. Sorry, I don’t know the answer. It would have to be some setting in Google Drive. Your own .htaccess file won’t have any effect on files hosted on GD. I had a quick look but didn’t see any option along those lines.

      I don’t think the “authuser” part is important.

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s