ov_video_control: Functions for controlling the video player

View source: R/player.R

ov_video_controlR Documentation

Functions for controlling the video player

Description

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

## Not run: 
  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

## End(Not run)

openvolley/ovideo documentation built on March 19, 2024, 9:52 p.m.