serialise_file_input = function(){
yt_path = list.files(pattern = '.mp4')
# yt_path_cleaned = gsub("[[:punct:]]", "", yt_path) %>% gsub(' ', '_', .) %>% tolower()
yt_path_cleaned = 'pre_precessing.mp4'
file.rename(yt_path, yt_path_cleaned)
system(glue::glue('ffmpeg -i {yt_path_cleaned} preview_test.mp3'))
#system(glue::glue('ffmpeg -i {yt_path_cleaned} -vn -acodec pcm_s16le -ar 44100 -ac 2 preview_test.wav'))
file.copy('preview_test.mp3', 'inst/app/www/preview_test.mp3', overwrite = TRUE)
unlink(c(yt_path_cleaned, 'preview_test.mp3'))
}
sendCustomMessage = function(type, message) {
data <- list()
data[[type]] <- message
private$sendMessage(custom = data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.