ooshwa
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2014
11:25 AM
Re: Need help with Roku2 HLS : error 403
sheetaloza
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2014
03:41 AM
Re: Need help with Roku2 HLS : error 403
I had similar issue, where I wanted to access protected stream urls by making two api calls. First was the login, which will generate the cookie and using that cookies I need to make play api call to get the stream. I struggled for couple of hours and then found this solution (with the help of my colleague).
Order of the AddHeader and enableCookies, matters a lot. I had the order other way round and it always slapped me with 403 (forbidden) error cause cookies were not set to the next http GET request.
Dont forget to EnableCookies on your video player as well as they both (roUrlTransfer and roVideoPlayer) shares the same inteface ifHttpAgent.
function requestData(port as Object, url as String, cookie="" as Dynamic) as Object
request = createObject("roUrlTransfer")
request.setPort(port)
request.setUrl(url)
if cookie <> "" then
request.addHeader("Cookie", cookie)
end if
request.setCertificatesFile("common:/certs/ca-bundle.crt")
request.initClientCertificates()
request.enableCookies()
request.enableFreshConnection(true)
request.retainBodyOnError(true)
request.asyncGetToString()
return request
End Function
Order of the AddHeader and enableCookies, matters a lot. I had the order other way round and it always slapped me with 403 (forbidden) error cause cookies were not set to the next http GET request.
Dont forget to EnableCookies on your video player as well as they both (roUrlTransfer and roVideoPlayer) shares the same inteface ifHttpAgent.
- « Previous
- Next »