On this page:
preview
video-player%
new
get-video-length
play
pause
stop
is-stopped?
seek
set-speed
rewind
fast-forward
get-position
get-fps
set-video
video-player-server%
set-canvas
set-video
get-video-length
play
is-paused?
get-status
is-stopped?
pause
stop
seek
set-speed
rewind
fast-forward
get-fps
render-audio
render-video
8.13.0.9

4 Player🔗ℹ

 (require video/player) package: video

VidLang comes with a player to quickly preview videos before the final render. You can access it from DrRacket with the Preview Video button. It appears next to the run button when a VidLang file is open. Alternatively, you can use raco video -p <file.vid> from the command line.

Several of the features of the video preview are disabled. This is because they are unstable and not yet ready for release. They should be available in the next version of Video, or in the latest unstable build.

procedure

(preview data)  (is-a?/c video-player%)

  data : producer?
Helper function to create a new video-player% object, and start playback. The resulting video-player% object is returned.

data is the producer that the video player will render.

class

video-player% : class?

  superclass: frame%

A video player for previewing producers.

constructor

(new video-player% [video video])  (is-a?/c video-player%)

  video : video?
Constructs a video player object. This does not automatically show the video or start the video playback. Use show and play, or consider using preview instead.

video is the initial video associated with the player. This can be changed with set-video.

method

(send a-video-player get-video-length)

  exact-nonnegative-integer?

method

(send a-video-player play)  void?

method

(send a-video-player pause)  void?

method

(send a-video-player stop)  void?

method

(send a-video-player is-stopped?)  boolean?

method

(send a-video-player seek frame)  void?

  frame : exact-nonnegative-integer?

method

(send a-video-player set-speed speed)  void?

  speed : number?

method

(send a-video-player rewind)  void?

method

(send a-video-player fast-forward)  void?

method

(send a-video-player get-position)  exact-positive-integer?

method

(send a-video-player get-fps)  number?

method

(send a-video-player set-video video)  void?

  video : producer?

class

video-player-server% : class?

  superclass: object%

Back-end for the video-player% class. Can be used to render a video without the surrounding controls.

method

(send a-video-player-server set-canvas c)  void?

  c : canvas?

method

(send a-video-player-server set-video v)  void?

  v : producer?

method

(send a-video-player-server get-video-length)

  (and/c real? (>=/c 0))

method

(send a-video-player-server play)  void?

method

(send a-video-player-server is-paused?)  boolean?

method

(send a-video-player-server get-status)

  
(or/c 'playing
      'paused
      'rewinding
      'fast-forwarding
      'playing-slow
      'stopped)

method

(send a-video-player-server is-stopped?)  boolean?

method

(send a-video-player-server pause)  boolean?

method

(send a-video-player-server stop)  boolean?

method

(send a-video-player-server seek position)  void?

  position : (and/c real? (>=/c 0))

method

(send a-video-player-server set-speed speed)  void?

  speed : real?

method

(send a-video-player-server rewind)  void?

method

(send a-video-player-server fast-forward)  void?

method

(send a-video-player-server get-fps)  (and/c real? (>=/c 0))

method

(send a-video-player-server render-audio render?)  void?

  render? : boolean?

method

(send a-video-player-server render-video render?)  void?

  render? : boolean?