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

embedded Web render component?

Does the Roku have a Component for rendering a Web page? I don't really mean full "HTML5", Javascript interpreter, plug-in support, and so on. I just mean something like a lot of other widget toolkits have: a "panel" that internally uses freely-available Web rendering code (WebKit?) to load and display HTML/CSS (and the images referenced in that page). Given the resolutions on the Roku, the accessed pages would probably need to be specifically designed to show up well, maybe by checking the user agent of the request.

With this component, it could be easier to adapt content to show on the Roku. I suppose another possibility is to have some server code that would "proxy" in the sense of rendering the Web content and sending it back as a snapshot image for the Roku on an imagecanvas.
0 Kudos
1 REPLY 1
choco
Channel Surfer

Re: embedded Web render component?

I had some success coming up with a bash script on my Ubuntu computer to do the "proxy-rendering" task. It uses system packages cutycapt and imagemagick. For testing on my home network I ran "webfsd" from the webfs system package (and poked the right hole in the computer firewall). I'm thinking a script like this would be automatically run periodically, like once every ten minutes, or run from the command line immediately if necessary.


#!/bin/bash
SERVE_DIR=~/Documents
MAX_INDEX=1
URLS=("http://news.yahoo.com/"
"http://www.google.com/")
PICS=("yahoo_news"
"goog")

for ((i = 0; i <= MAX_INDEX; i++)); do
cutycapt --url=${URLS[i]} --out=/tmp/${PICS[i]}.orig.png
convert -gravity North -crop 640x480-0-0 /tmp/${PICS[i]}.orig.png $SERVE_DIR/${PICS[i]}.png
done
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.