A more user friendly way to adjust the volume of the howler
than by using buttons. There are
still volume up/down buttons, but a slider can be moved up/down as required.
howlerVolumeSlider(id, volume = 1, button = TRUE)
ID given to the volume slider. For it to work with the howler
, the ID
must match that of the howler
.
Initial volume to set the player at. Defaults at 100%
Logical, should a mute toggle button be included next to the slider? Default is TRUE
A volume slider with a howlerVolumeDownButton
and a howlerVolumeUpButton
either side.
If using howlerVolumeSlider
, avoid using the volume buttons, as this will cause duplicate IDs to appear in the
shiny application and prevents the slider from working properly.
if (interactive()) {
library(shiny)
ui <- fluidPage(
title = "howler.js Player",
howler(elementId = "sound", "audio/sound.mp3"),
howlerPlayPauseButton("sound"),
howlerVolumeSlider("sound")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}