Difference between revisions of "NeTV local UI"
Line 12: | Line 12: | ||
/etc/init.d/chumby-netvbrowser start/stop/restart | /etc/init.d/chumby-netvbrowser start/stop/restart | ||
− | + | <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 | + | NeTVBrowser SetUrl http://www.yoururl.com |
The correct way to keep a page on screen is to use the browser's multi-tab feature | The correct way to keep a page on screen is to use the browser's multi-tab feature | ||
− | NeTVBrowser | + | NeTVBrowser Tab 1 http://www.yoururl.com |
− | NeTVBrowser | + | NeTVBrowser Tab 1 Hide |
Where '1' is the index of the tab. Maximum 10 tabs are supported (index 9). <br/> | Where '1' is the index of the tab. Maximum 10 tabs are supported (index 9). <br/> | ||
Tab 0 is reserved for NeTV UI.<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. | A keep-alive timer is responsible to keep it pointing to http://localhost at 1 minute interval. | ||
− | + | <br/>To call or inject JavaScript function from SSH console (remember to escape special characters): | |
− | NeTVBrowser | + | NeTVBrowser JavaScript "console.log('hello console');" |
− | NeTVBrowser | + | NeTVBrowser JavaScript "my_function(); function my_function() { console.log('hello console'); }" |
− | + | <br/>Night mode (Tab 0 only) | |
− | NeTVBrowser | + | NeTVBrowser InvertColor on |
− | NeTVBrowser | + | NeTVBrowser InvertColor off |
− | + | <br/>Make the browser fullscreen / NOT fullscreen | |
− | NeTVBrowser | + | NeTVBrowser Fullscreen |
− | // | + | NeTVBrowser SetBox 100 100 400 300 //xx yy width height |
− | + | ||
+ | <br/>Screen rotation | ||
+ | NeTVBrowser Rotate 0/90/180/270 | ||
+ | |||
+ | <br/>Show debug traces & JavaScript console output | ||
+ | mount -o remount,rw / | ||
+ | vi /etc/init.d/chumby-netvbrowser | ||
+ | Replace NeTVBrowser > /dev/null 2>&1 & | ||
+ | with NeTVBrowser & | ||
+ | mount -o remount,ro / | ||
+ | |||
+ | <br/>Simulate a keyboard event | ||
+ | NeTVBrowser Key valid_key_name | ||
+ | Some commonly used key names are: cpanel,widget,up,down,left,right,enter,center,esc,del,backspace,space & alphanumeric keys | ||
More interesting stuffs to come... | More interesting stuffs to come... |
Revision as of 04:12, 27 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 SetUrl http://www.yoururl.com
The correct way to keep a page on screen is to use the browser's multi-tab feature
NeTVBrowser Tab 1 http://www.yoururl.com NeTVBrowser 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 JavaScript "console.log('hello console');" NeTVBrowser JavaScript "my_function(); function my_function() { console.log('hello console'); }"
Night mode (Tab 0 only)
NeTVBrowser InvertColor on NeTVBrowser InvertColor off
Make the browser fullscreen / NOT fullscreen
NeTVBrowser Fullscreen NeTVBrowser SetBox 100 100 400 300 //xx yy width height
Screen rotation
NeTVBrowser Rotate 0/90/180/270
Show debug traces & JavaScript console output
mount -o remount,rw / vi /etc/init.d/chumby-netvbrowser
Replace NeTVBrowser > /dev/null 2>&1 & with NeTVBrowser &
mount -o remount,ro /
Simulate a keyboard event
NeTVBrowser Key valid_key_name
Some commonly used key names are: cpanel,widget,up,down,left,right,enter,center,esc,del,backspace,space & alphanumeric keys
More interesting stuffs to come...