Video Playback

Sub LoadVideo(vid$)

Loads a video track.


Sub PlayVideo(vLoops)

Plays the currently loaded video for a set number of loops.

Note: Set this to 0 to play the video once.

Note: Set this to -1 to the video infinitely.

See also

StopVideo()


Sub PauseVideo()

Pauses the currently loaded video track.


Sub StopVideo()

Stops playing the loaded video track and resets the video position to 0.


Sub SetVideoPosition(pos)

Sets the position within the current video in milliseconds.


Sub ResumeVideo()

Resumes the video

See also

PauseVideo()


Function GetVideoPosition()

Returns the current position in the video playback.


Sub DeleteVideo()

Removes the current video track from memory.


Function VideoIsPlaying()

Returns true if a video is playing.


Function VideoEnd()

Returns true when the currently playing video reaches the end.


Sub GetVideoStats(vFile$, byref vLen, byref vfps, byref frame_w, byref frame_h)

Gets video data from a video file.

Note: This function is slow and should not be used during time critical sections in your code.


Sub SetVideoDrawRect(x, y, w, h)

Sets the area on the current canvas where the video will be displayed.

Note: This is a function that was more useful in older versions of RCBasic. Currently its better to use canvas controls for this.


Sub GetVideoDrawRect(byref x, byref y, byref w, byref h)

Gets the position and dimensions of the area video playback is shown at.


Sub GetVideoSize(byref w, byref h)

Gets the size of video’s frames.


Function VideoExists()

Returns true if there is a video loaded.


Sub SetVideoVolume(vol)

Sets the volume of the video track.


Sub SetVideoVolume(vol)

Sets the volume of the video track.


Function GetVideoVolume()

Returns the volume of a video.

Volume can be in a range of 0 to 128

See also

SetVideoVolume()