R/use_start_time.R

Defines functions use_start_time.default use_start_time

Documented in use_start_time use_start_time.default

#' Specify start time
#'
#' This function provides you a consistent way to specify the start time,
#' regardless of the service. Please note that Box does not provide a
#' means to specify the start time.
#'
#' The `start_time` argument can take a variety of formats; these inputs
#' all evaluate to the same value:
#'
#' \itemize{
#'   \item{`"0h1m0s"`, `"0h01m00s"`, `"0h1m"`}
#'   \item{`"1m0s"`, `"1m"`}
#'   \item{`"60s"`, `60`}
#' }
#'
#' Please note that for Vimeo, you can specify a start time, but you can not
#' specify that the video be paused at this time. In other words, it is like
#' "autoplay" is set to `TRUE`, and you cannot unset it.
#'
#' @rdname use_start_time
#' @param ...         generic arguments to pass through
#' @param embed       `vembedr_embed` object, created using an [embed()] function
#' @param start_time  `numeric` (seconds), or `character` (e.g. `"3m15s"`)
#' @param is_paused   `logical`, for "Channel 9" specifies if the video
#'   should be paused at this time
#'
#' @inherit embed return
#'
#' @export
#' @examples
#'   rickroll_youtube() %>%
#'     use_start_time("3m32s")
#'
use_start_time <- function(embed, ...) UseMethod("use_start_time")


#' @rdname use_start_time
#' @export
#'
use_start_time.default <- function(embed, ...) "Unknown class"

Try the vembedr package in your browser

Any scripts or data that you put into this service are public.

vembedr documentation built on Dec. 12, 2021, 1:08 a.m.