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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trying to communicate with/display a web page on a TV.

Someone at work wants to see if I can create an app that displays the company's website for visitors. I have some experience with programming languages but I'm not familiar with brightscript and neither is the person who assigned the project, so we're a bit stuck.

It seems like I'm supposed to use the "roUrlTransfer" object to communicate with the website. Unfortunately I don't have the link to my website at the moment, and none of the examples I find online seem to work. The thing I hear the most is that this object needs to be put in a task node, but the sample task on the roku website doesn't seem to work either. I'm pretty sure I'm doing something wrong.

My questions are:

Where does a task node go? Do I put it in the main file, the source component, or do I put it in its own file (like an xml file)? If it doesn't go in the main file, how do I call it in the main file?

Once I get a roUrlTransfer request, which the tutorials say to do this:

request = CreateObject("roUrlTransfer")
request.SetUrl("(url here)")
html = request.GetToString()

 then what do I do? I'm trying to display a simple web service such as a weather app.

0 Kudos
Community Streaming Expert

Re: Trying to communicate with/display a web page on a TV.

While what you're trying to do may seem simple, it's actually very difficult.  Rokus have no ability to parse HTML (or limited at best).  Once your last statement is executed you'll have the HTML in the variable html.  You can print it in the debug console to verify that you got it.  As you can imagine, that's not very useful.  You may want to rethink this project.  Retrieving HTML isn't all that helpful.  You really want to just retrieve the raw data your website uses to create its display and use Roku components (which are nothing like web components) to display it.

Good luck.  You'll need it.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos