Windows Vista > Soapbox Video Gadget
- Install the latest Gadget to your sidebar- 193 Kb
- Sample of favorite video list (xml file)- 45 Kb (right click, Save as.. and click open in Gadget Settings -> Video Feeds dropdown -> shared favorites)
- Discussions/Comments/Suggestions
- Complete Article on Soapbox Video Gadget
Introduction
When I first started sidebar gadget development1, I found gadgets cool and innovative. But the more I learned about them, the more I realized their usefulness. Gadget development provides a whole new platform, becoming more productive in ways unimagined. On one hand, it's a mini web application which can host a web page, call a web service, and use AJAX to read an RSS feed. On the other, it can interact with the Windows API using the power of .NET languages. Wow! That's the best of both the worlds, wouldn't you agree?
The most important factor is the unique way in which a gadget provides the interaction between the web, Windows and users. In this example I try to utilize this, to give user the "Power of Videos" in the sidebar. Check the architecture below.
Tips in general
- To resize a windows media player to a custom width, set the
‹param name="AutoSize" value="1"› - Any exceptions in a sidebar gadget main window should be handled with the "Service Not Available" screen, with information icon as shown above
- Whenever you use a JavaScript function, encapsulate it inside a
try catchstatement to avoid surprises - Escape(^) and unescape(^) are nice little JavaScript functions for URL encoding and un-encoding when you need to pass URL's, etc. as parameters to the flyout window
- The HTML code for < is "«" , << is "‹" , >> is "›" and > "»"
- To check whether a file exists in a local folder use System.Shell.itemFromPath(Path) inside
try catch - For a timer functionality, use the setinterval4 method
- For multiple language support, create a folder for that language (e.g. 'IT-CH', if the language is it-ch Italian Switzerland) and copy all files from the 'EN-US' folder to the new created folder (language codes ^)
- Check design concepts and usage pattern5
In Action
Soapbox Gadget in Action : Size: 400 X 360 in flash player

References
- Daily Dilbert : A Beginner's Gadget
- Soapbox at MSN Videos
- MicrosoftGadgets.com sidebar development
- Windows setinterval
- Design concepts and usage pattern
Article History
- Mar 07, 2007: First published
- Mar 08, 2007: Added support for flash player
- Mar 09, 2007: changed "check for updated feed" 30 minutes
- Mar 11, 2007: Added architecture diagram
- Mar 20, 2007: Create "My Favorite Videos"
- Mar 23, 2007: Save your favorite video list to share
- Mar 23, 2007: Open shared favorite video list (added sample)
- Apr 02, 2007: Updated search string
- Apr 11, 2007: Updated & added some defaults
