the YouTube
Audio Player that should make it a little better.
Firstly, I’ve given you the
ability to allow YouTube to set cookies. I’m not sure why anyone would be interested in doing this for a
Music player, but its there. I guess the primary reason I set this is because youtube-nocookie wasn’t
working properly the other day, as I soon found out from a comment on my blog. So if it isn’t showing up,
you should allow YouTube to collect cookies.
The second, and by far the more important
change is embedding the link (in the event that neither the object nor the embed shows) in a <noembed>
tag. I’m not quite sure how I didn’t know about the existence of this tag, but I’ve gone ahead and
programmed it in properly, which should get rid of the annoying duplication some users have been seeing on
any players generated from this point forward.
And one last change I made while working
on this blog post, I created an API! So now you can generate them on the fly if you want to and get just
the HTML for the player. I’ll document the API below:
http://www.gtaero.net/ytmusic/?api=1
- &q=
- The URL to the YouTube Video or Playlist
- &a=1
- Only Add if you want the music to AutoPlay
- &loop=1
- Only Add if you want the music to Loop
- &js=1
- Only Add if you want to be able to use the
JavaScript API with it
- Only Add if you want to be able to use the
- &s=on
- Add if you want to enable the Progress Bar on the video.
- &psize=
This is the progress bar size, acceptable variables are below- s –
Small, This will set the width of the video to 150px - m – Medium, This will
set the width of the video to 187px - l – Large, This will set the width of
the video to 224px - &tc =1
- Only
Add if you also want to show a timecode. Only works with progress bar. Changes the follow sizes to the
corresponding pixels: - s – 225px
- m – 262px
- l – 299px
- Only
- s –
- &invis=1
- Add if you want to make the player
invisible. Note: People hate this.
- Add if you want to make the player
- &html5=1
- Add if you want to use YouTube’s HTML5 player. You shouldn’t use this. Its VERY buggy.
- &cookie=1
- Add if you’re okay with YouTube
setting cookies on the user’s computer.
- Add if you’re okay with YouTube
And
that’s all! Enjoy!
the part for the progress bar did not work for me, its alway ignored
ReplyDelete@ab35f1c654d01628dcb1e3a19b3866d2:disqus: My documentation is incorrect. It should be
ReplyDelete&s=on.
when I pasted my youtube playlist url into your"YouTube Audio Player" form the player
ReplyDeletecan't work, how to fix this?
The Playlist Support doesn't appear to work...
ReplyDelete[...] Youtube Audio Player na web: YouTube Audio Player « Navarr’s
ReplyDeleteTech Side Vai surgir um grande amor na sua vida? Descubra que dizem as cartas adn.cartas-de-tarot.com –
ver A YouTube Audio Player For TumblrTumblring— URL To Video: [ test] Tiny (Not Compatible with
Progress Bar) Progress Bar www.gtaero.net/ytmusic – ver Harpa Crista O Bondoso Salvador Audio mp3
legenda no Player … YouTube Audio Player. While I was procrastinating on my essay for GSW, I–ve
made a couple slight changes to the YouTube Audio Player that should make it a little better.
tech.navarr.me/2011/04/youtube-audio-player.html – ver [...]
Hi Navarr, looks like YT changed the embed code and the crop of the embedded object
ReplyDeleteain't working anymore... I'm researching a solution and am subscribing to this post case you happen to find
it first :)
Looks like they changed to the new player even through embed. There must be a way to
ReplyDeleteembed the older flash player, but I'm not sure what it is. :
It is possible to crop the iframe (http://stackoverflow.com/a/5676721/1287812), but
ReplyDeletethis solution will require putting an image on top to start playing through Javaspcript... BUT, I just saw
in the new embed code: version=3
If we put ?version=2&ETC, it works!
Thanks! I've made the change :3
ReplyDeleteI see that you put version=1... yep, gotta be better this way... I'm updating
ReplyDeleteAudio-Tube as well, cheers :o[)
You might be interested to know that you can specify &theme=light or &theme=dark
ReplyDelete;)
I added it to my page. I really need to do a graphical design to that page and
rewrite the PHP.
You don't have my plugin installed, do you? Light and dark are in the option page ;p
ReplyDeletehttp://wordpress.org/extend/plugins/audio-tube/screenshots/
As you can probably tell, I don't wordpress much. :p So no. But if I start a music blog
ReplyDeleteor my personal blog back up I'll be sure to! :)
Rewrote the generator into a PHP class today. You might like it. Its up on github.
ReplyDeleteFork it and pull req any good changes, okay~? ;)
https://github.com/navarr/ytaudio
(Its
also fully XHTML compatible now.)
Copy that. Will revisit the plugin soon and implement. Cheers! ¡o)
ReplyDeleteThank you SO MUCH for this. I was ready to tear my hair out when Youtube's latest
ReplyDeletechanges broke all my progress-bar-only embeds (again!); I am incredibly glad to have found your Youtube
Audio Player. This will make it SO much easier to fix everything. Thanks. :)
Hey Navarr, could you update the bookmarklet on navarr.me/ytaudio to use 'ytaudio'
ReplyDeleteinstead of the old 'ytmusic'? Also could you just try it out generally for yourself ..on my end it kinda
stopped
working some months ago.
anyways, thanks for the cool low-CPU-usage
alternative!
I've updated the bookmarklet and it all seems to work!
ReplyDeleteIt's nice! :-)
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAudio Equipment Kits: This incorporates the rental of audio gear and open recipient sound frameworks. Stage equipment and lighting in Orlando at americanaudiovisual.com
ReplyDeleteThey can likewise save money on space, infrastructural costs, and interest in new advances and preparing programs. Spanish audio transcription
ReplyDeleteI enjoy it for creating the details, keep up the truly amazing perform continuing
ReplyDeletebest logo design company
Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also best logo design company
ReplyDeleteYou are paying for a help - the measure of time you ought to spend repairing or altering the archive so you can utilize it MUST BE insignificant to none... spanish transcription services
ReplyDeleteI enjoyed reading your post. I will share it with my other friends as the information is really very useful. Keep sharing your excellent work. visit here speaker hire
ReplyDeleteThe insurance provider can also help the individual locate all the audiologists in the area. For this it would be best to find an insurance officer in the near locality and ask for their help.long island audiology
ReplyDeleteI'm thinking about phenomenal audio created and the best mixing headphones put on your web site with quickness and ease by anyone...even someone who isn't technical. This is "web audio" at its absolute finest.
ReplyDeleteAs a student, you will be exposed to a real world theoretical knowledge and dcm loudspeakers applications, critical listening skills, aesthetics and issues of audio, music and sound.
ReplyDeleteYou have done good work by publishing this article here. I found this article too much informative, and also it is beneficial to enhance our knowledge. Grateful to you for sharing an article like this.speaker hire Melbourne.
ReplyDelete