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: 
Riderick
Reel Rookie

set new roHttpAgent object on the run or something that meets.

Jump to solution

Hi!, I have something like this on my scene (It plays normally a Dash Stream)

 

sub change()
    httpAgent = CreateObject("roHttpAgent")
    httpAgent.SetCertificatesFile("common:/certs/ca-bundle.crt")
    httpAgent.AddHeader("xxx", "yyy")
    httpAgent.InitClientCertificates()
    m.video.setHttpAgent(httpAgent)
end sub

 

 

The problem is that... my Video is already playing normally but i would like to set a new httpAgent object on the run/fly (without interrupt the stream) (change the old one by the new one), i use a timer for that, but the moment i do that i get an error message (i think that not always is the same) when it enters here.

 

m.video.setHttpAgent(httpAgent)

 


m.video.state gives error and then it finish the stream:

 

buffer:loop:demux.dash:Manifest update failed 30 times:extra:etype:buffer

 



Maybe that error is not important but i should set the httpAgent in another way? maybe?

what could be an alternative that it may work? if that make sense.

Thank you!

0 Kudos
1 Solution

Accepted Solutions
Riderick
Reel Rookie

Re: set new roHttpAgent object on the run or something that meets.

Jump to solution

It was easy... what i was just to do is (to reuse the same roHttpAgent object i create before) i believe it broke the SSL HTTPS connection or something near that topic.

httpAgent = m.video.getHttpAgent()
httpAgent.xxx("my_change")
m.video.setHttpAgent(httpAgent)


Done! 

View solution in original post

1 REPLY 1
Riderick
Reel Rookie

Re: set new roHttpAgent object on the run or something that meets.

Jump to solution

It was easy... what i was just to do is (to reuse the same roHttpAgent object i create before) i believe it broke the SSL HTTPS connection or something near that topic.

httpAgent = m.video.getHttpAgent()
httpAgent.xxx("my_change")
m.video.setHttpAgent(httpAgent)


Done! 

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.