Change the state of the video player from the server.
playVideo, pauseVideo and stopVideo will all be applied to the current video.
changeVideo will update the track to the URL or file specified.
updatePlaybackRate will change how fast the video is playing.
playVideo(id, session = getDefaultReactiveDomain())
pauseVideo(id, session = getDefaultReactiveDomain())
stopVideo(id, session = getDefaultReactiveDomain())
seekVideo(id, seek, session = getDefaultReactiveDomain())
changeVideo(id, files, format = NULL, session = getDefaultReactiveDomain())
updatePlaybackRate(id, playrate = 1, session = getDefaultReactiveDomain())ID of the video to update
Shiny session
Time (in seconds) to set the position of the track
A vector of file paths or URLs pointing
An optional list of formats of video
Speed of playback of the video. Default is set to 1 (normal speed)
Updates the the state of the specified video in the shiny application.
if (interactive()) {
library(shiny)
ui <- fluidPage(
title = "howler.js Player",
video(
"https://vjs.zencdn.net/v/oceans.mp4",
elementId = "video"
),
actionButton("pause", "Pause Video")
)
server <- function(input, output) {
observeEvent(input$pause, pauseVideo("video"))
}
runShiny(ui, server)
}