video_get_status

This function returns the status of the currently loaded video. The status can be any one of the following constants:

Video Status Constant
ConstantDescription
video_status_closedNo video is currently loaded, or the video was closed with video_close()
video_status_preparingThe video is currently preparing and has not started playing yet
video_status_playingThe video is currently playing
video_status_pausedThe video is paused (see video_pause())

 

Syntax:

video_get_status();

 

Returns:

Video Status Constant

 

Example:

var _status = video_get_status();

if (keyboard_check_pressed(vk_space))
{
    if (_status == video_status_playing)
    {
        video_pause();
    }
    else if (status == video_status_paused)
    {
        video_resume();
    }
}

The above code gets the status of the video and then checks if the player has pressed Space. In that case it pauses the video if it's playing, and resumes it if it's paused.