Skip to contents

The video element and the controls provided by this function are javascript-based, and so are probably most useful in Shiny apps.

Usage

ov_video_control(what, ...)

Arguments

what

string: the command, currently one of:

  • "play" (note that this requires that the playlist has already been loaded)

  • "stop"

  • "pause"

  • "prev"

  • "next"

  • "jog" - move the video forward or backwards by a given number of seconds (pass this value as the ... argument)

  • "set_playback_rate" - set the playback rate: 1 = normal speed, 2 = double speed, etc

...

: parameters used by those commands. For version 2 of the video controller, ... must include controller_var = "my_controller_var"

Examples

if (FALSE) {
  ov_video_control("jog", -1) ## rewind 1s
  ov_video_control("jog", 10) ## jump forwards 10s
  ov_video_control("set_playback_rate", 0.5) ## play at half speed
}