Hello
I'm an IPTV developer and I create UI's for set-top-boxes that run HTML5 capable browsers to display the UI and for user interaction.
Currently I'm reviewing AngularJS to see if we can use it as a single-page app framework for our UI.
TV's don't have mouse and keyboard, but a limited remote control, with buttons such as up/down/left/right, ok, back, menu, info, channel up, channel down, etc. The browser receives these events as keypresses without context, thus you register a keypress listener and sniff out those events in the window and manage the input/browser interaction and state yourself.
But you can mix native browser interaction as well, such as for spatial navigation using arrow keys and OK (as clicks). But for anything else you need to manage the input, redirect it to a proper context for handling. Very tedious stuff. (Who on Earth thought running a web browser on TV's was a good idea?? They are so clearly not designed for that sort of interaction. Not since Lynx.)
Without dwelling too much on the headaches of this, here are a few questions:
1. How can you listen to events such as those in AngularJS?
2. How would you go about handling those events and ensure they get sent to the proper controller?
E.g. a "volume mute toggle" event may be only of interest to a single controller, but an "info button" event may be of interest to all controllers but should only be handled by the active controller.
3.
tv.youtube.com uses AngularJS. I'm curious if anyone has knowledge of their implementation and experience with using AngularJS?
4. Because set-top-boxes are usually low-performance hardware there is a limit to how much stuff you can load into memory without slowing down the UI. I know you can partition html templates, but can't you partition the web application itself, so that distinct modules, their js, css, html can be loaded on demand and unused modules are offloaded?
5. So far AngularJS seems like the best candidate. But that's not saying much, all the other frameworks out there are just plain nightmare to plug into a platform like TV. Does anyone have any other thoughts on using AngularJS for TV interfaces?
Sorry for those scattered questions. I'm maybe just looking for some discussion about AngularJS+TV, because I can't find anything elsewhere.