Description Usage Arguments Author(s) Examples
video_box adds a box holding the given video file, which will be hidden initially. Supports multiple sources.
video_tag adds a small button to show the corresponding video box and jump directly to the given position in the video.
1 2 3 |
id |
id of the video element |
src |
source(s) for the video, |
title |
title to be shown above the video |
type |
character specifying the video type(s) |
time |
optional integer specifying the time to jump to (in seconds) |
richard.kunze
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Only run examples in interactive R sessions
if (interactive()) {
library(shiny)
base_url <- "http://download.blender.org/peach/bigbuckbunny_movies/"
shinyApp(
ui = fluidPage(
video_box("lowRes",
paste0(base_url, "BigBuckBunny_320x180.mp4"),
"Low Resolution"
),
video_box("highRes", type = "audio/ogg",
paste0(base_url, "big_buck_bunny_720p_stereo.ogg")
),
fluidRow(column(12,
"Low resolution: ", video_tag("lowRes"), br(),
"Higher resolution: ", video_tag("highRes", 300, "Bookmark at 5min")
))
),
server = function(input, output) {}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.