jf-roku/source/VideoPlayer.brs
2019-02-10 13:15:20 -06:00

36 lines
710 B
Plaintext

function VideoPlayer(id)
content = VideoContent(id)
video = m.scene.findNode("VideoPlayer")
video.content = content
video.setFocus(true)
video.control = "play"
return video
end function
function VideoContent(id) as object
content = createObject("RoSGNode", "ContentNode")
meta = ItemMetaData(id)
content.title = meta.Name
server = get_setting("server")
content.url = Substitute("{0}/emby/Videos/{1}/stream.mp4", server, id)
content.url = content.url + "?Static=true"
content = authorize_request(content)
if server_is_https() then
content.setCertificatesFile("common:/certs/ca-bundle.crt")
end if
return content
end function