The eject method ejects the CD or DVD from the drive.
This method has no parameters.
This method does not return a value.
If the drive door is open, this method closes the door.
To use this method, read access to the library is required. For more information, see Library Access.
Windows Media Player 10 Mobile: This method is not supported.
The following example creates an HTML button element that uses Cdrom.eject to open the door of the drive that has drive specifier index zero. The Player object was created with ID = "Player".
<INPUT TYPE = "BUTTON" NAME = "EJECTBUTTON" VALUE = "EJECT" OnClick = "Player.cdromCollection.item(0).eject()" >
Minimum supported client
|Windows XP [desktop apps only]|
Minimum supported server
|Windows Server 2003 [desktop apps only]|
|Windows Media Player version 7.0 or later.|