Grooveshark keyboard hook

The guys at Grooveshark did an awesome job switching from the Flash based player to Javascript (as a side note, I just wish they’d lose the Flash ads, they make my Macbook Pro’s CPU hit 70% load just listening to music).

This allowed me to write a new application that captures the play/pause/forward/backward media keys and send the necessary messages to the player. Using the app is so much simpler as well, just launch the app and you’re ready to go! No need to go through the tedious process of selecting the window and keys, everything should be straightforward.

Groovie

Update:

Since Grooveshark never replied to my email, I’m publishing the code

Groovie Source

19 comments

  1. is it possible to get the option to make it go directly to my playlist and then add all songs to the play queue?

    lovely program btw!

  2. thank you so much! it works great!

  3. Can you please release the source code? :)

    • I can’t right now. I don’t know if the folks at Grooveshark would like that too much since it kind of defeats the purpose of their desktop AIR app.
      I’ve emailed them to ask if they’re ok with me releasing this app (and the source) but they haven’t replied yet.

  4. Awesome job, exactly what I needed! Thank you so much!

  5. I would really like to thank you for this application, media keys was really the only thing missing from Grooveshark and I honestly didn’t think there was any hope of adding that. Thanks for surprising me :)

  6. Glad to hear you find it useful!

  7. Love your app, wish there was a way to fix the memory leak in the webbrowser control. groovie’s memory footprint just keeps on growing and growing :(

    • Yes, the WebBrowser control is a memory hog. I am not sure it’s a leak though, it might just be caching a lot of data and will release if it’s needed by other processes.

  8. Hey, great job on the app. Can we make it scrobble to last.fm? I am using this Userscript on the web player:
    http://userscripts.org/scripts/show/99088

    Anyway we could add it in?

  9. Is there any way to enable the shuffle songs feature on this? It seems to work fine for me other than shuffle when listening to a playlist. Thanks btw for the great program, it is immensely useful.

  10. Hey Radu, I’d really like to get my hands on the code for this project… especially if you’re busy or have moved on from this initiative. Grooveshark doesn’t seem like the kind of company to mercilessly persecute people that undermine shitty products that they rush (which is now essentially deprecated since the new UI is all HTML5).

    I have a few minor complains that wouldn’t take a lot of effort to address, but perhaps you’re willing… here goes:

    * The back button on the mouse does not go back a page (backspace does).
    * The window always resets to its default size when it opens up, if I close the player maximized I expect it to open maximized.
    * The icon in the titlebar is the default WinForms icon and looks lame.
    * Since this is a WinForms application, it should be simple to add media controls to the Windows 7 taskbar (prev, play/pause, next).
    * I keep getting IE script errors:
    Line: 680
    Char: 497
    Error: Invalid Argument
    http://static.a.gs-cdn.net/gs/core.js?20111121.01

    Maybe an updated browser win forms panel might address this?

    Please reconsider providing the code, the program actually works very well (never mind that it uses IE for browsing…), with a little bit of effort it could be a great solution to the media keys problem.

  11. Hey Sam,

    I’ve published the source code. If you’re willing to work on the issues, I’d be more than happy to give you credit and link to your updated project.

Leave a comment