Forum Discussion

Riderick's avatar
Riderick
Reel Rookie
2 years ago
Solved

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

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!

  • 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! 

  • 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!