| Title: | Multimedia Input/Output Controls for Shiny |
|---|---|
| Description: | What the package does (one paragraph). |
| Authors: | Joe Cheng [aut, cre] |
| Maintainer: | Joe Cheng <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9000 |
| Built: | 2026-05-12 06:59:05 UTC |
| Source: | https://github.com/posit-dev/shinymedia |
Create an audio spinner
audio_spinner( ..., src = NULL, con = NULL, rpm = 10, gap = pi/5, stroke = 2.5, min_radius = 30, radius_compression = 0.8, radius_overscan = 1.1, steps = 2, blades = 3, width = "125px", height = "125px", autoplay = TRUE, autodismiss = FALSE, class = "mx-auto" )audio_spinner( ..., src = NULL, con = NULL, rpm = 10, gap = pi/5, stroke = 2.5, min_radius = 30, radius_compression = 0.8, radius_overscan = 1.1, steps = 2, blades = 3, width = "125px", height = "125px", autoplay = TRUE, autodismiss = FALSE, class = "mx-auto" )
... |
Additional attributes for the spinner, to be added directly to the |
src |
The source URL or URI for the audio file. This should be used for remote resources
or data URIs. If provided, this takes precedence over |
con |
An optional connection object or file path for local audio files. This is ignored
if |
rpm |
The speed of the spinner, in clockwise revolutions per minute. Default is 10 RPM. Use 0 to disable rotation, or a negative value to rotate counter-clockwise. |
gap |
The gap between the blades of the spinner, in radians. Default is pi/5, or 36°. |
stroke |
The stroke thickness of the individual arcs that make up each blade of the spinner, in pixels. Default is 2.5. |
min_radius |
The radius of the spinner when there is only silence, in pixels. Default is 30. |
radius_compression |
The raw |
radius_overscan |
Use this parameter to set the maximum possible radius of the spinner, relative to the width/height of the container. Default is 1.1, meaning the spinner radius will be scaled such that at maximum amplitude, it will be 10% larger than the container (the spinner blades will be clipped). Use larger values if you're expecting generally quiet audio. |
steps |
The number of concentric arcs that make up each blade of the spinner, not including the central circle. Default is 2. |
blades |
The number of blades in the spinner. Default is 3. Set to 0 to use concentric circles instead of blades. |
width |
The width of the spinner in CSS units. Default is "125px". |
height |
The height of the spinner in CSS units. Default is "125px". |
autoplay |
Whether to autoplay the audio. Default is TRUE. Note that many browsers will not allow autoplaying audio without user interaction; if autoplay fails, the spinner will show a tooltip instructing the user to tap or click to start the audio. |
autodismiss |
Whether to remove the spinner after the audio finishes playing. Default is FALSE. |
class |
The class of the spinner. Default is "mx-auto" which horizontally centers the element inside its container (assuming Bootstrap is loaded). |
An HTML tag object representing the audio spinner.
# Using a URL audio_spinner(src = "https://example.com/audio.mp3", rpm = 15, width = "200px", height = "200px") # Using a local file audio_spinner(con = "path/to/local/audio.mp3", rpm = 20, width = "150px", height = "150px")# Using a URL audio_spinner(src = "https://example.com/audio.mp3", rpm = 15, width = "200px", height = "200px") # Using a local file audio_spinner(con = "path/to/local/audio.mp3", rpm = 20, width = "150px", height = "150px")
A video clip input control that records short videos from webcam
input_video_clip( inputId, reset_on_record = TRUE, mime_type = NULL, video_bits_per_second = NULL, audio_bits_per_second = NULL, ... )input_video_clip( inputId, reset_on_record = TRUE, mime_type = NULL, video_bits_per_second = NULL, audio_bits_per_second = NULL, ... )
inputId |
The input slot that will be used to access the value. |
reset_on_record |
Whether to reset the video clip input value when recording starts. If TRUE, the video clip input value will become NULL at the moment the Record button is pressed; if FALSE, the value will not change until the user stops recording. Default is TRUE. |
mime_type |
The MIME type of the video clip to record. By default, this is NULL, which means the browser will choose a suitable MIME type for video recording. Common MIME types include 'video/webm' and 'video/x-matroska'. |
video_bits_per_second |
The target video bitrate in bits per second. By default, this is NULL, which means the browser will choose a suitable bitrate for video recording (according to the spec, 2,500,000). This is only a suggestion; the browser may choose a different bitrate. |
audio_bits_per_second |
The target audio bitrate in bits per second. By default, this is NULL, which means the browser will choose a suitable bitrate for audio recording. This is only a suggestion; the browser may choose a different bitrate. |
... |
Additional parameters to pass to the underlying HTML tag. |
A video clip input control that can be added to a UI definition.
Create HTML dependency for multimodal component
multimodal_dep()multimodal_dep()