I AM LISTENING TO
|
WAS ICH LIEBE
  • Englisch
  • Deutsch

Hosting MP3 files on Google Drive + HTML5 Audio Player

1. November 2021




Hosting MP3 files on Google Drive + HTML5 Audio Player

What Google Drive Sharing offers us!

I am doing a Podcast on portalZINE.TV since last year and always host a backup of the MP3 episodes on Google Drive.

The link that you create, when enabling file sharing on Google Drive, can not be used to actually embed it on your website.

The link looks something like that:

To actually use it directly, we need to get the ID. Sure, you  could just extract the ID, but often we just want to copy and paste. The sharing link is also your actual reference to the original file, which I store together with the podcast.

Apply a simple RegEX

We use a simple Regex to extract the ID:

PHP

JAVASCRIPT

Just use it!

This ID can than be used to embed the file directly using HTML5 audio controls.

Its important to use the „https://docs.google.com/uc?export=open&id=“ url to open the file, as it provides the direct access to the shared file




Abonnieren
Benachrichtige mich bei
guest
10 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Joe
Joe
7 Jahre zuvor

Hey, can you contact me about this. Im trying to make it work but its not working.

kamello
kamello
5 Jahre zuvor
Reply to  Joe

Thank you a lot!!! it’s what i’m looking for! Thanks again for sharing

Henrik Härkönen
Henrik Härkönen
5 Jahre zuvor

Thanks, this was brilliant!

gest
gest
5 Jahre zuvor

this doesn work more duh?

CuriousGuy
CuriousGuy
3 Jahre zuvor

Ok. I believe this doesn`t work anymore. Please can you update us? Sept 2020.

CuriousGuy
CuriousGuy
3 Jahre zuvor

I am sorry for not being specific. I mean this works for desktop applications. However if I try to enter a website from a smartphone this doesn`t work. I may have have been doing something wrong. If you have any thoughts on the matter, please let us be enlightened!




Alexander

Ich bin ein Full-Stack-Entwickler. Meine Expertise umfasst:

  • Server-, Netzwerk- und Hosting-Umgebungen
  • Datenmodellierung / Import / Export
  • Geschäftslogik
  • API Layer / Action Layer / MVC
  • Benutzeroberflächen
  • User Experience
  • Verständnis für Kundenwünsche und Geschäftsbedürfnisse

 

Ich liebe die Entwicklung, das Design und kenne mich auch mit Serverarchitekturen aus.  Ich würde mich nie vollständig fühlen, wenn einer der Bereiche fehlen würde.

Ich habe ein breites Interessengebiet, deshalb tauche ich ständig in neue Technologien ein und erweitere mein Wissen, wo immer es nötig ist. Die Technologien entwickeln sich schnell und ich genieße es, die neuesten Technologien zu nutzen.

Abgesehen davon bin ich ein friedliebender Kerl, der versucht, Leute um sich herum zu haben, die dasselbe denken.  Ich glaube wirklich an das Prinzip: "Wenn man jemandem hilft, wird einem jemand helfen, wenn man es braucht."

Previous Next