1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enter Webz beta release - web browser for the TiVo!

Discussion in 'Developers Corner' started by davidblackledge, Jan 6, 2013.

  1. Jan 6, 2013 #1 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    Today I'm announcing "Enter Webz" - the world's first web browser for the TiVo DVR.
    This is just a Beta release.

    This release is available for download from http://David.Blackledge.com/tivo/enterwebz.
    More information is in the documentation.

    Just download, unzip, and run the .bat file, then look in "Music, Photos, and More" or "Showcases and Apps" or equivalent, depending on your TiVo model.
    You'll get Enter Webz, and a couple of shortcuts to Google and Archive.org (where you can listen to public domain music, or watch public domain videos and movies on your TV).

    This is free for your personal home use. I plan to set up a fixed-ip server in the future.

    It's ugly and buggy still, but today's the last day of my vacation, so I may not get a chance to work on this for a while.

    Why a web browser for the TiVo DVR?

    Quick lookups

    Google, Definr.com, IMDB, Wikipedia
    One-off pages for other Apps

    Google Authentication for Google APIs (the main inspiration for creating Enter Webz... I used Enter Webz to register Pandora’s activation code on my new TiVo Premiere!)
    Display a related URL for dynamic app content (e.g. from an RSS feed)
    Application help pages
    Instant HME Apps for some websites

    like:
    weather.gov and wunderground.com
    Gmail mobile or Gmail basic html
    Google Voice mobile (mp3 download blocked)
    Google Calendar mobile...hopefully soon
    Facebook mobile
    tivocommunity.com forums!
    Archive.org’s public domain content:
    mp3s ( playlists of live concerts; audio books), texts, videos (classic TV; movies)
    Feedburner XSLT-formatted rss feeds
    xkcd.com
    Launch other HME Apps

    Special URLs launch apps from domain names (vs. static IPs of “Manually add a server”)
    Can be configured to present any URL like it is a stand-alone app.
     
  2. Jan 7, 2013 #2 of 165
    Allanon

    Allanon Member

    580
    0
    Nov 2, 2005
    Very cool!!

    I've only tried it for a few minutes and I can already see this has a lot of potential. This browser is a lot faster than the one built in to my Sony TV especially when viewing YouTube videos.

    I know this is a beta version but thought it might help you to know some of the problems I found. I have a Tivo HD and found that the PIP didn't resize, only the top right corner of the video was visible in the PIP window.

    Also, I got an error when loading some web pages, it states "An error occurred while running the application. Out of memory". I tried reopening EnterWebz on the Tivo but the error occurred again as soon as the application opened. Same happened with all the other applications on the Tivo. I tried shutting down and restarting EnterWebz on my computer but same result. I had to restart the Tivo to clear the error and make it so I could use Tivo apps again.
     
  3. Jan 7, 2013 #3 of 165
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    Never mind, I figured out that it requires Java 1.7.
     
  4. Jan 7, 2013 #4 of 165
    jhilla

    jhilla Guest

    114
    0
    May 13, 2011
    I am simply amazed how fast your browser is on tivo. I was zipping along from Facebook Mobile to flipping in and out of Youtube. However you were motivated, I'm in awe. Thank you soooo much we have been dreaming of this. Dang, now if only I could get my hands on that Qwerty keyboard-remote from Tivo.

    By the way, I went ahead and manually inserted the Java path in your .bat so it would load better in comparison to missing my settings. I had to do the same thing with Streambaby.

    "C:\Program Files (x86)\Java\jre7\bin\java.exe" -Dcom.tivo.hme.sdk.debug.level=0 -cp "EnterWebz.jar;hme-host-sample.jar;hme.jar;bananas.jar;hme-hd-0.4.1.jar;jsoup-1.7.1.jar;cbd.tivo.jar;cbd.tivo.widgetsGadgets.jar;cbd.tivo.icons.jar" com.tivo.hme.host.sample.Main --launcher launcher.txt
     
  5. Jan 7, 2013 #5 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    You're very welcome, and thank you for the compliments.

    I doubt it needs to be higher than 1.5, I'll change my compile configuration.

    most of the speed is thanks to the computer you're running it on ;] ... plus JSoup. I also did a few things to make it more responsive.

    YouTube and Video Player: Thanks to moyekj for just recently figuring out how to launch those.
    If it sees one of the YouTube "watch" URL formats, it launches the built-in YouTube app with that video ID. I need to make it launch the new better quality app on Premieres.
    To deal with large files, if it sees a video/mpeg content type (usually larger files) it launches the Video Player with that URI.
    Note, in the future it will launch ALL video files over 1.1G with Video Player, but short videos will use my in-browser player (in-browser helps because you don't lose browsing history and it supports ASPECT/ZOOM to correct the video display). I need a modification to JSoup to do the size check efficiently, though.

    This is why I released it as a beta! The more I hear, the better it can be! ;]

    PIP is off by default because of this. If PIP stops working...just turn it off and leave it off (maybe try again the next day if you like) - although it works some of the time, it's flakey. When it's working, turning it off then on (SLOW button) gets a blank PIP until you do it again. When it stops working (not scaled) consider everything destabilized until PIP is off - I've had it crash the TiVo for a simple error while the PIP was displaying in a bad state. There is work to do to find out how to cleanly make PIP work consistently like the Premiere does. (although that's through flash so it may not be completely possible in HME).

    Out of Memory: Expect that. That's actually the TiVo running out of memory, not Enter Webz. If you're doing a lot of browsing or just have a crazy big page, we'll likely run out of TiVo memory/views/whatever.
    However, getting "stuck" out of memory I'm going to blame on the broken PIP destabilizing the HME environment... haven't seen this happen myself.

    Good news is, Enter Webz remembers "last visited" so a crash doesn't lose your place.
    Also, I wanted to start pyTiVo archiving with Enter Webz, but accesses to the TiVo web service while running HME is a great way to cause a system crash (perhaps pyTivo could have a mode where it only uses cached information as soon as you start accessing the web interface?)

    You'll also notice inline image failures: since the TiVo is directly loading them, websites that block remote-loading also block them from the TiVo. I'm certain there is a way to give pass-through header info to the TiVo in a createStream request via the TeDict, but my best experiments so far only caused TiVo crashes (which means it tried to interpret something!).
    Google Voice mp3 playing seems to have the same problem.
    Any research in this area would be really helpful! Or just bang on TiVo's door for that one secret.

    Seems I could allow Premiere users to try to launch arbitrary flash files when I find them on a page once I learn a little bit more about that.

    I'm tempted to launch YouTube (and flash) "inline" on the page by using scaling and application-as-Stream, but I don't think that's useful...just cute. (you'd have to "exit" the application to get control back to Enter Webz)

    FYI, when I eventually put it on a server, it will use the Premiere's new "Genre" field so a link-as-app will show up in the "photos" and "music" area or the "other" area (there is a "video" genre, but it doesn't show up anywhere - probably some additional requirements on the TiVo side - more research to do)
     
  6. Jan 7, 2013 #6 of 165
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    The what now?

    I know the Premiere likes to make requests that include "DoGenres=1", but I've never seen anything else about this.
     
  7. Jan 7, 2013 #7 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    ;]
    Notice how the Premiere puts Live365 and Pandora and Photos in one menu, and other apps under Showcases & Apps... that's cause the TiVoConnect response (when DoGenres=1) includes the genres tag with one or more genre tags that contains "photos" "music" "video" or "other"
    Code:
    <Item>
    <Details>
    <ContentType>application/x-hme</ContentType>
    <SourceFormat>x-container/folder</SourceFormat>
    <Title>Photos &amp; Slideshows</Title>
    <Uuid>BBC7824A-40C6-8B61-4D87-6A3D799F365B</Uuid>
    <X-TiVo-TopLevelDisplayOrderHint>50</X-TiVo-TopLevelDisplayOrderHint>
    </Details>
       <Genres>
          <Genre>photos</Genre>
       </Genres>
    <Links>
    <Content>
    <ContentType>application/x-hme</ContentType>
    <Url>https://204.176.49.65:7287/hdphotos-ml_2010.09.13-1339-20100913_134517/1284410719/1355864959-1671224959/clientip_75.161.43.57/</Url>
    </Content>
    <CustomIcon>
    <Url>http://204.176.49.116:7288/hdphotos-ml_2010.09.13-1339-20100913_134517/1284410719/1355864959-1671224959/icon.png</Url>
    </CustomIcon>
    </Links>
    </Item>
    
    (For some reason it also includes ContentType again under the Content tag)

    Anything with "photos" or "music" ends up under that group, "other" under Showcases & Apps, and "video" (if that's the only genre) disappears... Genre "video" is how Netflix, YouTube, Hulu, etc. end up in the two video locations, obviously. To get it to show up, maybe all I have to do is call the app "<Hidden />" or maybe they have a pre-authorized list of UUIDs, or maybe it has to be https.
     
  8. Jan 8, 2013 #8 of 165
    reneg

    reneg Member

    699
    0
    Jun 19, 2002
    Pretty nice. I didn't do much with it other than load it up, but it did seems very responsive.

    For whatever reason, I had to add java to my path before it would run. Maybe the batch file could check for this.

    It didn't show up with the other HME apps on my Tivo HD. The Tivo HD was recording so I didn't reboot it. I moved to a Premiere where it did show up on the HME apps.

    I ran it on smaller tv (about 27") and the text was barely readable. Of course I didn't read the documentation to see if there was a way to change the resolution. I'll play around with it on a larger TV.
     
  9. Jan 8, 2013 #9 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    Yeah...I'm really rusty on batch files... maybe I'll find a good sample on the Internet somewhere ;]
    SD fonts are usually good, and on HD I scale the fonts up slightly since they seemed too small to me, too (on 1080), but that combined with a smaller TV is likely too small, yeah.

    The webpages can be even worse if the specified fonts are very small.
    Change the font scaling by pressing 1-9... 0 goes back to default (which is 5).
    The THUMBtacks screen font doesn't scale...maybe I should use a larger font for HD.

    I plan to add HD/SD screen resolution selection to the menu eventually
    (ASPECT/ZOOM to get the ugly menu page).

    Thanks for trying it out!
     
  10. Jan 9, 2013 #10 of 165
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    I couldn't get Genres to work based on the above (in HME for Python); it just makes the server show up as the IP address, and the apps don't appear. I'd be interested to hear any more info you have about this, and how you found out -- it looks like you intercepted some conversations between the TiVo and tivo.com servers?
     
  11. Jan 9, 2013 #11 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    Let's see... I sort of proxied a connection using my "hme:" protocol setup. I take the two key headers the TiVo sent me and used them in a TiVoConnect request to 204.176.49.116 which gave me the content that I showed in the sample earlier.
    Code:
    /**
     * HTTP Header sent in resource requests by the TiVo with the tsn (context
     * connection attribute "tsn") as value
     */
    public static final String HTTP_HEADER_TIVO_ID = "TiVo_TCD_ID";
    /**
     * HTTP Header sent in resource requests by the TiVo with the TiVo Software
     * Version (Device Info event's "version") as value
     */
    public static final String HTTP_HEADER_TIVO_VERSION = "TiVo_SW_VER";
    
    I had an IP-only problem, too, and eventually figured out I had invalid XML I was generating... it had un-escaped ampersands.
    While trying to fix it, I also added the ?xml at beginning of the file, and Content-Type: text/xml, and that additional <ContentType in the <Content section ...not sure if they're required, though.
    oh yeah, and you HAVE to have a Uuid specified. Current experiments show a random one or a non-standard one works fine, but it won't show up at all without it.
     
  12. Jan 9, 2013 #12 of 165
    jhilla

    jhilla Guest

    114
    0
    May 13, 2011
    Hi David,

    I was running your app this morning and this time "EntertheWebz" was missing the hidden features of the original Youtube and Dominos Pizza that were their day one. Did you revise the list and remove it or did Tivo detect you and delete the entries? Also, I would be interested in activating the switch when hitting zoom from Mobile browser to Desktop Browser. I have a theory if we can trick the majority of domains to be a common browser it may allow more content to be played such as Nickjr, Disney and Crackle.

    Thanks again,
    John
     
  13. Jan 9, 2013 #13 of 165
    Allanon

    Allanon Member

    580
    0
    Nov 2, 2005
    My media server (Serviio) has a webpage that allows browsing and playing videos from an internet browser. I tried accessing it using Enter WebZ but got a blue screen error that kicked me from the app. The error code was 0xffff.

    My launch.txt looks like this:
    Code:
    com.blackledge.david.html.hme.WebBrowserApp
    com.blackledge.david.html.hme.WebBrowserApp http://192.168.1.114:23424/mediabrowser "Media Server"
    
    I also tried using localhost instead of the URL but got the same error. And I tried entering the URL manually from within the browser but the error occurred as soon as it tried to go to the webpage.

    Would this be an URL problem because it's trying to access my local computer or is it a problem with the webpage?

    Attached is the source code for the webpage:
     

    Attached Files:

  14. Jan 9, 2013 #14 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    Yeah...that's a feature ;] The default list of links isn't permanent until you save one of your own. At that time, it saves all the normal links permanently, but it doesn't save the "demo" links which includes those hidden apps. If you delete all your links, it will bring back all the defaults, including the "demo" links.
    The "suggested links" page is meant to hold all these defaults (and additional suggestions), but the wiki site only shows the special app-launching links in "iframes" which Enter Webz doesn't currently support. I'll add another place for the special app-launching links soon.
    I may have it permanently save the "demo" links, too, since it's easy for you to delete them if you don't want them.
    While I'm not 100% sure what you mean, most of the missing content falls under 3 categories: JavaScript, Flash, or Frames.
    • JavaScript will never be supported.
    • Flash MAY be supported on Premieres... though it will be hit-or-miss at best, and most likely won't work almost at all.
    • Frames will eventually be supported.
    Other features like Silverlight and Java Applets will never be supported for sure.

    As far as Zoom...that's currently to open the menu... but I might change that to "info" and use Zoom similar to what you're talking about...it might be a better fit.
     
  15. Jan 9, 2013 #15 of 165
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    Yeah, I had all that. It turned out to be a typo -- I was missing the closing slash. :eek:

    It works! Sort of. (I have huge problems with the HDUI recognizing HME apps in general. Sometimes I have to switch to the SDUI to get them to show up, then back. Still have problems with the icons.)
     
  16. Jan 9, 2013 #16 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    I know it caches the list... doesn't refresh nearly as often as the older models... this is nice for speed, but hard for developers ;] Things I try that seem to help force a refresh: go to standby then come back, or go to a detailed menu like system settings or something, then come back.
     
  17. Jan 9, 2013 #17 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    Interesting. The URL isn't a problem for being local, so I'd guess it was the page, but the 0xffff is a surprise. The attached html seemed to load fine on my computer, but I don't have any of the images or stylesheet files it references, so it's probably one of them causing the problem. If there is any output from on your computer when the error happens, I'd be interested in it... probably a bug in my code not handling some weird problem with the stylesheet files.

    The "good news" is... looking at the website, the URL won't do you much good because it is designed to play the videos through a Flash app that won't work on Enter Webz.
    It might be "easy" to create a Serviio-specific app using their API, though ;]
     
  18. Jan 9, 2013 #18 of 165
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Trying to get this running on Linux. Had to upgrade to JRE 1.7 first so it would run at all. Now, when I access the app, it crashes:

    Code:
    jeremy@tardis:/etc/tivo/enterwebz$ ./enter-webz.sh
    HME SDK 1.4 (TiVo, Inc.)
    LOG: added factory
    LOG: added factory
    LOG: added factory
    MDNS: http://192.168.1.60:7288/webz/
    MDNS: http://192.168.1.60:7288/webz1/
    MDNS: http://192.168.1.60:7288/webz2/
    LOG: null
    LOG: Exception or Error during init():
    LOG: java.lang.NullPointerException: null
    LOG: Stack trace sent to stdout
    java.lang.NullPointerException
            at com.blackledge.david.tivo.widgets.typo.WordList.addWord(WordList.java:129)
            at com.blackledge.david.html.hme.WebBrowserApp.init(Unknown Source)
            at com.tivo.hme.sdk.Application.initializeApp(Application.java:879)
            at com.tivo.hme.sdk.Application.preprocessEvent(Application.java:1774)
            at com.tivo.hme.sdk.Application.handleChunk(Application.java:1589)
            at com.tivo.hme.host.sample.Listener.readEvents(Listener.java:306)
            at com.tivo.hme.host.sample.Listener.handleHME(Listener.java:288)
            at com.tivo.hme.host.sample.Listener.handle(Listener.java:381)
            at com.tivo.hme.host.http.server.HttpConnection.run(HttpConnection.java:123)
            at java.lang.Thread.run(Unknown Source)
    LOG: Closing app, due to previous error
    LOG: unknown event opcode : 10
    LOG: com.tivo.hme.sdk.HmeException: application closed, app=/webz/
    LOG: Stack trace sent to stdout
    com.tivo.hme.sdk.HmeException: application closed, app=/webz/
            at com.tivo.hme.sdk.Application.writeCommand(Application.java:3396)
            at com.tivo.hme.sdk.Application.cmdViewSetVisible(Application.java:2620)
            at com.tivo.hme.sdk.View.setVisible(View.java:682)
            at com.tivo.hme.sdk.View.setVisible(View.java:667)
            at com.tivo.hme.sdk.Application.handleActive(Application.java:1374)
            at com.tivo.hme.sdk.Application.handleEvent(Application.java:1329)
            at com.tivo.hme.bananas.BApplication.handleEvent(BApplication.java:362)
            at com.blackledge.david.html.hme.WebBrowserApp.handleEvent(Unknown Source)
            at com.tivo.hme.sdk.HmeObject.postEvent(HmeObject.java:145)
            at com.tivo.hme.sdk.Resource.postEvent(Resource.java:132)
            at com.tivo.hme.sdk.Application.dispatchEvent(Application.java:1869)
            at com.tivo.hme.bananas.BApplication.dispatchEvent(BApplication.java:278)
            at com.tivo.hme.sdk.Application.handleChunk(Application.java:1606)
            at com.tivo.hme.host.sample.Listener.readEvents(Listener.java:306)
            at com.tivo.hme.host.sample.Listener.handleHME(Listener.java:288)
            at com.tivo.hme.host.sample.Listener.handle(Listener.java:381)
            at com.tivo.hme.host.http.server.HttpConnection.run(HttpConnection.java:123)
            at java.lang.Thread.run(Unknown Source)
    LOG: connection to receiver closed
    LOG: Unexpected error: com.tivo.hme.sdk.HmeException: application closed, app=/webz/
    
    Here's the quick shell script I wrote to run it:

    Code:
    #!/bin/bash
    mydir=`dirname "$0"`
    cd "$mydir"
    for j in ./*.jar
    do
    CLASSPATH=$CLASSPATH:$j
    done
    
    java -Dcom.tivo.hme.sdk.debug.level=0 -cp $CLASSPATH com.tivo.hme.host.sample.Main --launcher launcher.txt
    Anything obvious I'm doing wrong?
     
  19. Jan 9, 2013 #19 of 165
    Allanon

    Allanon Member

    580
    0
    Nov 2, 2005
    Output:
    Code:
    HME SDK 1.4 (TiVo, Inc.)
    LOG: added factory
    LOG: added factory
    MDNS: http://192.168.1.114:7288/webz/
    LOG: 192.168.1.104 icon.png HTTP GET - to factory /webz/
    MDNS: http://192.168.1.114:7288/webz1/
    LOG: 192.168.1.104 icon.png HTTP GET - to factory /webz1/
    LOG: null
    LOG: unknown event opcode : 10
    Unable to create default font for measurement: java.io.IOException: Can't read C
    :\Users\David\Desktop\Development\hme_sdk_1.4.1_src\com\tivo\hme\sim\default.ttf
    
    Unable to create system font for measurement: java.io.IOException: Can't read C:
    \Users\David\Desktop\Development\hme_sdk_1.4.1_src\com\tivo\hme\sim\system.ttf
    LOG: connection to receiver closed
    LOG: Unexpected error: java.lang.NullPointerException
    LOG: 192.168.1.104 icon.png HTTP GET - to factory /webz/
    LOG: 192.168.1.104 icon.png HTTP GET - to factory /webz1/
    
     
  20. Jan 10, 2013 #20 of 165
    davidblackledge

    davidblackledge Registered lÜser

    466
    0
    Sep 9, 2008
    NM
    First, sorry again about the Java 1.7 - next release will be 1.5.

    I think I know what it is... I have an old version of TyPo in one of the jars, and a newer version in EnterWebz.jar. Your generated classpath probably puts the old one first in the path.
    Try it with a manual classpath that matches the .bat file instead of a generated classpath.
    Next release will also self-define its classpath in the main jar file, so you won't even need the loop.
     

Share This Page