mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-12-26 07:55:22 +00:00
33 lines
790 B
Plaintext
33 lines
790 B
Plaintext
function VideoPlayer(scene, id)
|
|
video = scene.createChild("Video")
|
|
content = VideoContent(id)
|
|
|
|
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
|
|
|
|
' I'm not super happy that I'm basically re-implementing APIRequest
|
|
' but for a ContentNode instead of UrlTransfer
|
|
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
|