diff --git a/DESCRIPTION b/DESCRIPTION index f654668..94db898 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: vembedr Title: Embed Video in HTML -Version: 0.1.4.9004 +Version: 0.1.4.9005 Authors@R: c( person( given = "Ian", @@ -26,8 +26,9 @@ Imports: magrittr, glue, assertthat, - utils -RoxygenNote: 7.1.1 + utils, + lifecycle +RoxygenNote: 7.1.2 URL: https://github.com/ijlyttle/vembedr BugReports: https://github.com/ijlyttle/vembedr/issues Suggests: diff --git a/NAMESPACE b/NAMESPACE index 4784ae9..6db1fee 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -34,4 +34,5 @@ export(use_align) export(use_bs_responsive) export(use_rounded) export(use_start_time) +importFrom(lifecycle,deprecated) importFrom(magrittr,"%>%") diff --git a/R/embed.R b/R/embed.R index dc3e623..da87bb2 100644 --- a/R/embed.R +++ b/R/embed.R @@ -11,9 +11,7 @@ #' \describe{ #' \item{YouTube}{} #' \item{Vimeo}{} -#' \item{Microsoft Channel 9}{ -#' (click the *Embed* tab)} -#' \item{Box}{} +#' \item{Box}{} #' \item{Microsoft Stream}{} #' } #' @@ -38,8 +36,6 @@ #' @examples #' embed_youtube("dQw4w9WgXcQ") #' embed_vimeo("45196609") -#' embed_user2016("Literate-Programming") -#' embed_user2017("Room-202-Lightning-Talks") %>% use_start_time("26m35s") #' embed_box("m5do45hvzw32iv2aors3urf5pgkxxazx") #' embed_msstream("ae21b0ac-4a2b-41f4-b3fc-f1720dd20f48") #' diff --git a/R/embed_url.R b/R/embed_url.R index 6f34237..a353816 100644 --- a/R/embed_url.R +++ b/R/embed_url.R @@ -26,25 +26,46 @@ embed_url <- function(url){ eval() } -#' @rdname embed +#' @rdname embed_channel9 #' @export # embed_user2016 <- function(id, width = NULL, height = 300, ratio = c("16by9", "4by3"), frameborder = 0, allowfullscreen = TRUE){ + lifecycle::deprecate_warn( + "1.5.0", + "embed_user2016()", + details = c( + i = "Microsoft made breaking changes to its Channel 9 service.", + i = "See ." + ), + id = "channel_9" + ) + id <- c("Events", "useR-international-R-User-conference", "useR2016", id) embed_channel9(id, width, height, ratio, frameborder, allowfullscreen) } -#' @rdname embed +#' @rdname embed_channel9 #' @export # embed_user2017 <- function(id, width = NULL, height = 300, ratio = c("16by9", "4by3"), frameborder = 0, allowfullscreen = TRUE){ + + lifecycle::deprecate_warn( + "1.5.0", + "embed_user2017()", + details = c( + i = "Microsoft made breaking changes to its Channel 9 service.", + i = "See ." + ), + id = "channel_9" + ) + id <- c( "Events", "useR-international-R-User-conferences", diff --git a/R/rickroll.R b/R/rickroll.R index c2a96bb..97d5f96 100644 --- a/R/rickroll.R +++ b/R/rickroll.R @@ -4,6 +4,8 @@ #' such as `query`, but do not have a particular video in mind, this function #' may be useful to you. #' +#' Please note that the YouTube video seems no longer embeddable. +#' #' @param ... arguments (other than `id`) passed on to [embed()] #' #' @return An embed object that prints an \code{htmltools::\link[htmltools]{tags}$iframe} element @@ -12,7 +14,6 @@ #' @examples #' rickroll_vimeo() #' rickroll_youtube() -#' rickroll_channel9() #' NULL @@ -27,13 +28,24 @@ rickroll_vimeo <- function(...){ #' @export # rickroll_youtube <- function(...){ - embed_youtube(id = "DLzxrzFCyOs", ...) + embed_youtube(id = "iik25wqIuFo", ...) } -#' @rdname rickroll +#' @rdname embed_channel9 #' @export # rickroll_channel9 <- function(...){ + + lifecycle::deprecate_warn( + "1.5.0", + "rickroll_channel9()", + details = c( + i = "Microsoft made breaking changes to its Channel 9 service.", + i = "See ." + ), + id = "channel_9" + ) + embed_channel9( id = c("Blogs", "Dan", "BlueHat-v7-Katie-Moussouris-interviews-Dan-Kaminsky-on-some-interesting-research-hes-been-doing-late"), ... diff --git a/R/service-box.R b/R/service-box.R index beb9bec..de63fc4 100644 --- a/R/service-box.R +++ b/R/service-box.R @@ -6,7 +6,7 @@ embed_box <- function(id, custom_domain = getOption("vembedr.box_custom_domain") frameborder = 0, allowfullscreen = TRUE) { # adapted from: - # https://developer.box.com/docs/box-embed#section-build-box-embed-programatically + # https://developer.box.com/guides/embed/box-embed/#programmatically #