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 1, 2013 #241 of 366
    gonzotek

    gonzotek tivo_xml developer

    2,402
    3
    Sep 24, 2004
    Outside...
    If possible, can someone with a Roamio try a page with HLS embedded in the video tag? If that works, it's probably possible to implement a pytivo plugin (or other servers like Plex) to transcode to hls on-the-fly.
    Here's an Opera pdf that seems to indicate it's a part (or perhaps an option) of the devices sdk that TiVo is using:
    http://media.opera.com/media/b2b/tv/201201/Opera_Media_Streaming.pdf

    And here are some sample HLS streams embedded in web pages listed at the bottom of Apple's spec page for HLS:
    https://developer.apple.com/library...html#//apple_ref/doc/uid/TP40008332-CH102-SW1
    They work in Safari on a Mac and iPhone.
     
  2. Sep 1, 2013 #242 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Tried the links on the bottom of the page. The page comes up with player controls but there is no video and play time indicated is 0. Pressing Play does nothing.
     
  3. Sep 1, 2013 #243 of 366
    gonzotek

    gonzotek tivo_xml developer

    2,402
    3
    Sep 24, 2004
    Outside...
    Dang, oh well. Thanks for checking.
     
  4. Sep 1, 2013 #244 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Playing with this a little more I noticed when I set source H.264 video as 1080p/24 my TV switches to 1080p/24 mode once the video starts playing which looks promising.

    The video was > 6GB in size and I monitored total bytes sent to the TiVo and saw it go way beyond the 1.1GB limit that plagues HME streaming, so looks like that is not an issue. Note that likely this is because the transfer is dynamic - i.e. If I pause play then bytes stop transferring to the Roamio so looks like there's no/little buffering happening and this is streaming not transferring. So I think it's very likely that if/when the Mini gets 20.3 software update it will be able to stream video in this manner as well without a problem.

    The built in player is very, very basic with only play & pause capabilities and a play bar (I don't see a way to drag/move the play bar) and showing the play bar at all times. But theoretically using HTML5 it should be possible for someone to build a fully custom player that can honor some of the TiVo remote buttons for full trick play functionality.

    Of course there's also still the restriction that it seems only mp4 container with h.264 video & AAC audio is supported (and probably requires MOOV atom at start of the file as well though I haven't tested that yet).

    I'll release kmttg with Web tab soon so that others that have experience with HTML5 programming can perhaps play with this some more to see what is possible...

    EDIT: Actually I did find a way to move the play bar by 1st highlighting it and pressing select and the left/right arrows to move it left/right. However I'm using the very simple/frugal python SimpleHTTPServer as web server and it couldn't handle the scrubbing. Shall have to see if using a real web server solves that issue.

    EDIT 2: Switching to use a better web server (I used mongoose) allows scrubbing to be handled properly using the built in TiVo player.
     
  5. Sep 2, 2013 #245 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    FYI, kmttg v1p0e version just released with new Web remote tab for those with Roamio units that want to experiment.
     
  6. Sep 2, 2013 #246 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    A little progress on a video player with custom controls. This code doesn't display the built in TiVo player controls but instead responds to PAUSE, FF, REW and 1 TiVo remote buttons. I used '1' for toggling info display since I can't seem to get 'Info' button press event (among some other buttons).

    I think this is enough for proof of concept that a custom player is possible.
    Code:
    <!DOCTYPE HTML>
    <html>
    <body style="overflow:hidden;">
    <label id="info" style="color :#FFFFFF; position:absolute; left:30px; top:30px;"></label>
    <video id="video" autoplay>
      <source src="h264_aac.mp4" height="auto" type="video/mp4">
      Your browser does not support the video tag.
    </video>
    <SCRIPT type="text/javascript">
       var sized = 0; // Used by sizeVideo to mark when video sizing is complete
       document.addEventListener( "keypress", doKeyDown, false )
       updateInfo();
       
       function doKeyDown(evt) {
          var video = document.getElementById("video");
          var info = document.getElementById("info");
          // 1 = Toggle info display (Info key doesn't register key event  for some reason...)
          if (evt.which == 49) {
             if (info.style.display == "none") {
                info.style.display = "inline";
             } else {
                info.style.display = "none";
             }
          }
          
          // Pause = toggle pause state
          if (evt.which == 80) {
             if (video.paused == true) {
                video.play();
             } else {
                video.pause();
             }
          }
          
          // REW = skip back 8 seconds
          if (evt.which == 89) {
             video.currentTime -= 8;
          }
          
          // FF = skip forwards 30 seconds
          if (evt.which == 90) {
             video.currentTime += 30;
          }
       };
       
       function pad2(number) {
          return (number < 10 ? '0' : '') + number;
       }
       
       function formattedTime(totalSecs) {
          totalSecs = Math.floor(totalSecs);
          var hours = Math.floor(totalSecs / 3600);
          totalSecs %= 3600;
          var mins = Math.floor(totalSecs / 60);
          var secs = totalSecs % 60;
          
          var display = pad2(mins) + ":" + pad2(secs);
          if (hours > 0) {
             display = pad2(hours) + ":" + display;
          }
          return display;
       }
       
       function sizeVideo() {
          var video = document.getElementById("video");
          if (sized == 0 && video.videoWidth != 0) {
             var w = video.videoWidth;
             var minw = 1280; // Want this min width
             if (w < minw) {
                scale = minw/w;
                w = Math.floor(w * scale);
             }
             video.width = w;
             sized = 1;
          }
       }
          
       function updateInfo() {
          sizeVideo();
          var video = document.getElementById("video");
          var info = document.getElementById("info");
          var duration = video.duration;
          var current = video.currentTime;
          info.innerHTML = formattedTime(current) + " / " + formattedTime(duration); 
          setTimeout("updateInfo()",1000); // Update label text every second
       }
    </SCRIPT>
    </body>
    </html> 
    
     
  7. Sep 2, 2013 #247 of 366
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,116
    296
    Oct 29, 2000
    This is great stuff! Thanks for sharing the exciting news!
     
  8. Sep 2, 2013 #248 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    I just realized my Mini does have 20.3 software already (I guess it updated when Roamios released?) and this HTML5 stuff works fine on the Mini as well, including the custom video player.
     
  9. Sep 3, 2013 #249 of 366
    AdamNJ

    AdamNJ New Member

    387
    0
    Aug 22, 2013
    Dunellen, NJ
    any chance that you are able to navigate to hbogo.com and somehow lightning bolts shoot out of the screen and hbogo works?
     
  10. Sep 3, 2013 #250 of 366
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,116
    296
    Oct 29, 2000
    Very doubtful as hbogo.com isn't wholly HTML5... it's largely Flash dependent too.
     
  11. Sep 3, 2013 #251 of 366
    herbman

    herbman Member

    114
    0
    Apr 8, 2008
    Any way to set the user agent? I have found much success in life with certain flash sites by disabling flash (already done in this case) and setting UA to an iPhone. This often pulls down nice h264 mp4 video.
     
  12. Sep 4, 2013 #252 of 366
    gonzotek

    gonzotek tivo_xml developer

    2,402
    3
    Sep 24, 2004
    Outside...
    No, not yet anyway. Opera on the desktop allows this (or did the last I checked anyway), but they haven't exposed any browser options on the TiVo so far.
     
  13. Sep 4, 2013 #253 of 366
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    Have you tried putting - opera:config in the url?

    It is how you access all the setting in Opera Mobile 6.1
     
  14. Sep 4, 2013 #254 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Interesting suggestion. When doing that the TiVo actually brings up an Opera "Invalid address" box saying that URL is "not currently available" along with some links for opera help. That's the 1st time I've seen that I guess because I didn't try entering invalid URLs previously.

    However, the following DID work:
    opera:about

    Some of the info given:
    Version 3.5
    Build LSDK5877
    Platform Linux
    System mips, 3.3.8-2.3
    Vega backend DirectFB

    Browser identification:
    Opera/9.80
    ...
     
  15. Sep 5, 2013 #255 of 366
    moyekj

    moyekj Well-Known Member

    11,142
    31
    Jan 23, 2006
    Mission...
    Some other opera: links that do work:
    Code:
    opera:plugins
    (Reports None found)
    
    opera:cache
    (Empty list shown here)
    
    opera:history
    (This showed me all of URLs I've entered over last few days)
     
  16. Sep 5, 2013 #256 of 366
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    Just try config: - see if that works...

    Others that work with Opera Mini

    *o:A-will go to start page
    *o:B-will open a page that contains the menu items
    *o:C-will open the page that contains the options in the tools menu
    *o:X-opens the about page.
    *o:Y-add bookmark page
    *o:Z-bookmarks
    *opera:config-opens the power user settings
    *server:sourceURL-shows the source code of the referenced page
    *server:refresh-refreshes the page

    Not sure the will work on this browser, but worth a try.
     
  17. Sep 5, 2013 #257 of 366
    gonzotek

    gonzotek tivo_xml developer

    2,402
    3
    Sep 24, 2004
    Outside...
    I wasn't planning on getting a Roamio until early next year or possibly if there was a decent sale before then...but I may just have to put it on a credit card and dive in... :) It sounds like there's a lot of fun to be had with it (as a tinkerer), between the hard drive upgrade process and the built-in browser :).
     
  18. Sep 6, 2013 #258 of 366
  19. Sep 7, 2013 #259 of 366
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,116
    296
    Oct 29, 2000
  20. Sep 7, 2013 #260 of 366
    bradleys

    bradleys It'll be fine....

    3,687
    4
    Oct 31, 2007
    Yeah, I was going to wait a little bit, but very intrigued! Hoping someone will test these and report on the experience.
     

Share This Page