howler-shiny | R Documentation |
Output and render functions for using howler within Shiny applications and interactive Rmd documents.
howlerOutput(outputId)
renderHowler(expr, env = parent.frame(), quoted = FALSE)
outputId |
output variable to read from |
expr |
An expression that generates a howler |
env |
The environment in which to evaluate |
quoted |
Is |
An output or render function that enables the use of the widget within Shiny applications.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.