shinymedia is a Python and R package that provides Shiny UI controls for recording and playing back media.
At this time it includes two components:
input_video_clip
for recording video clips using attached camerasaudio_spinner
for playing back audio with a spinning visualization
You can see these two components in action together in our live demo (source code), or keep reading.
From PyPI:
pip install shinymedia
Or to install the latest from GitHub:
pip install "shinymedia @ git+https://github.com/posit-dev/shinymedia?subdirectory=python-package"
From CRAN:
install.packages("shinymedia") # Not published yet
Or to install the latest from GitHub:
pak::pak("posit-dev/shinymedia/r-package")
See the docs website.
To develop the JavaScript components, you will need to have Node.js installed. Then, npm install
in this directory to install dependencies.
After making changes to the TypeScript code in srcts, run npm run build
to compile to JavaScript (or npm run watch
to automatically recompile on changes). You can also run npm run typecheck
to check for TypeScript type errors.
To develop the Python package, you can install it in editable mode:
pip install -e python-package
To build the documentation, first install additional dependencies:
pip install -e "python-package[docs]"
Then:
cd quarto
quartodoc build # Build reference docs
quarto preview # Serve the docs locally