Sunday, April 10, 2011

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.

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



  • &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








  • &invis=1

    • Add if you want to make the player
      invisible.  Note: People hate this.



  • &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.




And
that’s all!  Enjoy!

Friday, April 8, 2011

Something Chrome Needs

There is a very common type of extension for Google Chrome, and that happens
to be the “Notifier” type.

You have GMail Notifiers, Google Voice Notifiers, Google
Reader, Google Docs, OWA, Facebook, Twitter, etc etc.  Wouldn’t it be nice if Google Chrome just
had a single Notification Center with a fantastic User Interface for showing notifications from whatever
services register themselves with it?

I think it would, and over the summer – if I have
spare time – I think I’m going to program an extension that will can accept additions for showing
notifications.  I’ll then ask around for help and/or program some basic services for it to use, and
post it to the Chrome WebApp Store.

My next questions are:

  • Would
    you use this?  Is it a good idea?
  • Would you code for this?
  • Would
    you purchase this for $1?

At the moment, I’ve got plenty of cool
programming projects, and I’m not making money with any of them.  GVOMS is almost entirely free (no
companies have purchased a license to use), and anything else I’ve done so far has been free and open
source.

So unless people are going to start donating to me – which I’m pretty sure you
aren’t – I need to find some way to make money.  I’m a college student, after all.

And
I don’t think $1 would be too much to ask for a unified notification center in Google Chrome, do you?