If you read my personal blog (which a lot of you probably don’t even know exists) you’ll commonly see music embedded as mini-YouTube embeds. It turns out, the magic height is 25 pixels, and the magic width (for play/pause and mute) is 62 pixels.
However, it is kind of a burden to do this every time you want to embed a mini player (you have to edit at four fields in the HTML!) So to simplify this process, I, like any programmer before me, created a generator. Just type in the URL to the YouTube video and press make, and you’ll get a preview as well as the cross-browser HTML-esque mess of a code to embed.
Of course, if you’re truly lazy, just drag the bookmarklet below to your bookmark bar in your web browser, and click it on any YouTube video and you’ll be taken to the page with the code already generated.
xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type">class::Scrobbler by rel="cc:attributionURL" property="cc:attributionName" xmlns:cc="http://creativecommons.org/ns#">Navarr T. Barnier is licensed under a rel="license">Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Based on a work at xmlns:dc="http://purl.org/dc/elements/1.1/">gtaero.net. Permissions beyond the scope of this license may be available at rel="cc:morePermissions" xmlns:cc="http://creativecommons.org/ns#">mailto:[email protected].
Hi There... Your code works great.... Can you let me know how to add an option to start a playlist from the middle....I tried adding &start= and #t= parameters as mentioned in google site and it doesn't seem to be working for playlist...any advise will be really helpful...
I don't see any reason why it would be illegal, and timestamp parameters just won't work with a playlist. Thats a YouTube problem not specific to my script. Sorry.
Forgive me if I'm missing something here, but is it explained anywhere how to generate the grey, expandable audio player beneath the YouTube player? I also noticed in another post of yours that you had a light grey version of the YouTube player, but also didn't see an explanation of that. Is it as simple as replacing the image that's referenced in the tag, or is it more complex than that?
Ideally, I would like to use the expandable player, so if you can give some insight into that I'd appreciate it.
Forgive me if I'm missing something here, but is it explained anywhere how to generate the grey, expandable audio player beneath the YouTube player? I also noticed in another post of yours that you had a light grey version of the YouTube player, but also didn't see an explanation of that. Is it as simple as replacing the image that's referenced in the tag, or is it more complex than that?Ideally, I would like to use the expandable player, so if you can give some insight into that I'd appreciate it.
Is there any way to get this to work with the new iframe system youtube has implemented (html5)? i am hoping there is so it can be used with mobile devices as well as computers.
thanks! if you get a chance to answer please send me an email at [email protected]
Great code, but when I try and do this, the audio quality is noticeably worse on this mini player than the original YouTube video. Have you any idea why - and how to fix? I've tried appending &hd=1 and &ap=%2526fmt%3D18 and &ap=%2526fmt%3D22 but none of these supposed fixes work. Thanks in advance for help.
I've added an "Embed in High Definition" checkbox and from my testing it works just like on the YouTube video and embeds in 720p. I personally couldn't notice a difference in sound. ----- Navarr T. Barnier [email protected] http://navarr.me/
Your generator is smart and YouTube Audio Player is very usable.
Just 2 questions:
1. When you generate it from YouTube playlist, a Navbar (Previous and Next track) will be more than appreciated. It will be ideal. Don’t you intend to implement this?
2. Even if I select the checkbox “Embed in High Definition”, it plays music in the quality corresponding to 240p video. 360p or 480p quality music sounds much better.
Hi. I tried using this on my tumblr, but it didn't work as the width was perfect, but the height was the same. I basically got a long thin strip of youtube video.
I've been using your audio player for quite a while. Unfortunately, it seems as if it stopped working a few days ago? Is that possible? Possibly because of a change that YouTube made? Any help would be greatly appreciated.
Is it legal to play the you-tube playlists using this audio player in our own
ReplyDeletewebsite?
Hi There... Your code works great.... Can you let me know how to add an option to start
ReplyDeletea playlist from the middle....I tried adding &start= and #t= parameters as mentioned in google site and
it doesn't seem to be working for playlist...any advise will be really helpful...
I don't see any reason why it would be illegal, and timestamp parameters just
ReplyDeletewon't work with a playlist. Thats a YouTube problem not specific to my script. Sorry.
http://www.youtube.com/watch?v=_YtzsUdSC_I
ReplyDeleteTitle...
ReplyDeleteI saw this really great post
today. Thank you for that....
Useless unless you want to hear the same thing over and over
ReplyDeleteAnother Title...
ReplyDeleteI saw this really
good post today....
negotiating car price...
ReplyDeleteI like the
helpful info you provide in your articles....
Dear webmaster...
ReplyDeletethanks for the hard
work you do to keep this alive updated regularly....
this is the business, thanks so much!
ReplyDeletekem
wdkm.wordpress.com
Forgive me if I'm missing something here, but is it explained anywhere how to generate
ReplyDeletethe grey, expandable audio player beneath the YouTube player? I also noticed in another post of yours that
you had a light grey version of the YouTube player, but also didn't see an explanation of that. Is it as
simple as replacing the image that's referenced in the tag, or is it more complex than that?
Ideally,
I would like to use the expandable player, so if you can give some insight into that I'd appreciate it.
Forgive me if I'm missing something here, but is it explained anywhere how to generate
ReplyDeletethe grey, expandable audio player beneath the YouTube player? I also noticed in another post of yours that
you had a light grey version of the YouTube player, but also didn't see an explanation of that. Is it as
simple as replacing the image that's referenced in the tag, or is it more complex than that?Ideally, I would
like to use the expandable player, so if you can give some insight into that I'd appreciate it.
Please ignore/delete this post; I used the wrong email address
ReplyDeletethaimassage...
ReplyDelete[...]m My wife and i
felt really fulfilled that Chris managed to carry out his inv vi[...]...
Is there any way to get this to work with the new iframe system youtube has implemented
ReplyDelete(html5)? i am hoping there is so it can be used with mobile devices as well as computers.
thanks!
if you get a chance to answer please send me an email at [email protected]
Great code, but when I try and do this, the audio quality is noticeably worse on this
ReplyDeletemini player than the original YouTube video. Have you any idea why - and how to fix? I've tried appending
&hd=1 and &ap=%2526fmt%3D18 and &ap=%2526fmt%3D22 but none of these supposed fixes
work. Thanks in advance for help.
If you could include the sample ID so I can test I'd be more than happy to look at a
ReplyDeletefix.
-----
Navarr T. Barnier
[email protected]
http://navarr.me/
Thanks for the quick reply. The video I'm trying to embed is
ReplyDeletehttp://www.youtube.com/watch?v=swcULf1ATyU&hd=1.
I've added an "Embed in High Definition" checkbox and from my testing it works just
ReplyDeletelike on the YouTube video and embeds in 720p. I personally couldn't notice a difference in sound.
-----
Navarr
T. Barnier
[email protected]
http://navarr.me/
Hi Guys,
ReplyDeleteI played a bit with the HTML5-Stuff and created this:
[youtube
http://www.youtube.com/watch?v=VIDEO-ID?autoplay=1&loop=1&w=57&h=23]
You
need to replace the VIDEO-ID with the video-ID, for example with -t9yemi_K8c
This
creates a Play/Pause Button with the linked Video.
autoplay=1 activates the autostart
loop=1
activates the looping of the soundtrack.
I don't know why, but this doesn't work with
every video. You need to test it. If
http://www.youtube.com/embed/VIDEO-IDworks, this thing will
work.
Example on my Page:
jaybsound.de
Update:
ReplyDeleteYou need to add
html5=1
so that the
user is forced to use Youtube-HTML5
New Code:
[youtube
http://www.youtube.com/watch?v=-t9yemi_K8c?autoplay=1&loop=1&html5=1&w=57&h=23]
There is this HTML-Stuff added to my code...
ReplyDeletedelete the
"amp;"
after
the
&
then it will work...
Hi.
ReplyDeleteYour generator is smart and YouTube
Audio
Player is very usable.
Just 2 questions:
1.
When you generate it
from YouTube playlist, a
Navbar (Previous and Next track) will be more than
appreciated. It will be ideal. Don’t you intend
to implement this?
2.
Even if I select the
checkbox
“Embed in High Definition”, it plays music in the quality
corresponding to 240p video. 360p or
480p quality music sounds much better.
Thank
you in advance
BR
hi! the code works great via the desktop, but when you view the desktop version of the
ReplyDeletesite on a mobile device the player isnt visible. please help :)
http://blindat29.blogspot.com
[...] Source: http://tech.navarr.me/2009/10/youtube-mini-audio-player.html [...]
ReplyDeleteHi. I tried using this on my tumblr, but it didn't work as the width was perfect, but
ReplyDeletethe height was the same. I basically got a long thin strip of youtube video.
This normally means that your stylesheet (css) is overriding the height.
ReplyDeleteYou
may need to tweak your theme slightly.
Hi there,
ReplyDeleteI've been using your audio player for quite a while.
Unfortunately, it seems as if it stopped working a few days ago? Is that possible? Possibly because of a
change that YouTube made? Any help would be greatly appreciated.