webcam | R Documentation |
Add a live video of your webcam into your slides (in your own browser only). Useful when you are presenting via video conference to include your video, or when you are recording a class or lecture.
use_webcam(width = 200, height = 200, margin = "1em")
html_dependency_webcam(width = 200, height = 200, margin = "1em")
width , height |
Width and height of the video pane in absolute CSS units,
i.e. as |
margin |
Margin around the video pane in CSS units. |
To add webcam to your xaringan presentation, add the following code chunk to your slides’ R Markdown file.
```{r} xaringanExtra::use_webcam() ```
Inside your slides, press w to turn the webcam on and off, or press Shift + W to move the video to the next corner. You can also drag and drop the video within the browser window.
An htmltools::tagList()
with the HTML dependencies required for
webcam.
use_webcam()
: Add the webcam extension to your slides
html_dependency_webcam()
: Returns an htmltools::htmlDependency()
with the webcam
dependencies. Most users will want to use use_webcam()
.
The webcam extension is based on the original webcam implementation by Yihui Xie, author of xaringan.
use_webcam()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.