![]() |
|
|||||||
| SageTV Clients Development This forum is for discussions relating to SageTV Open Source Clients Development. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
MiniClient running in a Browser?
After working on the Android MiniClient and understanding the layers, etc, I always had a feeling that it would be possible to get a native javascript/html client running in a browser.
A couple days ago, I decided to see if it was possible. I leveraged the Android MiniClient base code that manages connections, and delagates UI rendering, and I created a "WebSocketUIRenderer" that pushed rendering commands to browser. This is just a proof of concept to see what the performance would be like, etc. https://www.youtube.com/watch?v=8miFdeMnJt0 This is using the Html5 Canvas object, and the performance is decent. But, I'm not doing all the rendering commands here, AND I'm not doing font coloring. Font coloring when I enabled that, basically disabled animations entirely, as colorizing images on the HTML5 Canvas is expensive. But, it gives way to possibly creating a WebGL version of the MiniClient. Given my dislike of opengl, I didn't go down that road. Currently the JavaScript code to make this happen is about 100 lines of code, including whitespace and comments. I'm not likely to take this much further, until later 2018, but I just wanted to see what was possible. As it is right now, this "web" client basically connects to a desktop miniclient that manages the connections, etc, and uses websockets to push drawing commands to a browser. So the desktop miniclient is really a bridge to the web ui. Although I haven't gotten that far, it would be possible to get video playback working as well, but, it would likely only support h264 content. My initial feeling was this would be something cool to eventually put into SageTV so that when you start it up, especially the first time, you can easily configure it by launching the URL.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient Last edited by stuckless; 12-31-2017 at 12:30 PM. Reason: Title Change |
|
#2
|
|||
|
|||
|
Wow - very cool. Would this potentially allow better integration with streaming services like Netflix and Youtube into "SageTV", or at least all within one (somewhat) integrated UI?
The reason I say this is that apparently you may be able to get around the Amazon/Google war limitations using browsers to play back videos rather than native clients.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
|
#3
|
||||
|
||||
|
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
|
#4
|
|||
|
|||
|
That would be awesome from my perspective as we are pretty much an all-iOS family.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
|
#5
|
|||
|
|||
|
Very impressive....
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page |
|
#6
|
|||
|
|||
|
Very, very nice
|
|
#7
|
||||
|
||||
|
Very nice work. I think I hinted that this should be possible about a year ago and you said it wasn't a good idea.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
|
#8
|
||||
|
||||
|
I honestly don't remember that. It seems odd, that I'd say that, since one of the reasons why I choose libgdx at the time, was that it could be ported to the web. Although I didn't end up using that technology here, I've always felt that the browser could run a miniclient UI. Now, I will say, that I don't think we are going to get great video playback, the UI was always something I was planning on doing... Just never found the time, until now.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
|
#9
|
|||
|
|||
|
This is really cool, though I have to wonder what performance will be like. And I doubt we'll see a truly mouse/touch-friendly STV, so while it might be functional, I assume it will be akin to trying to use the Android miniclient on a phone/tablet today.
The miniclient architecture, as I understand it, seems entirely unsuitable for low-latency actions. When you're using a remote from 10 feet away, you tolerate delays a lot more than touch, or even keyboard/mouse. Though, it's incredible that you were able to get this much working with just about 100 lines of javascript. I guess that's way easier than building an entirely new webGUI. |
|
#10
|
|||
|
|||
|
But there are uses on your LAN so latency won't be an issue if you just want to use an iPhone or iPad to access SageTV.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
|
#11
|
|||
|
|||
|
Quote:
In particular, think of things like scrolling through lists. |
|
#12
|
||||
|
||||
|
Quote:
The UI would be less feasible on a mobile device, since, touch is tricky, but on a desktop, the sagetv ui already supported mouse, so, pretty much the default stv is very usable with using a mouse. And to be honest, I needed to learn something new, and I've been wanting to play with websockets for a some time, and this allowed me to do that in a semi productive way
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
|
#13
|
||||
|
||||
|
I decided to take a stab at creating a WebGL version of the renderer in JavaScript... wow, what a difference. It's fast, and I was able to get all the colour blending working correctly.
As is, right now, someone could use this to fully configure a sagetv system using just a browser. The good news here, to be honest, is that this forced me to learn webgl which is close to opengles which is what is used on Android. So, I might use this knowledge and create a pure opengl renderer for Android and see if that gives slightly better UI performance there.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
|
#14
|
|||
|
|||
|
Does this do video playback or just render the UI? If the latter, do you have to call another application to do the video playback, like you use Exoplayer and IJKplayer in Android? Is that feasible on iOS? How would you do that on iOS? AirVideo HD has a nice playback engine that works well and has a 30 sec skip back and forward function.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
|
#15
|
||||
|
||||
|
Quote:
For video, if I get there... it'll use the html <video> element and a custom Media Source Extension that knows how to work with push and pull buffers from the server. So, no, it will not use an external player, if the player happens it'll use the browser's native player, which also means that only h264 content will be playable.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
|
#16
|
|||
|
|||
|
Don't mobile devices now support H.265 content as well? And does that limitation still exist on other OSes like Win or Linux or would they be able to play MPEG-2, etc?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
|
#17
|
||||
|
||||
|
I guess to be correct, the video player might play lots of different kinds of video, but h264 is the only thing that is in the spec, from what I can tell. But sure, depending on the browser and OS, etc, it might do more.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Miniclient 101 | smdl | SageTV Clients Development | 5 | 11-28-2017 02:47 AM |
| Miniclient? | BobbyDing | General Discussion | 3 | 09-08-2015 11:53 AM |
| Web Browser within Sage? | Skybolt | SageTV Customizations | 3 | 03-13-2007 06:20 PM |
| Running Linux Miniclient on Xbox | xred | SageTV Placeshifter | 0 | 03-06-2007 12:28 AM |
| Web Browser | jimmyb | SageTV Customizations | 3 | 08-31-2004 06:52 AM |