Simple shiny audio file example does not render -


i'm having difficulty basic set-up audio , video tags in shiny. seems files in correct locations, no output being rendered , many of other inputs (such displaying controls) ignored.

here simple reproducible example. in working directory source file stored have www/clip.mp3 file (any file replicate issue).

library(shiny)  app <- list(ui = shinyui(fluidpage(     textoutput('text'),     tags$audio(src = "clip.mp3", type = "audio/mp3",                 autoplay = true, controls = true) ) ),      server = shinyserver(function(input, output) {         output$text <- rendertext({             c(getwd(), file.exists(paste0(getwd(), '/www/clip.mp3')))             })     }) ) runapp(app) 

for me, output shows working/dir/path true, nothing else. looks in correct position according documentation (http://shiny.rstudio.com/articles/tag-glossary.html), yet nothing being rendered audio tag (even requested controls).

everything fine program. problem found running rstudio viewer, after launching on new window chrome works well. also, advice, use addresourcepath function use different directory instead of /www. see example below.

addresourcepath("audio", "c:/temp")   library(shiny)  runapp(list(   ui = shinyui(fluidpage(     tags$audio(src = "audio/clip.mp3", type = "audio/mp3",                 autoplay = true, controls = true)   )),    server = shinyserver(function(input, output) {   }) )) 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -