getMode

getMode(): Integer;

The getMode method of the MultiMedia class returns the current operating mode of the current device.

The mode that is returned can be one of the values listed in the following table.

MultiMedia Class Constant Returned Mode Description
Mode_Not_Ready 1 Not ready
Mode_Open 7 Door open
Mode_Paused 6 Paused
Mode_Playing 3 Playing
Mode_Recording 4 Recording
Mode_Seeking 5 Seeking
Mode_Stopped 2 Stopped

The method in the following example shows the use of the getMode method.

stop_click(btn: Button input) updating;
begin
    if cd.getMode = MultiMedia.Mode_Playing then
        cd.stop;
        cd.position := cd.getStartPosition;
    endif;
end;