HME Lessons Learned

First lesson: use the V49 Classes.


Images, MP3s, and Videos.

  • Stream Resources do not support HTTPS.
    • URLs must be HTTP (most websites will still serve that content under HTTP).
    • If using the Video Player app, the uri parameter needs to be http, too.
  • Stream Resources do not support HTTP redirects.
    • You have to process any HTTP 3xx codes yourself before passing the final URL to the resource.
    • Some websites result in a redirect loop if you aren't handling cookies or other HTTP features.
  • Stream Resources accept a map that may help with various features of the HTTP request
    • format of that map to do something useful has not yet been discovered.
    • Hopefully handles passing a "referer" header and cookies that some websites require.

TiVo's HME helper apps

Can be launched using the Application Transition or Application-as-Stream.

Interface definition discoveries made by moyekj here.

  • Video Player (not subject to the 1.1GB streaming limit)
    • UUID: 863CB78F-EFDD-4106-B572-51733983DC76
    • parameters:
      • title
      • subtitle
      • description
      • uri (http://…, livetv:, etc.)
      • duration (in seconds)
  • Youtube Player (YouTube 1.0 (tcast jump 7/10))
    • UUID: 06F36A5F-FE5D-4F03-99A0-64B92896B47F
    • parameters
      • jumpTo (VIDEO or SEARCH)
      • videoid (If jumpto=VIDEO, this should be set to specify which video to play. You can find the video id from the url when watching a youtube video, the v= is the video id)
      • query (If jumpto=SEARCH, this should be set to specify the string to search for.)
  • Youtube Search (YouTube) ("Leanback"?) (not really sure about this one, only experience is with previous one)
    • UUID: 9AA364C9-CF8A-1E1D-B50F-CC65C40D4A96
    • parameters:
      • q (Search query, with words separated by the '+' sign. Used to launch app with a specific search query.)
      • v (YouTube Video ID. Used to launch app with a specific video.)

Video scaling

Includes Video resource views and scaling an App-as-stream that plays video.

  • Video can be scaled with the HME scale settings on an ancestor view
  • the Video is limited in how it supports scaling
    • Scale and position is ignored if the X scale is 100% (1.0) and might even destabilize. To use scale 1.0 x .75, you really have to use 0.9999 x .75.
    • Scale is ignored greater than 100%, it only can reduce the video size.
    • Last-selected "format/aspect" option in the TiVo applies to the video stream if it's full-screen SD regardless of your scale. While you can simulate different aspect settings with scaling, it won't make sense if the user didn't leave the TiVo in "full" mode.
      • Scaled SD video is forced to "FULL" format/aspect mode, regardless of user-selected option. No way known to detect SD case, but change in scaling should allow you to force "PANEL" equivalent mode, and "ZOOM" mode could probably be simulated using the scaled video's view settings for size and translation. Could also have a "vertical iphone video" scaling mode.
  • Video cannot go off screen either in its scale (mentioned above) or position.
    • You can slide the view off the screen, but the video it contains stops at the edge of the screen.
    • If you have other content, the other content will cover the video if the view is off screen. (if there is no other content in that area, the video will look like the view never went past the edge)
    • For instance, if you slide the video half off the screen to the right and have a colored background, that color will cover the left half of the screen, and the other half the screen will be the RIGHT half of your video, not the left half as you may expect.

Application as Stream

(Note that this feature is broken in the Java SDK… fix is in the Java Bugs/Gotchas page, otherwise you'll get a NullPointerException)
If you have the URL of an HME application, you can start it as a StreamResource within one of your application's views, potentially scaling it down and moving it around the screen.

  • Not only can you send parameters to the app via its URL, but you can also send it as a map to the Stream creation. The map is simply used by the SDK to (over)write parameters in the URL, though.
  • There is no way to get the "result" of an application started this way, unlike transitioning to another application which returns data back on the return transition (both the memento you send so you can restart in the right state when they return, and data set up by the other app as a "result"). You don't need the memento if you're using this technique, but the return data is important for some "support" applications.
  • You do get a >= RSRC_STATUS_READY event when the application begins and an >= RSRC_STATUS_CLOSED event when it closes, but you do not have any other insight into the state of the application.
  • If you call rsrc.setActive(false) on the application stream after you get the READY event, your launching application gets focus/control back.
  • The applicationResource.sendEvent method is useful for more than animation chaining. On an application-as-stream, it allows you to simulate remote control clicks on the other app. One thing you can do is capture KEY_EVENTs and forward them all to the application stream resource except for the few you want to override with your app.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License