Windows Media Center RSS 2.0
 Tuesday, April 19, 2005

Download the Sample Code

Many experiences designed for Media Center require additional client side code installations (for example: ActiveX controls).  Interacting with a setup program launched from Media Center typically requires the user to respond to at least one Windows security warning and setup wizards designed to be used with a keyboard and mouse.

The Media Center API provides a special method called CreateDesktopShortcut which aids transition from Media Center to a web browser and interaction by keyboard and / or mouse.  Media Center displays the following dialog when developers invoke the CreateDesktopShortcut method.  The option for 'Open Website in Browser' is not shown on Media Center Extenders.

Here is the outline for a typical installation which the sample code illustrates…

  1. Detect if the needed components are installed.  If not, inform the user of the prerequisite and continue.
  2. Determine the version of Media Center.  [Media Center 2004 doesn’t include the CreateDesktopShortcut method, so slightly different handling is needed.]
  3. Determine if the user is at the Media Center PC or connecting via remote desktop (including Media Center Extender).
  4. If on a remote desktop connection, determine if from a Media Center Extender.  Media Center Extender users will need to return to the Media Center PC to install components.
  5. Make sure you exit DirectX exclusive mode in Media Center before launching the external browser window or setup program.
  6. For Media Center 2005 users (including those on a Media Center Extender) call the CreateDesktopShortcut method to launch a browser window (on the Media Center Extender this method will prompt them to create a shortcut on the desktop).
  7. For Media Center 2004 users, load the installation web page directly in Media Center (make sure you have the IsMCEEnabled function in the page to avoid the ‘Not Designed for Media Center’ warning).
  8. Give great, easy to follow instructions for the install, including directions so the consumer can easily get back to the Media Center experience after the install.
Categories: Media Center SDK Code Sample | Comments [0] | # | Posted on Tuesday, April 19, 2005 9:15:14 PM (GMT Standard Time, UTC+00:00)   
 Monday, April 18, 2005

Bill Linzbach (a fellow NASCAR fan here on the west coast) was complaining of a headache, so I decided to cheer him up.  I thought he was taking pictures with his new camera -- boy, was I wrong...

Get Down, Get Funky, Get Loose

So, does this rank up there with Star Wars Kid or Steve Ballmers Developer! Developer! Developer!...?

And before you ask, I don't do bachelorette parties...

Categories: Video | Comments [0] | # | Posted on Monday, April 18, 2005 6:24:08 PM (GMT Standard Time, UTC+00:00)   
 Tuesday, April 05, 2005

One of the common areas of confusion I see when working with designers and developers is user interface scaling for third party applications in Media Center. This is a bit of a mind shift for designers and developers familiar with the rest of the Windows XP world where higher resolutions give you more screen real estate. The Media Center UI always scales and a basic objective for third party applications is to scale as well.

Here are some guidelines designers and developers can follow...

1) Copy-and-paste the sample code in the Windows XP Media Center Edition Software Development Kit (SDK) topic Handling the Lower Resolution of a Media Center Extender Session which makes use of the Media Center OnScaleEvent API (this code can also be found in the sample HTML resource as part of the offline version if the SDK).

[aside]

Note: The sample code in the SDK uses the following...

JScript: body.style.zoom=vScale
HTML:

...which might be slightly confusing to the novice developer. We are referencing an object in HTML by referring to its 'id' attribute (see the zoom Attribute | zoom Property page at MSDN). If you do use the sample code, you will need to be sure to sync the JScript with the body element id.  The sample code for this post uses the following to be specific and avoid confusion...

JScript: document.all.id_body.style.zoom=vScale
HTML:

[/aside]

2) Do not try to reinvent the wheel by coming up with your own paradigm for scaling.  It's hard to get more fault tolerant (or more elegant) than using DHTML to place objects and elements with absolute positioning on a page and then scaling the whole. If you are super geeky and want to try and create your own scaling, be forewarned: you will inevitably run into issues trying to account for Media Center objects which scale independently of the onScaleEvent as well as the nuances of accounting for the myriad resolutions other than true 4:3 or 16:9.

3) Do design the hosted HTML experience for 1024 x 768 (4:3) and 1366 x 768 (16:9) with extra image information for the background to the right and bottom to account for the usually slight variations in aspect ratio.  All of the scaling in Media Center is based on 4:3 or 16:9 aspect ratios.  It's not worth the time or effort to account for other resolutions (like 1280 x 1024 which is close to, but not exactly 4:3).

4) Account for the mouse navigation / transport controls (which don't scale) and Shared Viewport / volume indicator (which do scale) in your designs by making sure all actionable elements are not obscured by these Media Center features.  I put together a design template showing the location of these items for Media Center 2005 in the smallest possible windowed mode to assist the designer and developer.

Media Center Design Template (JPEG)
Media Center Design Template (Adobe Illustrator)

The design template is based on 360 x 270 so when focusable / actionable elements in your page are scaled down to this size the mouse nav / transport controls won't interfere with the navigation of the service / application.  I'm not suggesting a certain percentage of users run Media Center in a window at this resolution but designing the experience for this resolution is the only way to account for 100% of the Media Center usage paradigms.

Here are some screen shots to illustrate use of the design template...

Screenshot 360 x 270 window for Media Center showing the sample code with mouse nav / transport bars.
Screenshot 360 x 270 window showing Online Spotlight as an example of elegant and functional design with a bunch of actionable elements on a page.
Screenshot Design template superimposed on a screen shot of the sample code, showing how the two correlate.
To show the constant (non-scaling) size of the mouse navigation and transport control feature within Media Center:
   Screenshot 500 x 375
   Screenshot 640 x 480
   Screenshot 800 x 600

Here are a couple of Photoshop files allowing you to quickly evaluate potential designs against the mouse nav / transport constraints. Take screenshots of the comps or experience and resize to 360 x 270 (4:3) or 480 x 270 (16:9) and paste the result into a layer underneath the design template (making sure to center).

360 x 270 (PhotoShop PSD)
480 x 270 (PhotoShop PSD)

5) Specifically design for widescreen aspect ratios.  The world is slowly, but surely, changing to widescreen aspect ratios.  For example, the Reuters application does this *really* nicely by giving you an extra column of videos when viewed in a widescreen aspect ratio

Reuters in 4:3 Mode
Reuters in 16:9 Mode

6) You don’t need to design for action safe / title safe in your application. Media Center works in conjunction with the video drivers to make sure most over scan issues are properly handled. Interactive TV shops will find this different compared to other platforms, but rest assured this statement is true.

For those of you really interested in how the scaling works 'behind the scenes' here are the nitty-gritty details.  The sample code for this post illustrates the scaling mechanisms in Media Center outlined below.

The vScale argument passed when Media Center calls the onScaleEvent function in the JScript is always the smaller of the following calculations:

document.body.clientWidth / 1024
document.body.clientHeight / 768

When the document.all.[body id].style.zoom is applied via the onScaleEvent function the following will always be returned when Media Center is running in a windowed mode or native full screen resolutions of exactly 4:3 and 16:9 aspect ratios:

For standard aspect ratio of 4:3 (C:\WINDOWS\eHome\ehshell.exe)
   document.body.clientWidth = 1024
   document.body.clientHeight = 768

For widescreen aspect ratio of 16:9 (C:\WINDOWS\eHome\ehshell.exe /widescreen)
   document.body.clientWidth = 1366
   document.body.clientHeight = 768

When in full screen mode the following will be returned if not running in Media Center native full screen resolutions of 4:3 or 16:9 aspect ratios:

For standard aspect ratios (those similar to 4:3, 1280 x 1024 for example):
   document.body.clientWidth = 1024
   [Calculated Value] document.body.clientHeight = [Actual document.body.clientHeight] * 1024 / [Actual document.body.clientWidth]

For widescreen aspect ratios (those similar to 16:9, 1280 x 800 for example):
   [Calculated Value] document.body.clientWidth = [Actual document.body.clientWidth] * 768 / [Actual document.body.clientHeight]
   document.body.clientHeight = 768

Categories: Media Center Application Design | Media Center SDK Code Sample | Comments [1] | # | Posted on Tuesday, April 05, 2005 7:00:42 PM (GMT Standard Time, UTC+00:00)   
 Saturday, April 02, 2005

So, I'm in Los Angeles, Washington, DC this coming week and Charlotte, NC the following.

Anybody want to get together and have a geek dinner (or its lighter weight cousin, after geek dinner drinks)?

Here are the evenings I will *probably* be available...

Los Angeles: Tuesday, April 5

Washington, DC: Thursday, April 7 or Friday April 8

Charlotte, NC: Monday, April 11

I might be able to drag along some others from the eHome team to join us.

Leave comments here if you want to get together...

Categories: Geek Dinner | Comments [3] | # | Posted on Saturday, April 02, 2005 12:38:51 AM (GMT Standard Time, UTC+00:00)   
 Friday, April 01, 2005

Many thanks for Ian Dixon for putting together this podcast, and special kudos to Richard Cardran and Mike Petrusis of Zetools for coming along for the ride.  It was fun -- let's do it again sometime Ian.

Categories: Media Center | Comments [1] | # | Posted on Friday, April 01, 2005 6:23:12 PM (GMT Standard Time, UTC+00:00)   
 Wednesday, March 23, 2005

Visit http://www.crossfader.com, register and you get a blog by default.  Cool.  This was one of the easiest registrations ever: give 'em my email address, get a password via email and Log In.  Cool.

I didn't get any kind of RSS announcement though from my previous subscription.  I finally found it buried on a page: http://www.crossfader.com/blogs/MainFeed.aspx?GroupID=16.

Categories: Audio | Comments [1] | # | Posted on Wednesday, March 23, 2005 6:04:22 AM (GMT Standard Time, UTC+00:00)   
 Saturday, March 19, 2005
Categories: Media Center | Comments [0] | # | Posted on Saturday, March 19, 2005 11:52:58 PM (GMT Standard Time, UTC+00:00)   
 Friday, March 18, 2005

First, the Channel9 Guy visits Fellowship Church (with Robert Scoble tagging along).

Then, Fellowship Church decided to go with Flash Streaming video after doing some homework.

Now, Fellowship Church has decided to transition off of Microsoft .NET to PHP/Linux/Apache/PostgreSQL.

But they still like Fellowship One which appears to still be a .NET product -- but can this be far behind...?

Where is Microsoft missing the boat with Fellowship Church?

Anywho, I sure hope the Fellowship Church guys are playing around with the Avalon CTP.

Categories: .NET | Comments [0] | # | Posted on Friday, March 18, 2005 8:57:20 PM (GMT Standard Time, UTC+00:00)   
ZuneCard
GamerTag
About

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008 Charlie Owen

Sign In
All Content © 2008, Charlie Owen