View source: R/shiny_courtref.R
ov_shiny_court_ref | R Documentation |
A shiny app to define a court reference
ov_shiny_court_ref(
image_file,
video_file,
t = 60,
existing_ref = NULL,
launch_browser = getOption("shiny.launch.browser", interactive()),
...
)
image_file |
string: path to an image file (jpg) containing the court image (not required if |
video_file |
string: path to a video file from which to extract the court image (not required if |
t |
numeric: the time of the video frame to use as the court image (not required if |
existing_ref |
list: (optional) the output from a previous call to |
launch_browser |
logical: if |
... |
: additional parameters (currently ignored) |
A list containing the reference information
if (interactive()) {
## define a court reference from scratch
ov_shiny_court_ref(video_file = ov_example_video(), t = 5)
## or modify an existing one
crt <- data.frame(image_x = c(0.05397063, 0.95402573, 0.75039756, 0.28921230),
image_y = c(0.02129301, 0.02294600, 0.52049712, 0.51884413),
court_x = c(0.5, 3.5, 3.5, 0.5),
court_y = c(0.5, 0.5, 6.5, 6.5))
ref <- list(court_ref = crt, net_height = 2.43)
ov_shiny_court_ref(video_file = ov_example_video(), t = 5, existing_ref = ref)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.