Using this package, you can embed videos into RMarkdown documents and Shiny apps for videos from:
The links above are associated with the embedding API for each of the services; these are the APIs wrapped by the
embed() functions in this packages. In many cases it may be easier to embed by using only URL of the page your video is on, using
To set the start time, or to change the formatting, check out the
use_*() functions in
Although a URL can be long and awkward, it will get the job done. If the URL is from one of the supported services, it should just work:
If you would like to generate more-concise code using the URL, you can use the
You can get your video’s identifier by inspecting its URL at YouTube - you can use the short version, as well:
The identifier is the last part of the URL. To embed this video:
For Vimeo, the identifier is also included in the standard URL:
The Vimeo identifier is the path of the URL:
The UseR! 2016 and 2017 videos are hosted on Microsoft’s Channel 9 service, motivating this embed function.
Personal note: one of the things I want to well-and-truly understand (along with non-standard evaluation) is monads. I understand it to be a useful construct for managing side-effects, but true understanding escapes me. This is a wonderful presentation; it gets me 95% of the way there (I think), so maybe repeated viewings will get me sufficiently close.
Here’s the URL:
The identifier is the path of the URL,
Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads, which you can express as a string:
Alternatively, you can express this as a vector of strings:
At UseR! 2016, Rick Becker gave a wonderful talk on the history of the S language:
For a UseR!2016 (or 2017) video, the identifier is the last component of path of the URL, in this case:
Forty-years-of-S. To embed the video:
To share a video on Box, the video file itself will have to be shared. From the Box web-interface, you can do this by clicking the Share button at the top-right corner of your file’s web-page. Then create a Share Link:
Then, you need to capture some information about the embed-link itself, either the URL or the
id. Please note that you need to work with the “ugly” URL, not a custom URL:
You can do the same thing using the
embed_box() function and the
id. The Box identifier is the last part of the path, in this case
If you are using a corporate instance of Box, and use the
embed_box() function, you will also have to specify the
custom_domain. For example, if your URL starts with
"https://acme.app.box.com", then your
Microsoft Stream is a service offered for use by (large) organizations so that they may share videos internally to their organization. As such, this functionality may have limited appeal.
The identifier is the last part of the path of the URL, in this case
Because this video is internal to an organization, it will likely not play for you.