Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

HTTPS image url in Poster node

I'm using the sample code provided by Roku SDK. 
In the scene graph xml, I have the following Poster node declared
<Poster id="cover" loadDisplayMode="scaleToZoom"/>




then in the br initialization code I tried to set the ca cert bundle for any https image urls. However, my https images do not show up consistently, but http images show up fine.  Sometimes when I launch the app, no HTTPS images load, and then I relaunch the app, the same images might occur. This seems to happen randomly with the same code ... 
function Init()
   m.cover = m.top.findNode("cover")
   m.cover.SetCertificatesFile("common:/certs/ca-bundle.crt") 
   m.cover.AddHeader("developer ID", "")   
   m.cover.InitClientCertificates()

   m.isLandScapeMode = true
   
   m.itemInfo       = m.top.findNode("itemInfo")
   m.title          = m.top.findNode("title")
   m.description    = m.top.findNode("description")
   m.itemDetails    = m.top.findNode("itemDetails")
   m.backgroundPoster = m.top.findNode("backgroundPoster")
   
   m.cover.observeField("loadStatus", "OnCoverLoadStatusChanged")
 end function



Any ideas?

Thanks!
0 Kudos
6 Replies
Highlighted
Level 10

Re: HTTPS image url in Poster node

The good news is that rOS 7.2 has introduced this:
"HTTPS support is now available for all Scene Graph nodes (roHttpAgent)."

The bad news is that i am not quite clear how this works? In particualr since https://sdkdocs.roku.com/display/sdkdoc/roHttpAgent say that one is already created and set for all roSgNodes already. This is a shot in the dark, but it appears that ifHttpAgent listed to be supported by roSGNode. Now, for the tricky part - both of these combined, it seems to me it should be as easy for you as doing
m.top.SetCertificatesFile("common:/certs/ca-bundle.crt")
m.top.InitClientCertificates()
in the main scene init and in result all your other nodes should start automaGically working with https too!

PS. let me know if that works?
0 Kudos
Highlighted
Level 7

Re: HTTPS image url in Poster node

thanks for the reply. I tried it in HomeScene.brs which is my main scene.

 I simply did what you asked in the init function:
sub init()
    m.top.SetCertificatesFile("common:/certs/ca-bundle.crt")
    m.top.InitClientCertificates()


I'm still not getting thumbnails for the most of time. Like I mentioned before, there are rare times when I relaunch the app and somehow https images started showing, and the next time they don't anymore... All these images I've verified to be working on a desktop browser. 

I wonder if this inconsistency is related to developer mode? 
0 Kudos
Highlighted
Level 7

Re: HTTPS image url in Poster node

actually I just updated the OS to 7.5, now it seems to be working consistently. Thanks for your help!
0 Kudos
Highlighted

Re: HTTPS image url in Poster node

Hello, I tried the same thing to load https image in Roku. Currently, I used the latest 9.3.0 software version.

sub init()
m.poster = m.top.findNode("testPoster")
m.poster.SetCertificatesFile("pkg:/certificates/cacert.crt")
m.poster.InitClientCertificates()
'm.top.SetCertificatesFile("common:/certs/ca-bundle.crt")
'm.top.InitClientCertificates()
'm.poster.SetCertificatesFile("common:/certs/ca-bundle.crt") 
'm.poster.AddHeader("developer ID", "")   
'm.poster.InitClientCertificates()
m.poster.uri="https://simultv.com:1400//nodeapi/Channels/file-1591699694712.jpg"
m.poster.failedBitmapUri="pkg:/images/splash_hd.jpg"
m.poster.observeField("loadStatus","OnLoadStatusChanged")
m.top.SetFocus(true)
End sub

function OnLoadStatusChanged()
?"m.poster.loadStatus : "m.poster.loadStatus
end function

Here, I checked with the other https Url. It's Working Fine. But I don't know why it's a problem with my https URL. My https Url Without adding any certificate, working fine for all other platforms like Android, IOS, Amazone Fire Stick, and also Google Chrome. Does anyone know what is the reason for not loading the https URL?

0 Kudos
Highlighted
Level 7

Re: HTTPS image url in Poster node

Have you checked the SSL certificate for that particular resource?  This could be the culprit:

https://community.roku.com/t5/Roku-Developer-Program/Potential-service-disruption-Upcoming-SSL-certi...

0 Kudos
Highlighted

Re: HTTPS image url in Poster node


@cranklin wrote:

Have you checked the SSL certificate for that particular resource?  This could be the culprit:

https://community.roku.com/t5/Roku-Developer-Program/Potential-service-disruption-Upcoming-SSL-certi...


I saw this before. I think this issue is another issue. Because the normal https with the same Domain(https://simultv.com/ace.png) It's working fine. If the SSL issue then also will not load with normal HTTPS stream. I deep analyze with my issue. I found, Domain running with Port, It's not loaded in Roku. Without Port the same domain. it's working fine. But, I don't know clearly if this is an SSL problem or something else. I never used an SSL certificate before on my channels.

0 Kudos