Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate channel 9, update links #57

Merged
merged 2 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ export(use_align)
export(use_bs_responsive)
export(use_rounded)
export(use_start_time)
importFrom(lifecycle,deprecated)
importFrom(magrittr,"%>%")
6 changes: 1 addition & 5 deletions R/embed.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
#' \describe{
#' \item{YouTube}{<https://developers.google.com/youtube/player_parameters>}
#' \item{Vimeo}{<https://developer.vimeo.com/player/embedding>}
#' \item{Microsoft Channel 9}{<https://channel9.msdn.com/Events/useR-international-R-User-conference/useR2016/Forty-years-of-S>
#' (click the *Embed* tab)}
#' \item{Box}{<https://developer.box.com/docs/box-embed#section-build-box-embed-programatically>}
#' \item{Box}{<https://developer.box.com/guides/embed/box-embed/#programmatically>}
#' \item{Microsoft Stream}{<https://docs.microsoft.com/en-us/stream/portal-embed-video>}
#' }
#'
Expand All @@ -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")
#'
Expand Down
25 changes: 23 additions & 2 deletions R/embed_url.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://docs.microsoft.com/en-us/teamblog/channel9joinedmicrosoftlearn>."
),
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 <https://docs.microsoft.com/en-us/teamblog/channel9joinedmicrosoftlearn>."
),
id = "channel_9"
)

id <- c(
"Events",
"useR-international-R-User-conferences",
Expand Down
18 changes: 15 additions & 3 deletions R/rickroll.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +14,6 @@
#' @examples
#' rickroll_vimeo()
#' rickroll_youtube()
#' rickroll_channel9()
#'
NULL

Expand All @@ -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 <https://docs.microsoft.com/en-us/teamblog/channel9joinedmicrosoftlearn>."
),
id = "channel_9"
)

embed_channel9(
id = c("Blogs", "Dan", "BlueHat-v7-Katie-Moussouris-interviews-Dan-Kaminsky-on-some-interesting-research-hes-been-doing-late"),
...
Expand Down
2 changes: 1 addition & 1 deletion R/service-box.R
Original file line number Diff line number Diff line change
Expand Up @@ -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

# <iframe
# src="https://{custom_domain}.app.box.com/embed/s/{shared link value}"
Expand Down
21 changes: 20 additions & 1 deletion R/service-channel9.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
#' @rdname embed
#' Embed video from Microsoft Channel 9
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' These functions are deprecated: links to Microsoft Channel 9
#' [no longer work](https://docs.microsoft.com/en-us/teamblog/channel9joinedmicrosoftlearn).
#'
#' @inherit embed return params
#' @param ... arguments (other than `id`) passed on to [embed()]
#' @export
#'
embed_channel9 <- function(id,
width = NULL, height = 300, ratio = c("16by9", "4by3"),
frameborder = 0, allowfullscreen = TRUE){

lifecycle::deprecate_warn(
"1.5.0",
"embed_channel9()",
details = c(
i = "Microsoft made breaking changes to its Channel 9 service.",
i = "See <https://docs.microsoft.com/en-us/teamblog/channel9joinedmicrosoftlearn>."
),
id = "channel_9"
)

ratio <- match.arg(ratio)
dim <- get_width_height(width, height, ratio)

Expand Down
5 changes: 5 additions & 0 deletions R/vembedr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@
#' @docType package
#' @name vembedr-package
NULL

## usethis namespace: start
#' @importFrom lifecycle deprecated
## usethis namespace: end
NULL
9 changes: 3 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ In this verison, five services are supported:

- YouTube
- Vimeo
- Microsoft Channel 9 (including UseR! 2016 and 2017 videos).
- Box
- Microsoft Stream

## New to version 0.1.4
## New to version 0.1.5

- new functions to help you format: `use_rounded()`, `use_align()`, and `use_bs_responsive()`.
- new services supported:
- Box, using `embed_box()`
- Microsoft Stream, using `embed_msstream()`
- updated embedding code to comport with new Pandoc.
- deprecated Microsoft Channel 9 (including UserR! 2016 & 2017)), as service is deprecated.

## Installation

Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ this verison, five services are supported:

- YouTube
- Vimeo
- Microsoft Channel 9 (including UseR! 2016 and 2017 videos).
- Box
- Microsoft Stream

## New to version 0.1.4
## New to version 0.1.5

- new functions to help you format: `use_rounded()`, `use_align()`,
and `use_bs_responsive()`.
- new services supported:
- Box, using `embed_box()`
- Microsoft Stream, using `embed_msstream()`
- updated embedding code to comport with new Pandoc.
- deprecated Microsoft Channel 9 (including UserR! 2016 & 2017)), as
service is deprecated.

## Installation

Expand Down
51 changes: 8 additions & 43 deletions man/embed.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions man/embed_channel9.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/figures/lifecycle-archived.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions man/figures/lifecycle-defunct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions man/figures/lifecycle-deprecated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading