Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rholicopp
Visitor

Roku bug: Streaming hls to Video RSG component, cert authorization not sent

Hello, 
 I am trying to switch from using the roVideoScreen element to using an embedded Video element(RSG)

The https server i am streaming from needs certificate authorization to be sent up, but it is not being sent up when using the new Video element (https://sdkdocs.roku.com/display/sdkdoc/Video)

 I am setting the certificate file and I believe i am setting everything needed for the Video element, however playback is failing
m.video.errorCode               -3
An unexpected problem (but not server timeout or HTTP error) has been detected.


The same error happens when I use the roVideoScreen and don't call video.SetCertificatesFile(getCertFilename())
function setVideo() as void
m.video = m.top.findNode("musicvideos")
m.video.observeField("state", "stateChanged")

httpAgent = CreateObject("roHttpAgent")
m.video.setHttpAgent(httpAgent)

videoContent = createObject("RoSGNode", "ContentNode")
'THIS IS HTTPS m3u8
videoContent.url = m.top.item.StreamUrl
'below WORKS
'videoContent.url = "https://bitmovin-a.akamaihd.net/content/playhouse-vr/m3u8s/105560.m3u8"
videoContent.title = m.top.item.Title
videoContent.streamformat = "hls"
videoContent.SwitchingStrategy = "full-adaptation"
subtitle_config = {
TrackName: "eia608/1"

videoContent.SubtitleConfig = subtitle_config
videoContent.HttpSendClientCertificates = true
videoContent.HttpCertificatesFile = getCertFilename()

headers = []
headers.push("x-roku-reserved-dev-id:")
videoContent.HttpHeaders = headers

m.video.content = videoContent

m.video.control = "play"
end function


Does anyone have any ideas why the certificate authorization would not be sent to the server?

Is this a roku bug that anyone is aware of? Can I log this somewhere, so Roku can investigate?
0 Kudos
5 REPLIES 5
rholicopp
Visitor

Re: Streaming hls to Video RSG component, playback fails

Bump, we are really in need of assistance from a Roku contact. Thanks

A similar question has come up before (https://forums.roku.com/viewtopic.php?t=93082) and we are just getting ignored.
I have found the way the docs specify how to do it, but they DO not work, this is a serious issue!

To be clear, the issue is, this snippet is NOT sending certificate authorization to the server (tested on roku os 7.5 and 7.6 beta)


  •  videoContent.HttpSendClientCertificates = true

    videoContent.HttpCertificatesFile = "pkg:/certs/lab/gd_bundle-g2-g1.crt"

    httpAgent = CreateObject("roHttpAgent")

    m.video.setHttpAgent(httpAgent)
     
    m.video.content = videoContent

    m.video.control = "play"

0 Kudos
belltown
Roku Guru

Re: Streaming hls to Video RSG component, playback fails

"rholicopp" wrote:
Bump, we are really in need of assistance from a Roku contact. Thanks

A similar question has come up before (https://forums.roku.com/viewtopic.php?t=93082) and we are just getting ignored.
I have found the way the docs specify how to do it, but they DO not work, this is a serious issue!

To be clear, the issue is, this snippet is NOT sending certificate authorization to the server (tested on roku os 7.5 and 7.6 beta)


  •  videoContent.HttpSendClientCertificates = true

    videoContent.HttpCertificatesFile = "pkg:/certs/lab/gd_bundle-g2-g1.crt"

    httpAgent = CreateObject("roHttpAgent")

    m.video.setHttpAgent(httpAgent)
     
    m.video.content = videoContent

    m.video.control = "play"


I don't see why you're creating a brand new roHttpAgent object, then assigning it to your Video node. I don't think you need to do that. The Video node creates its own roHttpAgent. All you should need to do is set the relevant HTTPS content meta-data attributes.

Try removing these lines:
httpAgent = CreateObject("roHttpAgent")

m.video.setHttpAgent(httpAgent)

If it doesn't work then most likely it's because of what you have in your certificates file.
0 Kudos
rholicopp
Visitor

Re: Streaming hls to Video RSG component, playback fails

"belltown" wrote:
"rholicopp" wrote:
Bump, we are really in need of assistance from a Roku contact. Thanks

A similar question has come up before (https://forums.roku.com/viewtopic.php?t=93082) and we are just getting ignored.
I have found the way the docs specify how to do it, but they DO not work, this is a serious issue!

To be clear, the issue is, this snippet is NOT sending certificate authorization to the server (tested on roku os 7.5 and 7.6 beta)


  •  videoContent.HttpSendClientCertificates = true

    videoContent.HttpCertificatesFile = "pkg:/certs/lab/gd_bundle-g2-g1.crt"

    httpAgent = CreateObject("roHttpAgent")

    m.video.setHttpAgent(httpAgent)
     
    m.video.content = videoContent

    m.video.control = "play"


I don't see why you're creating a brand new roHttpAgent object, then assigning it to your Video node. I don't think you need to do that. The Video node creates its own roHttpAgent. All you should need to do is set the relevant HTTPS content meta-data attributes.

Try removing these lines:
httpAgent = CreateObject("roHttpAgent")

m.video.setHttpAgent(httpAgent)

If it doesn't work then most likely it's because of what you have in your certificates file.

Thank you for the response, Belltown.
  I have tried removing my own httpagent as well,  ive tried so many combinations 🙂 None of em work, it seems like the roku is not setup correctly to send them. 
  I would imagine since the headers are not being sent either, that its more than the certificates, but I'm in the dark here.
0 Kudos

Re: Roku bug: Streaming hls to Video RSG component, cert authorization not sent

try this approach...

    m.httpAgent = CreateObject("roHttpAgent")
    m.httpAgent.SetCertificatesFile ("common:/certs/ca-bundle.crt")
    m.httpAgent.EnableCookies()

    m.videoPlayer.setHttpAgent(m.httpAgent)
0 Kudos
kmikz
Binge Watcher

Re: Roku bug: Streaming hls to Video RSG component, cert authorization not sent

What worked for me was:

content = createObject("RoSGNode","ContentNode")
content.streamFormat = "hls"
content.title = title
content.description = description
content.url = url
content.HttpSendClientCertificates = true
content.HttpCertificatesFile = "common:/certs/ca-bundle.crt"

m.videoPlayer.content = content

m.videoPlayer.EnableCookies()
m.videoPlayer.SetCertificatesFile("common:/certs/ca-bundle.crt")
m.videoPlayer.InitClientCertificates()

m.videoPlayer.control = "play"
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.