Share via


Displaying Content Based on Parental Controls

Windows Media Center maintains settings that enable parents to control access to the types of movie and TV content that children are allowed to view. The parent specifies maximum allowable ratings for movie and TV content and sets up an access code. Subsequently, Windows Media Center prompts for the access code before showing any content that exceeds the specified content ratings. Windows Media Center maintains different parental control settings for movies and TV programs.

The Windows Media Center object model includes a number of application programming interface (API) elements that enable applications to retrieve the current parental control settings. Before playing a particular movie or TV show, an application can check the parental control settings and, if the content exceeds the specified ratings, prompt for the access code.

To retrieve the parental control settings for a particular category, an application must first query the MediaCenterEnvironment.ParentalControls property to retrieve a ParentalControls object. Next, the application passes a category string to the ParentalControls.GetAvailableRatingSystems method to retrieve the current parental control settings for either the movie or TV category.

Windows Media Center maintains a separate group of settings that enable parents to specify maximum ratings for violence, suggestive dialog, offensive language, and sexual content in TV content. An application can access these advanced TV ratings through the USTVRatings class.

To enforce the parental control settings, Windows Media Center displays a page that requires the user to enter the four-digit parental control code before allowing access to restricted content. Applications can use this same page to restrict access to content by calling the ParentalControls.PromptForPin method.

See Also