WPF Media Player with Last.fm interaction

To work around the fact my laptop is getting old and can't seem to handle multiple programs open at once i.e. Visual Studio or other dev environment and a media player I thought I would have to write my own lightweight version of one of them. The obvious thing to go was the media player which had so many features packed into it which I never used so I set about creating my own media player.

Having recently installed Visual Studio 2010 I was keen to try out Windows Presentation Foundation (WPF) so I had a play about with it and within a few hours I was able to knock up something quite cool thanks to some good tutorials on the net.

Aesthetically it is pretty shocking but it does the job nicely and even has some integration with Last.fm in order to get an image of the artist and to suggest to me some related artists. Additionally clicking on any of the artists, albums or tracks brings up the relevant page in Last.fm if you fancy finding out more about them.

As mentioned, the effort involved in setting this up was incredibly small - the ability to play the tracks is all handled by the MediaElement class, which I believe also handles playing video so I'll maybe enhance it to do this. The only downside to this is that it is using Windows Media Player behind the scenes so there is a requirement for this to be installed.

The Last.fm interaction is through simple web service calls - the list of calls that can be made can be found published on the site http://www.last.fm/api.

I'll maybe post more specifics of how the player operates or share out the source code if there is any interest, but my first impression of WPF is that it's pretty cool and powerful; however I doubt in the long term it will replace Windows Forms Applications.

Popular Posts