Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Cdrom.eject
Collapse the table of content
Expand the table of content

Cdrom.eject method

The eject method ejects the CD or DVD from the drive.

Syntax


Cdrom.eject()

Parameters

This method has no parameters.

Return value

This method does not return a value.

Remarks

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.

Examples

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()"
>

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Version

Windows Media Player version 7.0 or later.

DLL

Wmp.dll

See also

Cdrom Object
Player.playState
Settings.mediaAccessRights
Settings.requestMediaAccessRights

 

 

Community Additions

ADD
Show:
© 2015 Microsoft