RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMediaPlayer.Play Method

Plays the media loaded in the open multimedia device.

Pascal
procedure Play;
C++
__fastcall Play();

Play is called when the Play button on the media player control is clicked at runtime. 

Upon completion, Play stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property. 

The Wait property determines whether control is returned to the application before the Play method has completed. The Notify property determines whether Play generates an OnNotify event. 

If the StartPos property is set, playing starts at the position specified in StartPos. Otherwise, playing starts at the current position, specified in the Position property. Similarly, if the EndPos property is set, playing stops at the position specified in EndPos. Otherwise, playing stops at the end of the medium. 

Whether the medium (specified in the Position property) is rewound before playing starts depends on the AutoRewind property. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!