Roku Developer Program

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

SceneGraph URL backup

Hello, with the SceneGraph channel we have to change the URL to our own file on line 22 but I was wondering how do I edit that so that if one link is down then to check another? Thanks
  'Variables for storing node selected and position
  m.node  = invalid
  m.array = invalid
  m.UriHandler  = createObject("roSGNode","UriHandler")
  url = "" ' < ------ Line 22: URL to change to our own server
  makeRequest({}, url, "GET", 0, "")
0 Kudos
3 Replies
Level 11

Re: SceneGraph URL backup

in the onError callback make a new request with the updated URL.  if you use the same callback for both, put a counter or flag to prevent an infinite loop in the event your backup URL is also erroring.

Looking at the project you're using, ... andler.brs
there's no failure callback so you'd want to trigger this on line 166, which appears to happen after 3 failed attempts.
0 Kudos
Level 9

Re: SceneGraph URL backup

Thanks for the info. Now if I just knew how to do that Smiley Sad
0 Kudos
Level 9

Re: SceneGraph URL backup

Some coding help here would be much appreciated. Thank you
0 Kudos