Articles, tutorials and other stuff related to my many doings at Stardock.
Why you should use DXPlayer for your next media player widget
Published on December 16, 2004 By GreenReaper In DesktopX
Note: This article refers to changes introduced in the DXPlayer plugin distributed with DesktopX 2.4. If you don't have that version, upgrade now! (trial version here - registered users can use the support emailer to get a link, or download via Stardock Central like ODNT subscribers)

I know a lot of skinners feel like they have to be programmers half the time. This has been especially true in DesktopX - it seems you have to know VBScript inside-out if you want to do anything really cool. One of the biggest issues people have is in the area of media player widgets - it seems like you have to do an awful lot just to play some music!

Well, the DXPlayer plugin takes the hassle out of creating a media player widget. No longer do you have to work out how to call obscure COM objects, paw through software development kits, puzzle over obscure script errors, or just look on in wonderment at the objects of people who did get it all to work, somehow. You can let DXPlayer do the hard work of talking to the player, while you work on the equally hard (but more fun!) work of making your objects look and feel just as you want them to.


Users can choose the player they wish to control with DXPlayer

But best of all, you don't have to restrict users to just using the player you've written code to support. With DXPlayer, you can make it while using your favourite player, and it works with whatever users choose to use. On your end, you choose from a selection of features, like "Play the current track", "Open a file", or "Display the time left with a gauge drawn using these images". DXPlayer then figures out what player is currently loaded, and makes it so that when the user clicks the play button, it's as if they had pressed play in the current player. If they don't like the player that it chose, they can force it to use any of the supported players installed on their system. It's that simple!

"Wait a minute!", I hear you saying, "How can one system work with all the different media players around? Don't they all do different things?". Well, no! The thing that makes DXPlayer work so well is that due to a certainly amount of what I like to call 'competitive feature-matching' in the media player market, the number of differences between player feature sets is surprisingly small.

Even more conveniently, the more popular a feature, the more likely it is that players will have it! For example, Winamp, Windows Media Player and iTunes all feature a 10-band parametric equalizer. Both Winamp and iTunes offer a pre-amp, and iTunes and Windows Media Player offer a selection of EQ presets, as well as information on the album, artist, genre and composer of a piece of music. Everything has start/pause/stop/next/previous/title/duration, and that's all you need for a basic remote. And if a feature isn't supported on a player, the failure is handled gracefully - for example, lack of volume control would just result in the volume track-thumb not appearing.

For those of you who may have tried DXPlayer and found it lacking in the style department, look again. Recent improvements have allowed the use of native DesktopX text. Yes, that's right - all you have to do is select what you want to display, and then change the DesktopX text settings - including colour, shadows and antialiasing - just as you would do for any other text object. You can convert existing DXPlayer text objects to native text just by ticking the appropriate checkbox in the DXPlayer Display settings window.

Other new features - all backwards-compatible with your old DXPlayer widgets - include:
  • iTunes support!
  • Expanded Winamp and QCD support (duration, position, volume, pan and EQ controls)
  • An internal Windows Media Player control (this means your player widgets can always load and play music, even if there is no media player running)
  • The user settings dialog allowing the selection of a preferred player - even in user mode
  • Numerous other tweaks and requested features

How do you use all these nifty features? Well, instructions on how to use DXPlayer are included in the DesktopX\SDPlugins\DXPlayer.txt file, but basically just select to Add an additional property in the Object Properties window, select DXPlayer, and then click Configure to select what you want that particular object to do - or be, in the case of gauges, displays and the like.

If there's something you want it to do that it doesn't, let me know below!

Comments (Page 3)
3 Pages1 2 3 
on May 28, 2006
prxl! pqli, nxrtu mjwq cgqwke wdvovh.
on May 30, 2006
Pfft. You're just sayin' that.
3 Pages1 2 3