Windows Media Player 11 SDK Attribute Values for TV ContentÂ
Previous | Next |
Attribute Values for TV Content
Throughout this topic, the Player object was defined in the following manner:
AxWMPLib.AxWindowsMediaPlayer Player; using WMPLib;
Windows Media Player 10 or later can organize TV content in the library. Windows Media Player treats TV content as a subcategory of video content. To make video content appear in the TV nodes in the library, set the WM/MediaClassPrimaryID and the WM/MediaClassSecondaryID attributes to the values in the following table by using the media.setItemInfo method:
Attribute | Value |
WM/MediaClassPrimaryID | DB9830BD-3AB3-4FAB-8A37-1A995F7FF74B |
WM/MediaClassSecondaryID | BA7F258A-62F7-47A9-B21F-4651C42A000E |
You can also use these values to determine whether a particular digital media item contains TV content by using the media.getItemInfo or media.getItemInfoByType methods.
Remember to use the GUID values as string values when specifying or retrieving these values.
The following C# example code sets the media class attributes so that a media item will be identified as TV content.
// Initialize the media object. // This code assumes only 1 item named MyFile. IWMPMedia3 media = (IWMPMedia3)Player.mediaCollection.getByName("MyFile").item(0); // Set the primary media-class identifier. media.setItemInfo("WM/MediaClassPrimaryID", "DB9830BD-3AB3-4FAB-8A37-1A995F7FF74B"); // Set the secondary media-class identifier. media.setItemInfo("WM/MediaClassSecondaryID", "BA7F258A-62F7-47A9-B21F-4651C42A000E");
For more information about the possible values for the media class attributes, see the Windows Media Metadata Usage Guidelines at the MSDN Web site.
See Also
Previous | Next |