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")
An htmltools::tagList() with the HTML dependencies required for
webcam.
Width and height of the video pane in absolute CSS units,
i.e. as 200 or "200px".
Margin around the video pane in CSS units.
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().
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.
The webcam extension is based on the original webcam implementation by Yihui Xie, author of xaringan.