RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMediaPlayer.Wait Property

Determines whether a media control method returns control to the application only after it has been completed.

Pascal
property Wait: Boolean;
C++
__property Boolean Wait;

Wait determines whether a media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop) returns control to the application only after it has been completed. 

Wait is unavailable at design time. 

If Wait is true, the media player component waits until the next media control method has completed before returning control to the application. If Wait is false, the application won't wait for the next media control method to finish before continuing. 

Wait affects only the next media control method called after setting Wait. Wait must be reset to affect any subsequent call to a media control method. 

By default, Play and StartRecording function as if Wait is false. Wait must be set to true before calling Play or StartRecording to prevent control from returning to the application before playing or recording has finished. By default, all other media control methods function as if Wait is true.

Note: Wait is usually set to false only if the next media control is expected to take a long time, so that the application can execute other code before the media control method has completed. If Wait is set to false, you should set Notify to true so the application is notified when the media control method completes.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!