Difference between revisions of "NeTV local UI"
(Created page with "NeTV local UI is entirely rendered by Webkit, running in a chromeless fashion. The UI is written in javascript/HTML. The overlay effect is done using chroma key compositing. Any...") |
|||
Line 1: | Line 1: | ||
− | NeTV local UI is entirely rendered by Webkit, running in a chromeless fashion. The UI is written in | + | NeTV local UI is entirely rendered by Webkit browser, running in a chromeless/fullscreen fashion. The UI is written in JavaScript & HTML. |
− | + | Hardware integration is supported by submitting POST/GET request to http://localhost/bridge. See [[NeTV_web_services]]. | |
− | + | ||
The starting point for playing with the UI is to edit files found in /usr/share/netserver/docroot | The starting point for playing with the UI is to edit files found in /usr/share/netserver/docroot | ||
+ | This is translated to http://localhost | ||
+ | |||
+ | The overlay effect is done using chroma key compositing.<br/> | ||
+ | Any color that is (240,0,240 or #F000F0) will take on the color of the background video stream. | ||
+ | |||
+ | The browser executable is located at /usr/bin/NeTVBrowser | ||
+ | To start/stop/restart the browser, use a helper script | ||
+ | /etc/init.d/chumby-netvbrowser start/stop/restart | ||
+ | |||
+ | <br/><br/>To point the browser at a different URL<br/>Note that, however, a keep-alive timer will kick in within 1 minute and switch it back to http://localhost/ | ||
+ | NeTVBrowser -qws SetUrl http://www.yoururl.com | ||
+ | |||
+ | The correct way to keep a page on screen is to use the browser's multi-tab feature | ||
+ | NeTVBrowser -qws Tab 1 http://www.yoururl.com | ||
+ | NeTVBrowser -qws Tab 1 Hide | ||
+ | Where '1' is the index of the tab. Maximum 10 tabs are supported (index 9). <br/> | ||
+ | Tab 0 is reserved for NeTV UI.<br/> | ||
+ | A keep-alive timer is responsible to keep it pointing to http://localhost at 1 minute interval. | ||
+ | |||
+ | <br/><br/>To call or inject JavaScript function from SSH console (remember to escape special characters): | ||
+ | NeTVBrowser -qws JavaScript "console.log('hello console');" | ||
+ | NeTVBrowser -qws JavaScript "my_function(); function my_function() { console.log('hello console'); }" | ||
+ | |||
+ | <br/><br/>Night mode (Tab 0 only) | ||
+ | NeTVBrowser -qws InvertColor on | ||
+ | NeTVBrowser -qws InvertColor off | ||
+ | |||
+ | <br/><br/>Make the browser fullscreen / NOT fullscreen | ||
+ | NeTVBrowser -qws Fullscreen | ||
+ | //NeTVBrowser -qws SetBox xx yy width height | ||
+ | NeTVBrowser -qws SetBox 100 100 400 300 | ||
+ | |||
+ | |||
− | More | + | More interesting stuffs to come... |
Revision as of 23:13, 26 September 2011
NeTV local UI is entirely rendered by Webkit browser, running in a chromeless/fullscreen fashion. The UI is written in JavaScript & HTML. Hardware integration is supported by submitting POST/GET request to http://localhost/bridge. See NeTV_web_services.
The starting point for playing with the UI is to edit files found in /usr/share/netserver/docroot This is translated to http://localhost
The overlay effect is done using chroma key compositing.
Any color that is (240,0,240 or #F000F0) will take on the color of the background video stream.
The browser executable is located at /usr/bin/NeTVBrowser To start/stop/restart the browser, use a helper script
/etc/init.d/chumby-netvbrowser start/stop/restart
To point the browser at a different URL
Note that, however, a keep-alive timer will kick in within 1 minute and switch it back to http://localhost/
NeTVBrowser -qws SetUrl http://www.yoururl.com
The correct way to keep a page on screen is to use the browser's multi-tab feature
NeTVBrowser -qws Tab 1 http://www.yoururl.com NeTVBrowser -qws Tab 1 Hide
Where '1' is the index of the tab. Maximum 10 tabs are supported (index 9).
Tab 0 is reserved for NeTV UI.
A keep-alive timer is responsible to keep it pointing to http://localhost at 1 minute interval.
To call or inject JavaScript function from SSH console (remember to escape special characters):
NeTVBrowser -qws JavaScript "console.log('hello console');" NeTVBrowser -qws JavaScript "my_function(); function my_function() { console.log('hello console'); }"
Night mode (Tab 0 only)
NeTVBrowser -qws InvertColor on NeTVBrowser -qws InvertColor off
Make the browser fullscreen / NOT fullscreen
NeTVBrowser -qws Fullscreen //NeTVBrowser -qws SetBox xx yy width height NeTVBrowser -qws SetBox 100 100 400 300
More interesting stuffs to come...