MediaChanger Object

Enables HTML applications to control the disc changer and get information about discs in the changer slots and in the drives. HTML applications can retrieve this object from the MediaCenter.MediaChangers property.

Microsoft .NET remoting releases objects (other than host objects) every five minutes if they are not used, and calls made to the object result in an exception error. To prevent the MediaChanger object from being released prematurely, create a timer with a frequency of less than five minutes that calls the IsLocked property.

Note   Hosted HTML has been deprecated. To use the new features of the Windows Media Center SDK, you must develop a Windows Media Center Presentation Layer application. However, if you still want to develop a hosted HTML application or update an existing application, you can download and use the previous version of the Windows Media Center SDK from the Microsoft Download Center.

The MediaChanger object exposes the following properties:

Property Description
DriveDiscData Gets information about the discs in the drives.
IsLocked Gets a value that indicates whether the media changer is currently locked by any application.
SlotDiscData Gets information about the discs in slots.

The MediaChanger object exposes the following methods:

Method Description
LoadDisc Loads the disc in the specified slot into the specified drive.
RescanDisc Causes Windows Media Center to rescan the disc in the specified drive.
UnloadDisc Unloads the disc in the specified drive.

See Also