This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:tvipjsapi:2 [2015/09/29 19:04] Alexi [String addRecord(String name, String url, String path, String start, String end);] |
en:tvipjsapi:2 [2017/08/04 17:52] (current) Alexander [bool addMountPoint(int id, bool temp, int type, String name, Object options);] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | + | |
====== TVIP JavaScript API #2 ====== | ====== TVIP JavaScript API #2 ====== | ||
Line 35: | Line 35: | ||
Add or change mount point with indicated //id//. | Add or change mount point with indicated //id//. | ||
- | If //temp// equal //true//, then mount point will be saved after device reload, if //false// - then mount point will be deleted after reload or application restart.The possible mount points types (//type//): 1 - SMB, 2 - NFS. Point name at mount system (for example, at pop-up message): //name//. Parameter //options// set specific options as object: | + | If //temp// equal //false//, then mount point will be saved after device reload, if //true// - then mount point will be deleted after reload or application restart.The possible mount points types (//type//): 1 - SMB, 2 - NFS. Point name at mount system (for example, at pop-up message): //name//. Parameter //options// set specific options as object: |
SMB: | SMB: | ||
Line 71: | Line 71: | ||
====String getCurrentTimezone();==== | ====String getCurrentTimezone();==== | ||
- | Return currently time zone (for example, //Europe/Moscow//). | + | Returns currently time zone (for example, //Europe/Moscow//). |
\\ \\ | \\ \\ | ||
Line 113: | Line 113: | ||
====String getEnvValue(String name);==== | ====String getEnvValue(String name);==== | ||
- | Get variable from the browser store. If //name// not found, empty string returns. | + | Gets variable from the browser store. If //name// not found, empty string returns. |
\\ \\ | \\ \\ | ||
Line 119: | Line 119: | ||
====String getMainMacAddress();==== | ====String getMainMacAddress();==== | ||
- | Returns main MAC address as string. Usually it's Ethernet interface mac. | + | Returns main MAC address as string. Usually it's Ethernet interface MAC. |
\\ \\ | \\ \\ | ||
Line 135: | Line 135: | ||
====List getSmbServers(String group);==== | ====List getSmbServers(String group);==== | ||
- | Perform servers search in specified //group// network group and returns NetBIOS server names \\ | + | Performs servers search in specified //group// network group and returns NetBIOS server names \\ |
Example: \\ | Example: \\ | ||
<code> | <code> | ||
Line 189: | Line 189: | ||
====void launchPreferences();==== | ====void launchPreferences();==== | ||
- | Launch system preferences Tvip. | + | Launches system preferences Tvip. |
\\ \\ | \\ \\ | ||
Line 196: | Line 196: | ||
====void logDebug(String message);==== | ====void logDebug(String message);==== | ||
- | Output debugging message to terminal(Linux) or logcat(Android). | + | Outputs debugging message to terminal(Linux) or logcat(Android). |
\\ \\ | \\ \\ | ||
Line 202: | Line 202: | ||
====void rebootSystem();==== | ====void rebootSystem();==== | ||
- | Reboot system. | + | Reboots system. |
\\ \\ | \\ \\ | ||
Line 209: | Line 209: | ||
====void removeMountPoint(int id);==== | ====void removeMountPoint(int id);==== | ||
- | Remove mount point from mount manager. //id// - Mount point identifier | + | Removes mount point from mount manager. //id// - Mount point identifier |
\\ \\ | \\ \\ | ||
Line 215: | Line 215: | ||
====void setColorKey(int color);==== | ====void setColorKey(int color);==== | ||
- | Setup UI color that could be consider as transparent for video layer. //color// in RGB model. | + | Setups UI color that could be consider as transparent for video layer. //color// in RGB model. |
\\ \\ | \\ \\ | ||
Line 221: | Line 221: | ||
====void setCustomHeader(String header, String value);==== | ====void setCustomHeader(String header, String value);==== | ||
- | Define HTTP-header for browser. | + | Defines HTTP-header for browser. |
//header// - header name, //value// - header value. If //value// is empty, previously defined header will be purged. | //header// - header name, //value// - header value. If //value// is empty, previously defined header will be purged. | ||
Line 229: | Line 229: | ||
====void setEnvValue(String name, String value);==== | ====void setEnvValue(String name, String value);==== | ||
- | Save variable in browsers persistent storage. All variables are available for all browser pages. | + | Saves variable in browsers persistent storage. All variables are available for all browser pages. |
\\ \\ | \\ \\ | ||
Line 235: | Line 235: | ||
====void setDirectoryListFilters(String filters);==== | ====void setDirectoryListFilters(String filters);==== | ||
- | Setup filename filter for getDirectoryFiles and getDirectoryDirs. **|** Will be count as delimiter. \\ | + | Setups filename filter for getDirectoryFiles and getDirectoryDirs. **|** Will be count as delimiter. \\ |
**?** and ***** applicable as well. \\ | **?** and ***** applicable as well. \\ | ||
e.g. | e.g. | ||
Line 270: | Line 270: | ||
====void setStandBy(bool enabled);==== | ====void setStandBy(bool enabled);==== | ||
- | Switch STB in sleep mode (//enabled//==true) or return it to operation mode (//enabled//==false). | + | Switches STB in sleep mode (//enabled//==true) or return it to operation mode (//enabled//==false). |
\\ \\ | \\ \\ | ||
Line 281: | Line 281: | ||
====void reset();==== | ====void reset();==== | ||
- | Reset settings: \\ transparent color; \\ HTTP-header; \\ file filter. | + | Resets settings: \\ transparent color; \\ HTTP-header; \\ file filter. |
\\ \\ | \\ \\ | ||
Line 289: | Line 289: | ||
====void reset();==== | ====void reset();==== | ||
- | Reset playback. If we don't need playback after page change this routine should be called. | + | Resets playback. If we don't need playback after page change this routine should be called. |
\\ \\ | \\ \\ | ||
Line 336: | Line 336: | ||
====void unpause();==== | ====void unpause();==== | ||
- | Continue playback. | + | Continues playback. |
\\ \\ | \\ \\ | ||
Line 342: | Line 342: | ||
====void seek(int position);==== | ====void seek(int position);==== | ||
- | Set playback //position// in milliseconds. Keep in mind that beginning of playback is minPosition see below | + | Sets playback //position// in milliseconds. Keep in mind that beginning of playback is minPosition see below |
\\ \\ | \\ \\ |