Output and render functions for using howler within Shiny applications and interactive Rmd documents.

howlerOutput(outputId)

renderHowler(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

expr

An expression that generates a howler

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

Value

An output or render function that enables the use of the widget within Shiny applications.

Examples

if (interactive()) {
  library(shiny)

  ui <- fluidPage(
    title = "howler.js Player",
    howlerOutput("howler"),
    howlerPlayPauseButton("howler")
  )

  server <- function(input, output) {
    output$howler <- renderHowler(howler(c(sound = "audio/sound.mp3")))
  }

  shinyApp(ui, server)
}