webcam: Webcam

webcamR Documentation

Webcam

Description

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.

Usage

use_webcam(width = 200, height = 200, margin = "1em")

html_dependency_webcam(width = 200, height = 200, margin = "1em")

Arguments

width, height

Width and height of the video pane in absolute CSS units, i.e. as 200 or "200px".

margin

Margin around the video pane in CSS units.

Details

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.

Value

An htmltools::tagList() with the HTML dependencies required for webcam.

Functions

  • 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().

References

The webcam extension is based on the original webcam implementation by Yihui Xie, author of xaringan.

Examples

use_webcam()


xaringanExtra documentation built on May 29, 2024, 4:17 a.m.