HTML Add-ins for Media Center are really quite easy to develop once you get the hang of it. I would like to post a few helpful tips for getting up and running quickly.
First, some information on developing HTML Add-ins-
1. The user interface options are limited only to what you can do in IE!
2. In an HTML add-in, you have full access to the Media Center API’s through the browser. Just about anything you can do with a web application can be done in Media Center! This includes calling web services (directly from the browser) using the DHTML webservice behavior.
3. You can easily code event sinks for the remote control by simply using an OBJECT tag in IE. (See “Search.htm“ example in the SDK, and MSDN for object model information)
Some tips and tricks for getting started with HTML applications:
1. Be sure to download the Media Center 2005 SDK.
2. A good reference about registering add-ins with MCE can be found on MSDN.
3. Be sure to visit Micheal Creasy’s (MSFT) blog.
You may want to tweak the CSS that comes with the SDK to get a true Media Center look and feel. For whatever reason, MSFT decided to provide a non-standard looking CSS for the SDK. It consists of grey, black, and orange. 🙂
1. Hence, you may want to get the CSS Color scheme from MCE 2004 . Keep in mind that there are some behavior tags embedded in the SDK CSS that you will probably want to keep, so you will need to duplicate those.
2. I will try to provide an updated CSS with the appropriate behavior tags so you may simply replace the one in the SDK in the near future.
Creating your Add-in
2. Create your application… If you want to call web services from the browser, check out the MSDN web service behavior.
3. Create an XML file that Media Center registration tool can read. You will need to do this in order to register your application in Media Center. There are two steps:
3a. Generate a guid using the guidgen tool. (Go to “Visual Studio Comnand Prompt“ and you can type in guidgen at the command line.) You will need this guid because when media center installs your application it needs to put it in the registry.
3b. Create your xml file as such- this will add the application in the “More Programs“ category:
title = “Browse Movies”
<category category=”More Programs”/>
4. Load up media center and your application should be registered!