video_box: Adds a video box to the app

Description Usage Arguments Author(s) Examples

View source: R/video_box.R

Description

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.

Usage

1
2
3
video_box(id, src, title = NULL, type = "video/mp4")

video_tag(id, time = NULL, title = NULL)

Arguments

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)

Author(s)

richard.kunze

Examples

 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) {}
)

}

daqana/dqshiny documentation built on Sept. 1, 2020, 4:31 p.m.