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

Discovering the iPad interface

Discussion in 'TiVo Underground' started by wmcbrine, Jan 18, 2011.

  1. Sep 8, 2013 #261 of 366
    moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    Most of the URLs posted above don't work as far as video goes. Unlike normal Opera browsers currently the TiVo one only supports mp4/H264/aac - confirmed this with html5 code and by visiting video test pages. Also there's no flash fallback option either (used by many sites). There is a way to launch to TiVo flash player similar to how to launch to web player, but both are independent of each other.

    So I'd say using built in browser for video is fairly worthless right now. If/when TiVo launches an SDK presumably they will provide methods of launching video which cover all the TiVo supported types.
     
  2. Sep 8, 2013 #262 of 366
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,096
    287
    Oct 29, 2000
    Well, that's bummer. I guess I can leave the Roamio off the shopping list for now. Wish list for the future, maybe.

    RE: Flash fallback

    Many times when I visit a video site that has flash content, I am able to change the browser agent to iOS:iPad, and then the site gives me an HTML5/mp4 page instead. Not with every site though of course.

    On desktop Safari I also use this amazing extension called ClickToFlash that does an excellent job substituting the HTML5/mp4 version of Flash video on many popular sites. It also had an AirPlay button to send that video to an AppleTV.

    Just mentioning these to see if such a suggestion may help in this scenario. Since we can't change the Roamio's browser user agent string I am guessing it won't. In that case, we'll have to keep waiting until Flash is declared dead(er) and buried, and these web content creators remove it once and for all and use HTML5/mp4 exclusively instead.
     
  3. Sep 9, 2013 #263 of 366
    moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    Note that multiple source video failover does work with the TiVo player as it does with most browsers. i.e. If you specify multiple encodings the player will pick one that is supported when possible. For example the TiVo browser doesn't support webm, but failover to mp4 works:
    Code:
    <video id="video" autoplay>
      <source src="sample.webm" height="auto" type="video/webm">
      <source src="sample.mp4" height="auto" type="video/mp4">
      Your browser does not support the video tag.
    </video>
    
    (In above example Firefox doesn't support mp4 but picks the webm version, IE 9 picks the mp4 version, etc.).
     
  4. Sep 9, 2013 #264 of 366
    herbman

    herbman Member

    114
    0
    Apr 8, 2008
    Can Roamio be configured to use any kind of HTTP proxy?

    If so it wouldn't be too hard to write a quick webapp/filter/servlet/etc to simply catch requests and forward them along with a different user agent.
     
  5. Sep 9, 2013 #265 of 366
    gonzotek

    gonzotek tivo_xml developer

    2,401
    3
    Sep 24, 2004
    Outside...
    Interesting thought..just did some googling around and found old (2006 and earlier) references to TiVos having issues with proxy servers (people trying to get tivos to be transparently proxied, for the purpose of running them in areas where TiVo doesn't provide service support, like South Africa). I've been working with transparent/intercepting proxies for some work-related stuff lately. After I pick up a Roamio, this might be something I can help test.
     
  6. onovotny

    onovotny New Member

    11
    0
    Aug 26, 2013
    If you're looking for mDNS/Bonjour/Zeroconf on Windows Phone, you can use my Zeroconf NuGet package. Seach for Zeroconf there. Docs and source are on GitHub.

    This does require WP8.
     
  7. onovotny

    onovotny New Member

    11
    0
    Aug 26, 2013
    It would seem to be currently impossible to build a "real" Win8.1 app for TiVo that uses the MindRPC interfaces.

    The real issue is that Win8 and 8.1 do not support sockets with client certificates. Kinda cuts things short very fast :(

    In Windows 8.1, it is possible to finally ignore SSL errors for HTTP requests, so it'd be possible to use the TTG XML interface. And plain sockets are no problem, so the older remote control API is available too. It'd just be far more limited.

    Bummer though that the "real" API can't be called. It also means TiVo can't write an app themselves for either WP8 or Win8 without a software update on the devices that changes the auth.
     
  8. swythan

    swythan New Member

    21
    0
    Apr 4, 2011
    High...
    That did cause me issues for a while, but then I discovered the Bouncy Castle crypto library. It needed a bit of work to get working on the phone, but it made it possible to connect. :)

    The next problem is that you need a client certificate (which the TiVo does check). I've not come across any obvious method by which TiVo (or Virgin Media) would enable you to get one. So you need to get hold of one of that will work from, err... somewhere else. <cough> ;-)

    Anyway, once you've got that (and commented out a check that Bouncy Castle makes on the server certificate that the TiVo is using), then the MindRPC stuff can be used with no problem!

    I've not mentioned it on this forum before, but my app is available here. I've only released it in the UK, as that's the only TiVo I've got access to.

    Thanks for pointing out your mDNS package. I'd already spotted it over the summer, and I was thinking of switching to it for the WP8 version of my app, as the cobbled together solution I'm using at the moment seems to be a bit unreliable. It's nice that you found me, too!
     
  9. swythan

    swythan New Member

    21
    0
    Apr 4, 2011
    High...
    Writing above about the client cert reminded me of some work I did on this over the summer...

    In an attempt to find out how the new VM iPad app was doing a "Home Mode" connection to a local TiVo without asking for the MAK, I decided to look at capturing the traffic between the iPad app and the "Away Mode" servers. To my surprise, a very simple MitM app worked! I just created some self-signed certificates and opened a TLS socket listening on the relevant port. After editing the hosts file on my (jailbroken) iPad it happily connected to my proxy instead!

    Bizarrely it looks like although the TiVo and the Away Mode servers are checking the client certificate; the iPad app itself just completely ignores the server certificate. I didn't even do anything to make my self-signed cert look valid (e.g. editing the trusted root authority lists on the iPad)!

    If people are interested I could post the code. It's in C# and probably Windows specific. I imagine Arantius's original script would also probably work if someone who knows Python could make it establish a TLS (server) connection over the socket.

    The answer to my orginal question, incidentally, was that the MAK comes back in the "bodyAuthenticateResponse" from the Away Mode servers, but ONLY if you increase the SchemaVersion in your MRPC header to 10. In an amusing quirk, if you send a message with a SchemaVersion higher than 9 to connect directly to a Virgin Media TiVo it will instantly crash and reboot. Luckily my wife was not watching TV when I did that!
     
  10. moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    Yes please do post the MitM related code. It would be interesting to try and figure out how the iPad app requests an MRS stream from series 4 and 5 TiVos.

    Also, for USA the RPC interface connects to TiVo port 1413 as a specific partnerId (3787). That partnerId only has access to very limited Mind operations (I'd say only 5% or less of them). When you try and execute most operations you get message that partnerId doesn't have access to them. It would be really powerful to figure out how to connect to the local Mind with a higher authentication level that is not limited to the tiny set of operations we currently have available.
    When connecting to middlemind.tivo.com with username & password for example the # of operations available increases quite significantly, so it implies different authentication methods when connecting to the Mind have different access levels. I'm hoping there is perhaps a different port on the TiVo that once connected to has full Mind operation access.
     
  11. onovotny

    onovotny New Member

    11
    0
    Aug 26, 2013
    Thanks for pointing out that Crypto library. I'll have to see if I can wrap a WinRT plain socket stream around it.

    If you have it working in WP8, it must work though as WP8's SocketStream class is the same as Windows 8's.

    Any chance you could share some code around getting your connection working?
     
  12. bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    Good looking app... I wonder if it would work with the retail TiVo's
     
  13. swythan

    swythan New Member

    21
    0
    Apr 4, 2011
    High...
    No problem. At the moment it's referencing a library of mine that I'm not quite ready to open source (although I'm thinking of it). I'll have a look at making it more self contained tomorrow night and post it up somewhere.

    Interesting. Are you trying to do stuff that the iPad/Android apps can do, or more involved stuff? I've not tried doing anything particularly advanced yet.

    From looking at the schema docs that used to be in the Android app I got the impression that they use the same protocol to communicate between the central servers and the TiVo itself, if not also between components on a single TiVo. If that's true then I wouldn't be at all surprised if only the components in the system that they consider "internal" are allowed to do the more advanced operations.

    I'd been hoping that TiVo were going to open up a developer program where you could get your app certified, and a client cert & partnerId issued that would give you access to an agreed set of operations, but it looks like that's not going to happen anytime soon.
     
  14. swythan

    swythan New Member

    21
    0
    Apr 4, 2011
    High...
    Thanks. I imagine it would, with a bit of work to get the configuration right (servers, certificates, etc). The main difficulty is that I'm in the UK and I don't have access to an US retail TiVo.

    I'd like to get it working, but the potential for customer support issues if I actually published it to the Store is very off-putting.
     
  15. moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    Note that I think arantius with his TiVo Commander app did indeed get his own certificate to use with his app from TiVo, so although there's not an official developer program it looks like you can work something out. Certificate I'm using in kmttg expires in early 2014 so I'll have to figure something out to get a new one. It's much harder now that Android code is obfuscated to get password to go with a new certificate.

    Here's just a few examples of operations that work via middlelmind.tivo.com but not port 1314 (i.e. the middlemind server has a bigger scope of operations available):
    uiTransitionSearch
    schemaNumberListGet
    schemaElementGet
    operationCountGet

    Problem is all the really good operations that are intended to work with local Mind are obviously not available via tivo.com. Things like modifying channel lineup, modifying recorded show properties, etc.
     
  16. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,445
    165
    Apr 17, 2000
    Nevada
  17. Fofer

    Fofer XenForo Rocks! TCF Club

    82,096
    287
    Oct 29, 2000
    Darn. I got excited there for a moment. :eek:
     
  18. moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    If you look at that Pandora URL it is full of Microsoft/Xbox specific options, so looks like Pandora is tailoring HTML5 to specific devices.
     
  19. Fofer

    Fofer XenForo Rocks! TCF Club

    82,096
    287
    Oct 29, 2000
    Let's hope, then, that they're tailoring one right now, as we type, for TiVo :)
     

Share This Page