Forum Discussion

choco's avatar
choco
Channel Surfer
14 years ago

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.

1 Reply

  • choco's avatar
    choco
    Channel Surfer
    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