# NOT RUN {
# The URL below has been chunked to comply with CRAN
# requirements; the use of file.path is optional and not required
# for this component.
if (interactive()) {
library(dash)
app <- Dash$new()
app$layout(
htmlDiv(list(
htmlVideo(children = list(
htmlSource(src = file.path("https://interactive-examples.mdn.mozilla.net",
"media/examples",
"friday.mp4",
fsep = "/"),
type = 'video/mp4'),
htmlTrack(kind = 'captions',
srcLang = 'en',
src = file.path("https://interactive-examples.mdn.mozilla.net",
"media/examples",
"friday.vtt",
fsep = "/"),
default = 'default',
label = 'English')
),
controls = TRUE
)
)
)
)
app$run_server()
}
# }
Run the code above in your browser using DataLab