Embed Only Audio from Youtube Videos on WebPages, Blog Posts
Using this simple trick, mainly an alteration in the Youtube embed code, you can embed only an audio player instead of the full video to play audio from any Youtube video. We have covered similar hacks to customize Youtube embed options and url hacks to generate youtube video thumbnails, screenshot earlier.
But I think this really an unique one. Because many time we don’t require the video. We just need to embed audio from a Youtube video. This was your the bandwidth is saved as the video frames are not loaded.
Alter Youtube Video Embed Code to Only Load Audio
Step 1 : Get the video embed code of a Youtube video.
Step 2 : Set the height attribute of the <embed src tag to 25px. See below.
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/t6NS9unm-OQ?fs=1&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/t6NS9unm-OQ?fs=1&hl=en_US&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="25"></embed></object>
Step 3 : Now, after setting it to 25px, simple embed the Youtube video code like you normally do in your website, blog posts etc. (See Preview of an Obama Speech Below)
Preview :
Step 4 : You can customize it more with these embed options.
Let us know in comments about this simple trick…
Also See : Prevent Your Video Removed by Youtube Copyright Issues
3 Responses »
George Perec : Thanks for your trick embed audio on sites, blogs. My correction: "allowfullscreen=false"
Jack : How do I embed this on to wordpress? via html?
Debajyoti Das : @Jack: use the embed code as shown... in the post
ยป Leave a Reply