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.

# S3 method for vembedr_embed_box
use_start_time(embed, ...)

# S3 method for vembedr_embed_channel9
use_start_time(embed, start_time, is_paused = TRUE, ...)

# S3 method for vembedr_embed_msstream
use_start_time(embed, start_time, ...)

# S3 method for vembedr_embed_vimeo
use_start_time(embed, start_time, ...)

# S3 method for vembedr_embed_youtube
use_start_time(embed, start_time, ...)

use_start_time(embed, ...)

# S3 method for default
use_start_time(embed, ...)

Arguments

embed

vembedr_embed object, created using an embed() function

...

generic arguments to pass through

start_time

numeric (seconds), or character (e.g. "3m15s")

is_paused

logical, for "Channel 9" specifies if the video should be paused at this time

Value

Object with S3 class vembedr_embed.

Details

The start_time argument can take a variety of formats; these inputs all evaluate to the same value:

  • "0h1m0s", "0h01m00s", "0h1m"

  • "1m0s", "1m"

  • "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.

Examples

  rickroll_youtube() %>%
    use_start_time("3m32s")
#> <div class="vembedr">
#>   <div>
#>     <iframe src="https://www.youtube.com/embed/iik25wqIuFo?start=212" width="533" height="300" frameborder="0" allowfullscreen="" data-external="1"></iframe>
#>   </div>
#> </div>