R Shiny - Audio Playback
For this question, I'm using library('shiny') library('tuneR') library('markdown') though I'm sure only shiny is relevant. Per the Shiny tag glossary, I should be able to use tags
Solution 1:
Solution here. Technically this was written in the Shiny tag glossary - though it was easy to miss. The www sub-directory must be in the present working directory for this to operate correctly.
To be really clear, if your pwd is "c:\dir", then a directory "c:\dir\www" must contain the audio files to be played, and the tag would be written as shown in the glossary:
tags$audio(src = "sound.mp3", type = "audio/mp3", autoplay = NA, controls = NA)
it works for wav files too
tags$audio(src = "sound.wav", type = "audio/wav", autoplay = NA, controls = NA)
Post a Comment for "R Shiny - Audio Playback"