Description Usage Arguments Value Examples
Read SBV file
1 |
file |
The file name of the |
A data.frame
with start/stop times and the text
1 2 3 4 5 6 7 8 9 10 11 12 | if (yt_authorized()){
vids <- list_my_videos()
res <- list_caption_tracks(video_id = vids$contentDetails.videoId[1])
cap <- get_captions(id = res$id, as_raw = FALSE)
tfile <- tempfile(fileext = ".sbv")
writeLines(cap, tfile)
x <- read_sbv(tfile)
if (requireNamespace("hms", quietly = TRUE)) {
x$start <- hms::as_hms(x$start)
x$stop <- hms::as_hms(x$stop)
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.