Total Pageviews

Sunday, August 12, 2018

Note to Self : How to embed audio files in your blog of Google Blogger

You can embed audio players on your blog and play audio files saved in your google drive by writing HTML5 tags as follows.

<audio  controls="true" preload="auto">
<source src=" ******** "></source>
Your browser doesn't support HTML5 audio.
</audio> 

"********" is the link to your shared audio file in your google drive. But you need some modification to the link.

Let's say you get a shared link of your audio file in your google drive as

”https://drive.google.com/open?id=1WBDHfjE1vyQZlGRAt8hIZFcQsDBRBUHb”.

You need to change "open" to "uc" as

”https://drive.google.com/uc?id=1WBDHfjE1vyQZlGRAt8hIZFcQsDBRBUHb”.

And then you copy it and paste into the HTML5 tags as follows.

<audio  controls="true" preload="auto">
<source src="https://drive.google.com/uc?id=1WBDHfjE1vyQZlGRAt8hIZFcQsDBRBUHb"></source>
Your browser doesn't support HTML5 audio.
</audio> 

You can hear a sound clip of Kookaburra.
(Please note that this shared file is a wav formatted file and Internet Explorer 11 doesn't support wav format. So you can not hear the sound on IE11.)




No comments: