Source: gSTB.js

/**
 * STB object declaration and documentation.
 * JSDoc specification ({@link http://usejsdoc.org/}).
 * An introduction to JSDoc ({@link http://www.2ality.com/2011/08/jsdoc-intro.html}).
 *
 * @fileOverview Provides general API functions.
 */

'use strict';

/* jshint unused:false */

//noinspection JSUnusedGlobalSymbols

/**
 * Main object gSTB methods declaration.
 *
 * @namespace
 */
var gSTB = {

	/**
	 * Clear player statistics.
	 *
	 * See {@link gSTB.GetStatistics}.
	 */
	ClearStatistics:
		function () {},


	/**
	 * Closes dedicated web window.
	 *
	 * @since 0.2.16
	 */
	CloseWebWindow:
		function () {},


	/**
	 * Continue playing (after {@link gSTB.Pause}) or begin anew (after {@link gSTB.Stop}).
	 */
	Continue:
		function () {},


	/**
	 * Show the contents of the string text in the stream of standard output in the format:
	 *
	 * `DEBUG: [time] text`.
	 *
	 * @param {string} text this string is shown in the stream of standard output
	 */
	Debug:
		function ( text ) {},


	/**
	 * De-initialize the player.
	 */
	DeinitPlayer:
		function () {},


	/**
	 * Delete all cookie saved by the browser.
	 */
	DeleteAllCookies:
		function () {},


	/**
	 * Assign a new status for "`App`" button handler.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | application will take control under the "`App`" button
	 *  false | the "`App`" button will be handled as a regular button
	 */
	EnableAppButton:
		function ( mode ) {},


	/**
	 * @private
	 */
	EnableCustomNavigation:
		function ( mode ) {},


	/**
	 * Enable/disable Javascript interrupt dialog, when Javascript code does not respond for some long time.
	 *
	 * Use this function only for debugging purpose.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | enable interrupt
	 *  false | disable interrupt
	 */
	EnableJavaScriptInterrupt:
		function ( mode ) {},


	/**
	 * Enable multicast proxy.
	 *
	 * If multicast proxy URL is set and multicast proxy enabled then any multicast `rtp://` or `udp://` stream
	 * will be played back via multicast proxy e.i. instead of `rtp://239.1.1.1:1234`
	 * player play the following stream: `http://[proxy_addr]/rtp/239.1.1.1:1234`
	 *
	 * See {@link gSTB.SetMulticastProxyURL}.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | enable multicast proxy
	 *  false | disable multicast proxy
	 */
	EnableMulticastProxy:
		function ( mode ) {},


	/**
	 * Enable or disable automatic start of Service Menu by pressing "`SET`" ("`service`" on old RC) button.
	 *
	 * If button "`SET`" ("service" on old RC) is already used by JavaScript code, there may be a conflict.
	 *
	 * To avoid this conflict JavaScript code should disable automatic start of Service Menu
	 * and call directly function {@link gSTB.StartLocalCfg} every time it is required.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | enable automatic start
	 *  false | disable automatic start
	 */
	EnableServiceButton:
		function ( mode ) {},


	/**
	 * Allow or forbid to set cookie from given domain.
	 *
	 * By default any domain is allowed to set cookie.
	 *
	 * Each call of this function adds domain (mode is false) or removes it (mode is true)
	 * from the list of domains that are not allowed to set cookie.
	 *
	 * @param {string} domain if mode is true then any attempt to set cookie from given domain will be ignored
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | allow to set cookie from given domain
	 *  false | forbid to set cookie from given domain
	 */
	EnableSetCookieFrom:
		function ( domain, mode ) {},


	/**
	 * Enable or disable 2D navigation (arrow navigation) on web pages.
	 *
	 * 2D navigation is disabled by default, but could be enabled on previous web page,
	 * so it is recommended to disable 2D navigation if current page does not use it.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | enable 2D navigation
	 *  false | disable 2D navigation
	 */
	EnableSpatialNavigation:
		function ( mode ) {},


	/**
	 * Enable or disable automatic show/hide of virtual keyboard by pressing "`KB`" ("`empty`" on old RC) button.
	 *
	 * If button "`KB`" ("empty" on old RC) is already used by JavaScript code, there may be a conflict.
	 *
	 * To avoid this conflict JavaScript code should disable automatic start of virtual keyboard
	 * and call directly functions {@link gSTB.ShowVirtualKeyboard} or
	 * {@link gSTB.HideVirtualKeyboard} every time it is required.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | enable automatic show/hide
	 *  false | disable automatic show/hide
	 */
	EnableVKButton:
		function ( mode ) {},


	/**
	 * Enable application defined "`TV`" button processing.
	 * When enabled "`TV`" button events will be consumed by application and will not pass to the portal web window.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | enable
	 *  false | disable
	 *
	 * @since 0.2.16
	 */
	EnableTvButton:
		function ( mode ) {},


	/**
	 * Perform the script `/home/default/action.sh` with the parameters set.
	 *
	 * @param {string} action contains parameters for the script
	 *
	 * @example
	 * // calls shell command "/home/default/action.sh param 23 s"
	 * gSTB.ExecAction('param 23 s');
	 */
	ExecAction:
		function ( action ) {},


	/**
	 * Send command to player's external protocol plugin.
	 *
	 * @param {string} id external protocol identifier
	 * @param {string} command command to execute
	 * @param {string} params command arguments
	 *
	 * @return {string} result of command execution (plugin dependant)
	 */
	ExtProtocolCommand:
		function ( id, command, params ) { return ''; },


	/**
	 * Force HDMI output to DVI mode.
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | auto detect HDMI mode
	 *  1     | force HDMI to DVI mode
	 */
	ForceHDMItoDVI:
		function ( mode ) {},


	/**
	 * Get current 3D conversion mode.
	 *
	 * See {@link gSTB.Set3DConversionMode}.
	 *
	 * @return {number}
	 */
	Get3DConversionMode:
		function () { return 0; },


	/**
	 * Receive the video window alpha transparency level.
	 *
	 * @return {number} the current value of alpha transparency for the video window
	 */
	GetAlphaLevel:
		function () { return 0; },


	/**
	 * Return the current video content format.
	 *
	 * See {@link gSTB.SetAspect}.
	 *
	 * @return {number} consists of 2 tetrads:
	 *
	 * | 7 6 5 4 | 3 2 1 0 |
	 * |---------|---------|
	 * |  aspH   |  aspL   |
	 *
	 * aspL - the aspect ratio:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | automatic
	 *  1     | 20:9
	 *  2     | 16:9
	 *  3     | 4:3
	 *
	 * aspH - conversion of video format:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | as it is (video is stretched for the whole screen)
	 *  1     | Letter box mode (video is proportionally enlarged to the size of the screen along the larger edge)
	 *  2     | Pan&Scan mode (video is proportionally enlarged to the screen size along the lesser edge)
	 *  3     | combined mode (intermediate between Letter Box Box and Pan&Scan)
	 *  4     | enlarged mode
	 *  5     | optimal mode
	 */
	GetAspect:
		function () { return 0; },


	/**
	 * Receive the number (PID) of the current audio track.
	 *
	 * The list of all audio tracks determined by the player can be received with {@link gSTB.GetAudioPIDs}.
	 *
	 * @return {number} current audio track number [0..0x1fff]
	 */
	GetAudioPID:
		function () { return 0; },


	/**
	 * Get the list of audio tracks in the stream with the description of the language.
	 *
	 * This stream can be easily converted into a structure array by calling the function `eval`.
	 *
	 * This function must be called after the `event 2` occurs (see description of events).
	 *
	 * @return {string} list of the audio tracks found in the following format:
	 *
	 * `[{pid:<PID1>, lang:[<lang1_1>, <lang2_1>]}, ... , {pid:<PIDn>, lang:[<lang1_n>, <lang2_n>]}]`
	 *
	 * where:
	 *
	 *  Value            | Description
	 * ------------------|-------------
	 *  PIDn             | PID of audio track with the number n
	 *  lang1_n, lang2_n | first two descriptions of languages in audio track
	 *  number n         | 3-symbol tags according to ISO 639
	 *
	 * @example
	 * // execution result
	 * // 2 audio streams in the stream: Russian having PID=114 and English having PID=115
	 * '[{pid:114, lang:["rus", "ru"]}, {pid:115, lang:["eng", ""]}]'
	 */
	GetAudioPIDs:
		function () { return ''; },


	/**
	 * Get the list of audio tracks in the stream with the description of the language and audio codec type.
	 *
	 * This stream can be easily converted into a structure array by calling the function `eval`.
	 * This function must be called after the `event 2` occurs (see description of events).
	 *
	 * @return {string} list of the audio tracks found in the following format:
	 *
	 * `[{pid:<PID1>, lang:[<lang1_1>, <lang2_1>], type:<type_1>}, ... , {pid:<PIDn>, lang:[<lang1_n>, <lang2_n>], type:<type_n>}]`
	 *
	 * where:
	 *
	 *  Value            | Description
	 * ------------------|-------------
	 *  PIDn             | PID of audio track with the number n
	 *  lang1_n, lang2_n | first two descriptions of languages in audio track
	 *  number n         | 3-symbol tags according to ISO 639
	 *
	 * type_n is audio codec type:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | Unknown
	 *  1     | mp2a
	 *  2     | mp3
	 *  3     | AC3
	 *  4     | AAC
	 *  5     | PCM
	 *  6     | OGG
	 *  7     | DTS
	 *
	 * @example
	 * // execution result
	 * // 2 audio streams in the stream: Russian AC3 having PID=114 and English mp3 having PID=115
	 * '[{pid:114, lang:["rus", "ru"], type:3}, {pid:115, lang:["eng", ""], type:2}]'
	 */
	GetAudioPIDsEx:
		function () { return ''; },


	/**
	 * Receive current brightness of video output in SD.
	 *
	 * @return {number} brightness of video output in SD mode [1..254]
	 */
	GetBrightness:
		function () { return 0; },


	/**
	 * Get the current buffer loading in percents.
	 *
	 * It makes sense to call this function only with the following solutions: **ffmpeg**, **ffrt**, **ffrt2**, **ffrt3**, **fm**, **file** after getting `event 2` from List of the events used and before complete buffer filling or before getting `event 4` from List of the events used.
	 *
	 * @return {number} current buffer loading in percents [0..100]
	 */
	GetBufferLoad:
		function () { return 0; },


	/**
	 * Receive current contrast of video output in SD mode.
	 *
	 * @return {number} contrast of video output in SD mode [-128..127]
	 */
	GetContrast:
		function () { return 0; },


	/**
	 * Get active bank of NAND.
	 *
	 * @return {string} the same as
	 *
	 * `/home/default/rdir.cgi GetCurrentBank`
	 */
	GetDeviceActiveBank:
		function () { return ''; },



	/**
	 * Get default update URL.
	 *
	 * @return {string} URL that can be used in update procedure
	 *
	 * @example
	 * // execution result
	 * 'http://aurahd.infomir.com.ua/imageupdate'
	 *
	 * @since 0.2.16
	 */
	GetDefaultUpdateUrl:
		function () { return ''; },


	/**
	 * Get image description.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * '0.2.18-250'
	 */
	GetDeviceImageDesc:
		function () { return ''; },


	/**
	 * Get image version.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * '218'
	 */
	GetDeviceImageVersion:
		function () { return ''; },


	/**
	 * Get current image version.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * '0.2.16-250 Tue Apr 9 18:10:19 EEST 2013'
	 */
	GetDeviceImageVersionCurrent:
		function () { return ''; },


	/**
	 * Get MAC address.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * '10:bf:48:3f:74:42'
	 */
	GetDeviceMacAddress:
		function () { return ''; },


	/**
	 * Get model of the device.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * 'MAG250'
	 */
	GetDeviceModel:
		function () { return ''; },


	/**
	 * Get STB model name.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * 'AuraHD1'
	 */
	GetDeviceModelExt:
		function () { return ''; },


	/**
	 * Get serial number.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * '052012B031491'
	 */
	GetDeviceSerialNumber:
		function () { return ''; },


	/**
	 * Get vendor information.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * 'TeleTec'
	 */
	GetDeviceVendor:
		function () { return ''; },


	/**
	 * Get hardware information.
	 *
	 * @return {string} info
	 *
	 * @example
	 * // execution result
	 * '1.9-BD-00'
	 */
	GetDeviceVersionHardware:
		function () { return ''; },


	/**
	 * Read specified boot loader’s variables.
	 *
	 * @param {string} varList list of variables names to read in **JSON** format
	 *
	 * *signature:* `{varList:Array.<string>}`
	 *
	 * @return {string} list of variables names with values and error message in **JSON** format
	 *
	 * *signature:* `{result:Object, errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name    | Description
	 * ---------|-------------
	 *  result  | holds result of operation (only pairs) and each pair name is equal to variable name, value of the pair representing value of variable in string notation
	 *  errMsg  | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode | 0 in case of success or -1 in case of general error
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetEnv('{"varList":["a", "b", "timezone_conf_int", "wifi_ssid", "tvsystem"]}'));
	 * // execution result
	 * {
	 *    result: {
	 *        a: "",
	 *        b: "",
	 *        timezone_conf_int: "plus_02_00_13",
	 *        wifi_ssid: "default_ssid",
	 *        tvsystem: "720p-60"
	 *    },
	 *    errMsg: "",
	 *    errCode: 0
	 * }
	 */
	GetEnv:
		function ( varList ) { return ''; },


	/**
	 * Get a list of loaded external protocol plugins.
	 *
	 * @return {string} list of loaded external protocol plugins in **JSON** format.
	 *
	 * *signature:* `{name:string}[]`
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetExtProtocolList());
	 * // execution result
	 * [
	 *     {name: "test"},
	 *     {name: "test2"}
	 * ]
	 */
	GetExtProtocolList:
		function () { return ''; },


	/**
	 * @private
	 *
	 * @since 0.2.16
	 */
	GetHashVersion1:
		function ( data ) {},


	/**
	 * Get HDMI connection state.
	 *
	 * @return {number} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | HDMI disconnected from TV.
	 *  1     | HDMI connected to TV, but not in active state e.i. standby mode, TV is off
	 *  2     | HDMI connected to TV in active state.
	 */
	GetHDMIConnectionState:
		function () { return 0; },


	/**
	 * Get information about bitrate variants of currently played HLS stream.
	 *
	 * @return {string} information about bitrate of HLS stream variants in **JSON** format
	 *
	 * *signature:* `{currentVariant:number, variants:Array.<number>}`
	 *
	 * Fields:
	 *
	 *  Name           | Description
	 * ----------------|-------------
	 *  currentVariant | the number of currently active variant in variants array
	 *  variants       | a list of bitrates for all variants and can be empty (available only for Apple HLS streams)
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetHLSInfo());
	 * // execution result
	 * {
	 *     currentVariant: 0,
	 *     variants: [323613, 533981, 755232, 1384811, 2020273]
	 * }
	 */
	GetHLSInfo:
		function () { return ''; },


	/**
	 * Get link status of LAN network interface (eth0).
	 *
	 * @return {boolean} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | link is active
	 *  false | no link connections
	 */
	GetLanLinkStatus:
		function () { return true; },


	/**
	 * Get the duration of the current content.
	 *
	 * @return {number} total duration of the current content in seconds
	 */
	GetMediaLen:
		function () { return 0; },


	/**
	 * Get the duration of the current content in ms.
	 *
	 * @return {number} total duration of the current content in ms
	 */
	GetMediaLenEx:
		function () { return 0; },


	/**
	 * Get metadata information stored in current content. For example, it can be data from ID3 tag from mp3 file.
	 *
	 * It makes sense to call this function after getting `event 2` from List of the events used.
	 *
	 * @return {string} metadata from the current content
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetMetadataInfo());
	 * // execution result
	 * {
	 *     album: "album_1",
	 *     album_artist: "artist_1",
	 *     artist: "artist_1",
	 *     comment: "",
	 *     composer: "",
	 *     copyright: "",
	 *     date: "2000",
	 *     disc: "",
	 *     encoder: "",
	 *     encoded_by: "",
	 *     filename: "",
	 *     genre: "",
	 *     language: "",
	 *     performer: "",
	 *     publisher: "publisher_1",
	 *     title: "track_9",
	 *     track: "9"
	 * }
	 */
	GetMetadataInfo:
		function () { return ''; },


	/**
	 * Receive the current microphone volume level.
	 *
	 * *Platform: MAG100*
	 *
	 * @return {number} the current microphone volume level [0..100]
	 */
	GetMicVolume:
		function () { return 0; },


	/**
	 * Receive the muted state of audio output.
	 *
	 * @return {number} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | output is not muted
	 *  1     | output is muted
	 */
	GetMute:
		function () { return 0; },


	/**
	 * Returns network gateways list.
	 *
	 * @return {string} list of IP addresses separated by "\n"
	 *
	 * @since 0.2.16
	 */
	GetNetworkGateways:
		function () {},


	/**
	 * Returns name servers (remote DNS servers) list.
	 *
	 * @return {string} list of DNS addresses separated by "\n"
	 *
	 * @since 0.2.16
	 */
	GetNetworkNameServers:
		function () {},


	/**
	 * Returns MAC address for WiFi interface.
	 * May return "<UNDEFINED>" if there is no WiFi interface exist.
	 */
	GetNetworkWifiMac:
		function () {},


	/**
	 * Receive the video window state.
	 *
	 * @return {boolean} the result specifies whether full screen mode is set for the video window:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | the content is displayed in a reduced window
	 *  false | the content is displayed in a full screen mode
	 */
	GetPIG:
		function () { return true; },


	/**
	 * Get the current position in percent.
	 *
	 * @return {number} the current position in percent of the whole duration of the content [0..100]
	 */
	GetPosPercent:
		function () { return 0; },


	/**
	 * Get the current position in hundredth fractions of percent.
	 *
	 * @return {number} the current position in percent of the whole duration of content [0..10000]
	 */
	GetPosPercentEx:
		function () { return 0; },


	/**
	 * Get the current position in time.
	 *
	 * @return {number} the current position in second from the beginning of content
	 */
	GetPosTime:
		function () { return 0; },


	/**
	 * Get the current position in time in ms.
	 *
	 * @return {number} the current position in ms from the beginning of content
	 */
	GetPosTimeEx:
		function () { return 0; },


	/**
	 * Returns IP address for PPPoE interface.
	 *
	 * @return {string} IP address
	 *
	 * @since 0.2.16
	 */
	GetPppoeIp:
		function () {},


	/**
	 * Returns status for PPPoE interface.
	 *
	 * @return {boolean} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | link is active
	 *  false | disconnected
	 *
	 * @since 0.2.16
	 */
	GetPppoeLinkStatus:
		function () {},


	/**
	 * Receive current saturation of video output in SD mode.
	 *
	 * @return {number} saturation of video output in SD mode [1..254]
	 */
	GetSaturation:
		function () { return 0; },


	/**
	 * Fetch available Samba workgroups.
	 *
	 * @return {string} list of Samba groups in **JSON** format
	 *
	 * *signature:* `{result:string[], errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name    | Description
	 * ---------|-------------
	 *  result  | holds result of operation
	 *  errMsg  | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode | 0 in case of success or -1 in case of general error
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetSmbGroups());
	 * // execution result
	 * {
	 *     result: ["WORKGROUP", "RESTGROUP"],
	 *     errMsg: "",
	 *     errCode: 0
	 * }
	 */
	GetSmbGroups:
		function () { return ''; },


	/**
	 * Fetch available servers for given work group.
	 *
	 * @param {string} group defines workgroup of interest in **JSON** format
	 *
	 * *signature:* `{group:string}`
	 *
	 * @return {string} list of servers in **JSON** format
	 *
	 * *signature:* `{result:string[], errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name    | Description
	 * ---------|-------------
	 *  result  | holds result of operation
	 *  errMsg  | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode | 0 in case of success or -1 in case of general error
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetSmbServers('{"group":"WORKGROUP"}'));
	 * // execution result
	 * {
	 *     result: ["ARCHIVE", "EDDY", "SANDBOX"],
	 *     errMsg: "",
	 *     errCode: 0
	 * }
	 */
	GetSmbServers:
		function ( group ) { return ''; },


	/**
	 * Fetch available Samba shares for the given server.
	 *
	 * @param {string} server defines server of interest in **JSON** format
	 *
	 * *signature:* `{server:string}`
	 *
	 * @return {string} list of Samba network shares info in **JSON** format
	 *
	 * *signature:* `{result:{shares:string[], serverIP:string}, errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name            | Description
	 * -----------------|-------------
	 *  result          | holds result of operation
	 *  result.shares   | an array of share names
	 *  result.serverIP | holds IP address of given server
	 *  errMsg          | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode         | 0 in case of success or -1 in case of general error
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetSmbShares('{"server": "ALEX-PC"}'));
	 * // execution result
	 * {
	 *     result: {
	 *         shares: ["share", "photo"],
	 *         serverIP: "192.168.100.1"
	 *     },
	 *     errMsg: "",
	 *     errCode: 0
	 * }
	 */
	GetSmbShares:
		function ( server ) { return ''; },


	/**
	 * Receive the current speed of playing.
	 *
	 * @return {number} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  1     | normal
	 *  2     | 2x
	 *  3     | 4x
	 *  4     | 8x
	 *  5     | 16x
	 *  6     | 1/2
	 *  7     | 1/4
	 *  8     | 12x
	 *  -1    | reverse
	 *  -2    | reverse 2x
	 *  -3    | reverse 4x
	 *  -4    | reverse 8x
	 *  -5    | reverse 16x
	 *  -8    | reverse 12x
	 */
	GetSpeed:
		function () { return 0; },


	/**
	 * Get the current working mode.
	 *
	 * @return {boolean} true - in standby mode
	 */
	GetStandByStatus:
		function () { return false; },


	/**
	 * Get player statistics.
	 *
	 * See {@link gSTB.ClearStatistics}.
	 *
	 * @return {string} statistics data in **JSON** format
	 *
	 * *signature:* `{CCErrorCnt:number, RTPErrorCnt:number, VideoDecodingErrorCnt:number}`
	 *
	 * Fields:
	 *
	 *  Name                  | Description
	 * -----------------------|-------------
	 *  CCErrorCnt            | continuity counter error count
	 *  RTPErrorCnt           | RTP error count
	 *  VideoDecodingErrorCnt | video decoding error count
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetStatistics());
	 * // execution result
	 * {
	 *     CCErrorCnt: 0,
	 *     RTPErrorCnt: 0,
	 *     VideoDecodingErrorCnt: 0
	 * }
	 */
	GetStatistics:
		function () { return ''; },


	/**
	 * Get all mount point info.
	 *
	 * @param {string} filter optional filter for the operation
	 *
	 * @return {string} list of storage info in **JSON** format
	 *
	 * *signature:* `{result:Object[], errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name    | Description
	 * ---------|-------------
	 *  result  | holds result of operation
	 *  errMsg  | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode | 0 in case of success or -1 in case of general error
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetStorageInfo('{}'));
	 * // execution result
	 * {
	 *     errCode : 0,
	 *     errMsg : "",
	 *     result : [
	 *         {
	 *             freeSize: 316776259584,
	 *             fsType: 5,
	 *             isReadOnly: 0,
	 *             label: "",
	 *             mediaType: 1,
	 *             model: "HGST HTS545032A7",
	 *             mountPath: "/media/HDD-SATA-1",
	 *             partitionNum: 1,
	 *             size: 320000000000,
	 *             sn: "HDD-SATA-1",
	 *             vendor: "ATA"
	 *         }
	 *     ]
	 * }
	 */
	GetStorageInfo:
		function ( filter ) { return ''; },


	/**
	 * Receive the number (PID) of the current subtitles track.
	 *
	 * The list of all subtitles track determined by the player can be received with {@link gSTB.GetSubtitlePIDs}.
	 *
	 * @return {number} current subtitles track number [0..0x1fff]
	 */
	GetSubtitlePID:
		function () { return 0; },


	/**
	 * Get the list of subtitles track in the stream with the description of the language.
	 *
	 * This string can be easily converted into a structure array by calling the function `eval`.
	 *
	 * This function must be called after the `event 2` occurs (see description of events)
	 *
	 * @return {string} list of subtitles tracks found in the following format:
	 *
	 * `[{pid:<PID1>, lang:[<lang1_1>, <lang2_1>]}, ... , {pid:<PIDn>, lang:[<lang1_n>, <lang2_n>]}]`
	 *
	 * where:
	 *
	 *  Value            | Description
	 * ------------------|-------------
	 *  PIDn             | PID of subtitle track with the number n
	 *  lang1_n, lang2_n | first two descriptions of languages in subtitle track
	 *  number n         | 3-symbol tags according to ISO 639
	 *
	 * @example
	 * // execution result
	 * // 2 subtitle tracks in the stream: Russian having PID=114 and English having PID=115
	 * '[{pid:114, lang:["rus", "ru"]}, {pid:115, lang:["eng", ""]}]'
	 */
	GetSubtitlePIDs:
		function () { return ''; },


	/**
	 * Get current teletext PID.
	 *
	 * @return {number} unique identifier of current teletext track
	 */
	GetTeletextPID:
		function () { return 0; },


	/**
	 * Get a list of teletext tracks in the stream with the description of the language.
	 *
	 * This string can be easily converted into a structure array by calling the function `eval`.
	 *
	 * This function must be called after the `event 2` occurs (see description of events).
	 *
	 * @return {string} list of teletext tracks found in the following format:
	 *
	 * `[{pid:<PID1>, lang:[<lang1_1>, <lang2_1>]}, ... , {pid:<PIDn>, lang:[<lang1_n>, <lang2_n>]}]`
	 *
	 * where:
	 *
	 *  Value            | Description
	 * ------------------|-------------
	 *  PIDn             | PID of teletext track with the number n
	 *  lang1_n, lang2_n | First two descriptions of languages in teletext track
	 *  number n         | 3-symbol tags according to ISO 639
	 */
	GetTeletextPIDs:
		function () { return ''; },


	/**
	 * Return the color considered transparent at the moment.
	 *
	 * @return {number} the color in RGB format considered transparent at the moment [0..0xffffff]
	 */
	GetTransparentColor:
		function () { return 0; },


	/**
	 * Get information about current video content.
	 *
	 * Function must be called after receiving `event 7` from List of the events used.
	 *
	 * @return {string} string in the following form:
	 *
	 * `{frameRate:25000,pictureWidth:704,pictureHeight:576,hPAR:12,vPAR:11}`
	 *
	 * where:
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  frameRate     | video frame rate
	 *  pictureWidth  | encoded video width
	 *  pictureHeight | encoded video height
	 *  hPAR and vPAR | pixel aspect ratio coefficients <br> in example above these params mean that movie aspect ratio is: (704*hPAR/vPAR)/576 = 1.333333333(3) = 4:3 for square pixels
	 */
	GetVideoInfo:
		function () { return ''; },


	/**
	 * Receive the volume level.
	 *
	 * @return {number} the current volume level [0..100]
	 */
	GetVolume:
		function () { return 0; },


	/**
	 * Return wep 128 bit keys for given password phrase.
	 *
	 * @param {string} passPhrase password phrase (1-32 symbols)
	 *
	 * @return {string} 128 bit wep key in **JSON** format
	 *
	 * *signature:* `{result:{wep128-key1:string}, errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name    | Description
	 * ---------|-------------
	 *  result  | holds result of operation
	 *  errMsg  | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode | 0 in case of success or -1 in case of general error
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetWepKey128ByPassPhrase('somepass'));
	 * // execution result
	 * {
	 *     result: {
	 *         wep128-key1: "45ef5cf636b94e08c4ecb79ebf"
	 *     },
	 *     errMsg: "",
	 *     errCode: 0
	 * }
	 */
	GetWepKey128ByPassPhrase:
		function ( passPhrase ) { return ''; },


	/**
	 * Return wep 64 bit keys for given password phrase.
	 *
	 * @param {string} passPhrase password phrase (1-32 symbols)
	 *
	 * @return {string} four 64 bit wep keys in **JSON** format
	 *
	 * *signature:* `{result:{wep64-key1:string, wep64-key2:string, wep64-key3:string, wep64-key4:string}, errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name    | Description
	 * ---------|-------------
	 *  result  | holds result of operation
	 *  errMsg  | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode | 0 in case of success or -1 in case of general error
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetWepKey64ByPassPhrase('somepass'));
	 * // execution result
	 * {
	 *     result: {
	 *         wep64-key1: "8edb8b6507",
	 *         wep64-key2: "bf2dd4fa63",
	 *         wep64-key3: "082e6fbe06",
	 *         wep64-key4: "4344499166"
	 *     },
	 *     errMsg: "",
	 *     errCode: 0
	 * }
	 */
	GetWepKey64ByPassPhrase:
		function ( passPhrase ) { return ''; },


	/**
	 * Make scan and return list of found wireless groups (SSID).
	 *
	 * @return {string} list of wireless groups info in **JSON** format
	 *
	 * *signature:* `{result:{ssid:string, auth:string, enc:string, signalInfo:string, rfInfo:string}[], errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name                 | Description
	 * ----------------------|-------------
	 *  result               | holds result of operation
	 *  result[n].ssid       | name of group
	 *  result[n].auth       | authentication method ("WPA", "WPA2", "WEPAUTO", "NONE")
	 *  result[n].enc        | encoding ("CCMP", "TKIP", "NONE")
	 *  result[n].signalInfo | signal strength (numeric value in dB)
	 *  result[n].rfInfo     | string information about channel
	 *  errMsg               | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode              | 0 in case of success or -1 in case of general error
	 *
	 * Signal strength:
	 *
	 *  Value  | Description
	 * --------|-------------
	 *  <= -80 | 20%
	 *  <= -70 | 40%
	 *  <= -60 | 60%
	 *  <= -50 | 80%
	 *  <= 0   | 100%
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetWifiGroups());
	 * // execution result
	 * {
	 *     result: [
	 *         {
	 *             ssid: "dlink",
	 *             auth: "WPA2",
	 *             enc: "TKIP",
	 *             signalInfo: "-47",
	 *             rfInfo: "Frequency:2.412 GHz (Channel 1)"
	 *         },
	 *         {
	 *             ssid: "linksys3E66",
	 *             auth: "WEPAUTO",
	 *             enc: "WEP",
	 *             signalInfo: "-67",
	 *             rfInfo: "Frequency:2.427 GHz (Channel 4)"
	 *         }
	 *     ],
	 *     errMsg: "",
	 *     errCode: 0
	 * }
	 */
	GetWifiGroups:
		function () { return ''; },


	/**
	 * Get link status of WiFi network interface.
	 *
	 * @return {boolean} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | link is active
	 *  false | no connection to wifi access point
	 */
	GetWifiLinkStatus:
		function () { return true; },


	/**
	 * Return attributes for current WiFi connection if available.
	 *
	 * @return {string} connection info in **JSON** format
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.GetWifiLinkStatusEx());
	 * // execution result
	 * {
	 *     "Bit Rate" : 0,  // in Mb/s
	 *     "Frequency" : 0.000000000000000,  // in GHz
	 *     "Noise level" : 0,
	 *     "Signal level" : 0
	 * }
	 */
	GetWifiLinkStatusEx:
		function () { return ''; },


	/**
	 * Receive the level of alpha transparency for the set window.
	 *
	 * @param {number} winNum number of the window for which this function is used:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | graphic window
	 *  1     | video window
	 *
	 * @return {number} the current value of alpha transparency for video window [0..255]
	 */
	GetWinAlphaLevel:
		function ( winNum ) { return 0; },


	/**
	 * Hide the virtual keyboard from the screen.
	 */
	HideVirtualKeyboard:
		function () {},


	/**
	 * @private
	 * @deprecated
	 */
	HideVirtualKeyboardEx:
		function () {},


	/**
	 * Block or unblock the screen browser upgrade.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | after this call the graphic window stops upgrading till the next call with the parameter false
	 *  false | after this call the graphic window resumes upgrading – passing to normal mode
	 */
	IgnoreUpdates:
		function ( mode ) {},


	/**
	 * Initialize the player.
	 *
	 * Should be called before the first use of the player.
	 */
	InitPlayer:
		function () {},


	/**
	 * Test is file name point to existing file.
	 *
	 * @param {string} fileName absolute file path which will be tested
	 *
	 * @return {boolean} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | file name is an absolute path and it points to an existing file
	 *  false | otherwise
	 */
	IsFileExist:
		function ( fileName ) { return true; },


	/**
	 * Test is file name point to existing folder.
	 *
	 * @param {string} fileName absolute file path which will be tested
	 *
	 * @return {boolean} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | file name is an absolute path and it points to an existing folder
	 *  false | otherwise
	 */
	IsFolderExist:
		function ( fileName ) { return true; },


	/**
	 * Check if the given file has UTF8 encoding.
	 *
	 * @param {string} fileName file to test
	 *
	 * @return {boolean} check result
	 */
	IsFileUTF8Encoded:
		function ( fileName ) { return true; },


	/**
	 * This function indicating that internal portal been started.
	 *
	 * @return {boolean} true when internal portal has been started
	 */
	IsInternalPortalActive:
		function () { return true; },


	/**
	 * Receive the current state of player.
	 *
	 * @return {boolean} possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | currently is playing
	 *  false | currently is not playing
	 */
	IsPlaying:
		function () { return false; },


	/**
	 * @todo add description
	 */
	IsVirtualKeyboardActive:
		function () {},


	/**
	 * @todo add description
	 */
	IsVirtualKeyboardActiveEx:
		function () {},


	/**
	 * Return the list of directories and files having the extension set with {@link gSTB.SetListFilesExt}, located in the directory dirName.
	 *
	 * @param {string} dirName route to the directory the contents whereof must be received
	 * @param {boolean} lastModified flag is the last modification time is necessary
	 *
	 * @return {string} the string in the following form is returned:
	 *
	 * `var dirs = ["dir1/", ..., "dirN/", ""]`
	 *
	 * `var files = [{"name":"fileName1", "size":size1}, ..., {"name":"fileNameM", "size":sizeM}]`
	 *
	 * where:
	 *
	 *  Value               | Description
	 * ---------------------|-------------
	 *  dirN                | the name of N-sub-directory
	 *  fileNameM and sizeM | name and size of M-file
	 */
	ListDir:
		function ( dirName, lastModified ) { return ''; },


	/**
	 * Load CAS settings from the set file.
	 *
	 * See instruction on adjusting CAS Verimatrix in the supplement.
	 *
	 * The call of the function becomes effective only if made before {@link gSTB.SetCASType}.
	 *
	 * @param {string} iniFileName address of the settings file in the root file system
	 */
	LoadCASIniFile:
		function ( iniFileName ) {},


	/**
	 * Load text subtitles from external subtitle file of srt, sub, ass formats.
	 *
	 * If subtitles are loaded successfully then external subtitle track will be added to subtitle track list with number(PID) 0x2000.
	 *
	 * If any error occurs while loading subtitles then JS API user will receive `event 8` from List of the events used.
	 *
	 * @param {string} url external subtitles address
	 *
	 * can be a local URL: `/media/USB-.../subtitles.srt` and URL from HTTP server: `http://192.168.1.1/subtitles.srt`
	 */
	LoadExternalSubtitles:
		function ( url ) {},


	/**
	 * Reload portal window from the specified URL.
	 *
	 * @param {string} url new portal window address
	 */
	LoadURL:
		function ( url ) {},


	/**
	 * Load file from `/mnt/Userfs/data/*`.
	 *
	 * @param {string} fileName name of the file with data
	 *
	 * @returns {string} file content
	 *
	 * @example
	 * // get content of the file mnt/Userfs/data/test
	 * gSTB.LoadUserData('test');
	 */
	LoadUserData:
		function ( fileName ) {},


	/**
	 * Pause current playback.
	 *
	 * {@link gSTB.Continue} continues playing from the current position.
	 */
	Pause:
		function () {},


	/**
	 * Start playing media content as specified in playStr.
	 *
	 * Can use the given proxy server for HTTP playback.
	 *
	 * Proxy server settings are valid till the next call of {@link gSTB.Play}.
	 *
	 * @param {string} playStr format: `solution URL [position:pnum] [atrack:anum] [vtrack:vnum] [strack:snum] [subURL:subtitleUrl]`
	 *
	 *  Option             | Description
	 * --------------------|-------------
	 *  solution           | Media content type. Depends on the IPTV-device type (see Appendix 2 for the table of supported formats and the description of media content types).
	 *  URL                | Address of the content to be started for playing. Depends on the type (see more detailed information in Appendix 2).
	 *  atrack:anum        | Sets the number(PID) of audio track (optional parameter).
	 *  vtrack:vnum        | Sets the number(PID) of audio track (optional parameter).
	 *  strack:snum        | Sets the number(PID) of subtitle track (optional parameter).
	 *  subURL:subtitleURL | Sets the URL of external subtitles file. See {@link gSTB.LoadExternalSubtitles} (optional parameter).
	 *
	 * @param {string} [proxyParams] format: `http://[username[:password]@]proxy_addr:proxy_port`
	 *
	 * Proxy server settings are affect only HTTP playback and valid till the next call of {@link gSTB.Play}.
	 */
	Play:
		function ( playStr, proxyParams ) {},


	/**
	 * Play media content of the preset type (solution) from the preset URL.
	 *
	 * @param {string} solution corresponds to the parameter solution from the function {@link gSTB.Play}
	 * @param {string} url address of the content to be started for playing
	 *
	 * depends on the type (see more detailed information in supplement 2)
	 */
	PlaySolution:
		function ( solution, url ) {},


	/**
	 * Perform script `/home/default/rdir.cgi` with set parameters and return the standard output of this script.
	 *
	 * The rdir.cgi supplied with the root file system has several commands presets:
	 *
	 *  Command             | Description
	 * ---------------------|-------------
	 *  SerialNumber        | x returns serial number of this device to x
	 *  MACAddress          | receive MAC address
	 *  IPAddress           | receive IP address (wired)
	 *  WiFi_ip             | receive IP address (wifi)
	 *  HardwareVersion     | receive hardware version
	 *  Vendor              | receive the name of STB manufacturer
	 *  Model               | receive the name of STB pattern
	 *  ImageVersion        | receive the version of the software flash image
	 *  ImageDescription    | receive the information on the image of the software flash
	 *  ImageDate           | receive the date of creation of the flash software image
	 *  getenv v_name       | receive the value of environment variable with the name v_name <br> see detailed description of operations with environment variables in supplement 11
	 *  setenv v_name value | set environment variable with the name v_name to the value value <br> See detailed description of operations with environment variables in supplement 11
	 *  ResolveIP hostname  | resolve hostname to IP address
	 *  SHA1 text           | calculate SHA1 checksum
	 *
	 * @param {string} value contains parameters with which the script `/home/default/rdi.cgi` is started
	 *
	 * @return {string} standard output received by performing the script with parameters set
	 *
	 * @example
	 * // mount anonymous SMB share
	 * gSTB.RDir('mount cifs "//192.168.1.91/some share name" "/ram/mnt/smb" username=guest,password=,iocharset=utf8');
	 *
	 * @example
	 * // mount SMB share with credentials
	 * gSTB.RDir('mount cifs "//192.168.1.91/some share name" "/ram/mnt/smb" username=some_name,password=some_pass,iocharset=utf8');
	 *
	 * @example
	 * // mount NFS share
	 * gSTB.RDir('mount nfs "192.168.1.72:/home/user/share" "/ram/mnt/nfs" nolock,ro,rsize=4096,wsize=4096,udp');
	 *
	 * @example
	 * // hardware info
	 * gSTB.RDir('SerialNumber');
	 * // execution result
	 * '052012B031491'
	 */
	RDir:
		function ( value ) { return ''; },


	/**
	 * Read the file of portal settings `/etc/stb_params`.
	 *
	 * @return {string} the contents of the file `/etc/stb_params`
	 */
	ReadCFG:
		function () { return ''; },


	/**
	 * Clear all User File System data.
	 */
	ResetUserFs:
		function () {},


	/**
	 * Rotate video.
	 * Can rotate images on other platforms.
	 *
	 * *Platform: MAG100*
	 *
	 * @param {number} angle rotates the video window contents by the preset angle relative to the initial position
	 *
	 * allowed values: 0, 90, 180, 270.
	 */
	Rotate:
		function ( angle ) {},


	/**
	 * Save file at `/mnt/Userfs/data/*`.
	 *
	 * @param {string} fileName file name
	 * @param {string} fileData data for saving
	 */
	SaveUserData:
		function ( fileName, fileData ) {},


	/**
	 * Send an event to portal WebKit window.
	 *
	 * You can handle the event by defining event handler: `stbEvent.onPortalEvent(string)`.
	 *
	 * @param {string} event this argument will be passed to event handler {@link stbEvent.onPortalEvent}
	 */
	SendEventToPortal:
		function ( event ) {},


	/**
	 * Execute control actions for background service.
	 *
	 * @param {string} serviceName service name (e.g. "network", "pppoe", "wifi")
	 * @param {string} action action to execute for given service (e.g. "start", "stop", "restart")
	 *
	 * @return {string} status data in **JSON** format
	 *
	 * *signature:* `{result:{status:string}, errMsg:string, errCode:number}`
	 *
	 * Fields:
	 *
	 *  Name          | Description
	 * ---------------|-------------
	 *  result        | holds result of operation
	 *  result.status | value is always "ok"
	 *  errMsg        | empty string in case of success or non-localized string that representing error condition otherwise
	 *  errCode       | 0 in case of success or -1 in case of general error
	 *
	 * @example
	 * // parsed JSON data
	 * JSON.parse(gSTB.ServiceControl('name', 'action'));
	 * // execution result
	 * {
	 *     result: {
	 *         status: "ok"
	 *     },
	 *     errMsg: "",
	 *     errCode: 0
	 * }
	 */
	ServiceControl:
		function ( serviceName, action ) { return ''; },


	/**
	 * Set 3D conversion mode.
	 *
	 * See {@link gSTB.Get3DConversionMode}.
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | Treat video as normal 2D video. Default mode. In case of top-bottom or side-by-side 3D video player displays both stereo views so TV can reproduce 3D video (with half resolution).
	 *  1     | Treat video as 3D video in top-bottom(over-under) format with half resolution of each stereo view. In that mode player will stretch top half of the video into fullscreen according to specified aspect.
	 *  2     | Treat video as 3D video in top-bottom(over-under) format with full resolution of each stereo view. In that mode player will stretch top half of the video into fullscreen according to specified aspect. The difference between STB_3D_MODE_TOP and STB_3D_MODE_TOP_HALF is that STB_SetAspect with other than auto mode gives different behaviour and in case of resulting video will be Full resolution HD.
	 *  3     | Treat video as 3D video in side-by-side format with half resolution of each stereo view. In that mode player will stretch left half of the video into fullscreen according to specified aspect.
	 */
	Set3DConversionMode:
		function ( mode ) {},


	/**
	 * Set additional CAS parameters.
	 *
	 * Call of the function becomes effective only if made before {@link gSTB.SetCASType}.
	 *
	 * @param {string} paramName additional parameter name
	 * @param {string} paramValue additional parameter value
	 */
	SetAdditionalCasParam:
		function ( paramName, paramValue ) {},


	/**
	 * Set alpha transparency of the video window.
	 *
	 * @param {number} alpha transparency of the video window (0 - completely transparent, 255 - completely opaque)
	 */
	SetAlphaLevel:
		function ( alpha ) {},


	/**
	 * Set video picture format.
	 *
	 * Player uses aspL only in windows mode, while aslH only in full screen mode (see {@link gSTB.SetPIG}).
	 *
	 * See {@link gSTB.GetAspect}.
	 *
	 * @param {number} aspect sets the video picture format
	 *
	 * consists of 2 tetrads:
	 *
	 * | 7 6 5 4 | 3 2 1 0 |
	 * |---------|---------|
	 * |  aspH   |  aspL   |
	 *
	 * aspL - the aspect ratio:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | automatic
	 *  1     | 20:9
	 *  2     | 16:9
	 *  3     | 4:3
	 *
	 * aspH - conversion of video format:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | as it is (video is stretched for the whole screen)
	 *  1     | Letter box mode (video is proportionally enlarged to the size of the screen along the larger edge)
	 *  2     | Pan&Scan mode (video is proportionally enlarged to the screen size along the lesser edge)
	 *  3     | combined mode (intermediate between Letter Box Box and Pan&Scan)
	 *  4     | enlarged mode
	 *  5     | optimal mode
	 *
	 * @example
	 * // Stretch
	 * gSTB.SetAspect(0x00);
	 * // Fit on
	 * gSTB.SetAspect(0x10);
	 * // Zoom
	 * gSTB.SetAspect(0x40);
	 * // Optimal
	 * gSTB.SetAspect(0x50);
	 */
	SetAspect:
		function ( aspect ) {},


	/**
	 * Set languages of audio tracks to be automatically selected when receiving the information on the channel.
	 *
	 * Each param is a 3–symbol tags according to ISO 639, for example: "rus" or "eng".
	 *
	 * If the information of several audio tracks is present the player selects the track preset by the language priLang.
	 *
	 * If such track is not found, the track with the language secLang is selected.
	 *
	 * If this one is not found either the first track from the list is selected.
	 *
	 * @param {string} priLang primary language
	 * @param {string} secLang secondary language
	 */
	SetAudioLangs:
		function ( priLang, secLang ) {},


	/**
	 * Set Operational Mode for DolbyDigital audio.
	 *
	 * Affects only DolbyDigital audio.
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | RF mode
	 *  1     | Line mode
	 *  2     | Custom0
	 *  3     | Custom1
	 */
	SetAudioOperationalMode:
		function ( mode ) {},


	/**
	 * Set track number (PID) for audio.
	 *
	 * @param {number} pid sets the number or PID of the audio track to be played in the current content
	 *
	 * if such track is absent the sound will be disabled
	 */
	SetAudioPID:
		function ( pid ) {},


	/**
	 * Set the current AutoFrameRate mode, which allows to automatically switch frame rate of HDMI video output according to a content frame rate.
	 *
	 * Auto frame rate switching works with ffmpeg, file, ffrt2, ffrt3 solutions if player has managed to detect frame rate of content.
	 *
	 * Auto frame rate switching works only on HDMI output in the following modes: 720p-50/60, 1080i-50/60 and 1080p-50/60. In 720p-50/60 modes player can switch only to 720p-50/60 modes.
	 *
	 * After stopping playback video output switches back to original frame rate.
	 *
	 * Warning: Not every TV supports 1080p-24 video mode.
	 *
	 * @param {number} mode contains bit flags which specify a set of frame rates to which video output can automatically switch:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  1     | can switch to 1080p-24 mode
	 *  2     | can switch to 720p-50, 1080i-50, 1080p-50 modes
	 *  4     | can switch to 720p-60, 1080i-60, 1080p-60
	 *
	 * @example
	 * // disables auto frame rate switching
	 * gSTB.SetAutoFrameRate(0);
	 * // enables switching to frame rates 24,50 and 60
	 * gSTB.SetAutoFrameRate(7);
	 */
	SetAutoFrameRate:
		function ( mode ) {},


	/**
	 * Set the brightness of video output in SD mode.
	 *
	 * @param {number} brightness brightness in the SD mode [1..254]
	 */
	SetBrightness:
		function ( brightness ) {},


	/**
	 * Set input buffer size for buffering support.
	 *
	 * Buffering works only with the following solutions: ffmpeg, ffrt, ffrt2, ffrt3, fm, file.
	 *
	 * After start of playback with mentioned above solution the following stages take place:
	 *
	 * - opening content for playback
	 * - determining content information (raised `event 2` from List of the events used)
	 * - input buffer filling stage
	 * - after complete buffer filling stream data go to decoding
	 * - decoded data go to outputs (raised `event 4` from List of the events used)
	 *
	 * @param {number} sizeInMs buffer size in ms
	 * @param {number} maxSizeInBytes maximum buffer size in bytes
	 *
	 * used ONLY to limit maximum amount of allocated memory but not as the primary buffer size
	 */
	SetBufferSize:
		function ( sizeInMs, maxSizeInBytes ) {},


	/**
	 * Set hard or soft mode of descrambling.
	 *
	 * At present the use of the function is expedient only for CAS Verimatrix.
	 *
	 * Depending on the mode set, the player can descramble only the streams scrambled by the following algorithm:
	 *
	 * - Soft mode: RC4, AES
	 * - Hard mode: AES, DVB-CSA
	 *
	 * This mode is set only once after the start of the portal.
	 *
	 * The call of the function becomes effective only if it is called before {@link gSTB.SetCASType}.
	 *
	 * @param {number} isSoftware possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | use hard descrambling
	 *  1     | use soft descrambling
	 *
	 * In the absence of this call soft descrambling is used.
	 */
	SetCASDescrambling:
		function ( isSoftware ) {},


	/**
	 * Set CAS server parameters.
	 *
	 * Call of the function becomes effective only if made before {@link gSTB.SetCASType}.
	 *
	 * @param {string} serverAddress CAS server URL
	 * @param {number} serverPort CAS server port
	 * @param {string} companyName name of the company under which this operator is registered on CAS server
	 * @param {number} opID operator identifier used by STB (if opID is equal to -1, the value is not updated)
	 * @param {number} errorLevel level of error (0 – minimal level, if error Level equals -1 it is not updated)
	 */
	SetCASParam:
		function ( serverAddress, serverPort, companyName, opID, errorLevel ) {},


	/**
	 * Set default access server type after each start of the portal.
	 *
	 * Set default server type once after each start of the portal.
	 *
	 * @param {number} type possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | not set
	 *  1     | Verimatrix
	 *  2     | SecureMedia
	 *  4-10  | custom CAS plugin with corresponding number
	 */
	SetCASType:
		function ( type ) {},


	/**
	 * Enable or disable SSL certificate checking while playing back HTTPS streams.
	 *
	 * @param {number} enable possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | disable check
	 *  1     | enable check (default)
	 */
	SetCheckSSLCertificate:
		function ( enable ) {},


	/**
	 * Set the preset color and mask for using as ChromaKey (the transparency of any color on the whole window).
	 *
	 * Any changes on the screen shall be visible only subject to switching on the regime ChromaKey by the functions {@link gSTB.SetMode} or {@link gSTB.SetWinMode}.
	 *
	 * @param {number} key sets the color in RGB
	 *
	 * if the color of a window pixel coincides with this color after masking, the pixel is considered transparent
	 *
	 * @param {number} mask set the mask for key
	 *
	 * if the mask is equal to 0xffffff, the color set by the parameter key is considered transparent
	 */
	SetChromaKey:
		function ( key, mask ) {},


	/**
	 * Switch RGB/YUV Component output mode.
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | YUV mode
	 *  1     | RGB mode (available only for SD mode)
	 */
	SetComponentMode:
		function ( mode ) {},


	/**
	 * Set contrast of video output in SD mode.
	 *
	 * @param {number} level video output contrast in SD mode [-128..127]
	 */
	SetContrast:
		function ( level ) {},


	/**
	 * Set custom header that will be inserted into all HTTP and RTSP requests from player.
	 *
	 * Takes effect on next playback.
	 *
	 * @param {string} headerStr custom HTTP header without new line
	 *
	 * @example
	 * gSTB.SetCustomHeader('CustomHeader1: value1');
	 */
	SetCustomHeader:
		function ( headerStr ) {},


	/**
	 * Turn on/off flicker-filter with the default parameters.
	 *
	 * Flicker filter is applicable only for graphic window, this is why it is recommended to set its only once and keep it switched.
	 *
	 * @param {number} state possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | switch off
	 *  1     | switch on (default values for sharpness and flicker are set)
	 */
	SetDefaultFlicker:
		function ( state ) {},


	/**
	 * Set dynamic range compression for DolbyDigital audio.
	 *
	 * @param {number} high compression level for high range (0 – DRC is off)
	 * @param {number} low compression level for low range (0 – DRC is off)
	 */
	SetDRC:
		function ( high, low ) {},


	/**
	 * Setup values of specified boot loader’s variables.
	 *
	 * @param {string} envList set of variables (name and value) in **JSON** format
	 *
	 * If referencing variable does not exist it will be created. If new value is empty string then value will be deleted.
	 *
	 * @return {boolean} operation status
	 *
	 * @example
	 * gSTB.SetEnv('{"tvsystem":"720p-60", "language":"en"}'));
	 */
	SetEnv:
		function ( envList ) { return true; },


	/**
	 * Set flicker-filter parameters.
	 *
	 * Flicker filter is applicable only for graphic window, therefore it is advised to set it only once during loading and not to switch it off.
	 *
	 * flk and shp parameters are ignored.
	 *
	 * @param {number} state possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | switch off the flicker-filter
	 *  1     | switch on the flicker-filter
	 *
	 * @param {number} flk flicker level
	 * @param {number} shp sharpness level
	 */
	SetFlicker:
		function ( state, flk, shp ) {},


	/**
	 * Set HDMI audio format.
	 *
	 * @param {number} type possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | HDMI transmits PCM audio
	 *  1     | HDMI transmits S/PDIF audio (in that case S/PDIF output mode is set by {@link gSTB.SetupSPdif})
	 */
	SetHDMIAudioOut:
		function ( type ) {},


	/**
	 * @todo add description
	 */
	SetInternalPortalActive:
		function ( mode ) {},


	/**
	 * Set the list of file extensions for returning to the function {@link gSTB.ListDir}.
	 *
	 * @param {string} fileExtensions list of files extensions followed by a space
	 *
	 * @example
	 * gSTB.SetListFilesExt('.mkv .mov .mpg');
	 */
	SetListFilesExt:
		function ( fileExtensions ) {},


	/**
	 * Set or cancels repeated playing.
	 *
	 * @param {number} loop possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | switch off repeated playing on the content
	 *  1     | switch on repeated playing on the content
	 */
	SetLoop:
		function ( loop ) {},


	/**
	 * Set the microphone volume level.
	 *
	 * *Platform: MAG100*
	 *
	 * @param {number} micVol set the microphone volume level [0..100]
	 *
	 * (0 – minimal volume, 100 – maximal volume)
	 */
	SetMicVolume:
		function ( micVol ) {},


	/**
	 * Switch on (mode=1) or switch off (mode=0) the mode ChromaKey for the video window.
	 *
	 * @param {number} mode ChromaKey mode for the video window (0 – off, 1 – on)
	 *
	 * the parameters set by {@link gSTB.SetChromaKey} and {@link gSTB.SetTransparentColor} shall be valid if the on-mode is used
	 */
	SetMode:
		function ( mode ) {},


	/**
	 * Set URL for multicast proxy.
	 *
	 * See {@link gSTB.EnableMulticastProxy}.
	 *
	 * @param {string} proxyAddress proxy address in the following form: `http://address[:port]`
	 */
	SetMulticastProxyURL:
		function ( proxyAddress ) {},


	/**
	 * Switch off or on the sound restoring the volume level.
	 *
	 * After the cycle of switching off/on with this function is completed the volume level remains unchanged.
	 *
	 * @param {number} mute switches on/off the sound (0 – on, 1 – off)
	 */
	SetMute:
		function ( mute ) {},


	/**
	 * True to apply new native string handling without utf8/utf16 encoding/decoding.
	 *
	 * @param {boolean} mode true - all string manipulations are with utf16 strings
	 */
	SetNativeStringMode:
		function ( mode ) {},


	/**
	 * Set WebKit cache capacity.
	 *
	 * *For testing purpose only.*
	 *
	 * @param {number} cacheMinDeadCapacity
	 * @param {number} cacheMaxDead
	 * @param {number} totalCapacity
	 *
	 * @deprecated
	 */
	SetObjectCacheCapacities:
		function ( cacheMinDeadCapacity, cacheMaxDead, totalCapacity ) {},


	/**
	 * Set special playback mode.
	 *
	 * *For testing purpose only.*
	 *
	 * @param {boolean} enable
	 *
	 * @deprecated
	 */
	SetPCRModeEnabled:
		function ( enable ) {},


	/**
	 * Set position and mode of video window.
	 *
	 * @param {number} state possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | show the video in the specified rectangle
	 *  1     | show the video on full screen
	 *
	 * @param {number} scale the scale of the video window
	 *
	 * the present multiplier of the video window size equals to scale/256
	 *
	 * @param {number} x horizontal offset of the upper left corner of the video window from the screen edge
	 * @param {number} y vertical offset of the upper left corner of the video window from the screen edge
	 */
	SetPIG:
		function ( state, scale, x, y ) {},


	/**
	 * Set cache limit for pixmaps.
	 *
	 * *For testing purpose only.*
	 *
	 * @param {number} sizeKb
	 *
	 * @deprecated
	 */
	SetPixmapCacheSize:
		function ( sizeKb ) {},


	/**
	 * Set the current position in percent.
	 *
	 * @param {number} prc the position in percent [0..100] of the total duration of the content where playback should start
	 */
	SetPosPercent:
		function ( prc ) {},


	/**
	 * Set the current position in hundredth fractions of percent.
	 *
	 * @param {number} prc position in hundredth fractions of percent [0..10000] of the total duration of the content, from which the playback should start
	 */
	SetPosPercentEx:
		function ( prc ) {},


	/**
	 * Set the new position of playback in time.
	 *
	 * @param {number} time the position in seconds (time >= 0) from the beginning of the content where the playback should start (positioning in the content)
	 */
	SetPosTime:
		function ( time ) {},


	/**
	 * Set the current playback position in time (ms).
	 *
	 * @param {number} time position in ms (time >= 0) from the beginning of the content where playback should start (positioning in the content)
	 */
	SetPosTimeEx:
		function ( time ) {},


	/**
	 * Set the saturation of video output in SD mode.
	 *
	 * @param {number} sat saturation of video output in SD mode [1..254]
	 */
	SetSaturation:
		function ( sat ) {},


	/**
	 * Set a screensaver activation time on idle.
	 *
	 * @param {number} timeSec 0 - disable screensaver, 1-59 value ceiling to 60
	 */
	SetScreenSaverTime:
		function ( timeSec ) {},


	/**
	 * Set a screensaver window init parameters.
	 *
	 * @param {string} options parameters from function {@link stbWindowMgr.windowInit}
	 *
	 * @since 2.18
	 */
	SetScreenSaverInitAttr:
		function ( options ) {},


	/**
	 * Set the system settings window init parameters.
	 *
	 * @param {string} options parameters from function {@link stbWindowMgr.windowInit}
	 *
	 * @since 2.18
	 */
	SetSettingsInitAttr:
		function ( options ) {},


	/**
	 * Set the rate of playing.
	 *
	 * @param {number} speed sets new playback speed [-8..8]
	 *
	 *  Value | Description
	 * -------|-------------
	 *  1     | normal
	 *  2     | 2x
	 *  3     | 4x
	 *  4     | 8x
	 *  5     | 16x
	 *  6     | 1/2
	 *  7     | 1/4
	 *  8     | 12x
	 *  -1    | reverse
	 *  -2    | reverse 2x
	 *  -3    | reverse 4x
	 *  -4    | reverse 8x
	 *  -5    | reverse 16x
	 *  -8    | reverse 12x
	 */
	SetSpeed:
		function ( speed ) {},


	/**
	 * Set stereo mode.
	 *
	 * Mono, Mono left and Mono right modes affect only Dual Mono DolbyDigital audio.
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | Stereo mode.
	 *  1     | Mono mode. Left and right channels are mixed and sent to both audio outputs.
	 *  2     | Mono left. Left channel audio are sent to both audio outputs.
	 *  3     | Mono right. Right channel audio are sent to both audio outputs.
	 *  4     | Lt/Rt mode.
	 */
	SetStereoMode:
		function ( mode ) {},


	/**
	 * Set the languages of subtitles tracks to be automatically selected when receiving the information on the channel.
	 *
	 * Each param is a 3–symbol tags according to ISO 639 (e.g. "rus" or "eng").
	 *
	 * If the information of several audio tracks is present the player selects the track preset by the language priLang.
	 *
	 * If such track is not found, the track with the language secLang is selected.
	 *
	 * If this one is not found either the first track from the list is selected.
	 *
	 * @param {string} priLang primary language
	 * @param {string} secLang secondary language
	 */
	SetSubtitleLangs:
		function ( priLang, secLang ) {},


	/**
	 * Set the number of track (PID) for subtitles.
	 *
	 * @param {number} pid set the number or PID for the subtitles track to be played in the current content
	 *
	 * if this track is absent subtitles will be disabled
	 */
	SetSubtitlePID:
		function ( pid ) {},


	/**
	 * Set subtitle mode.
	 *
	 * For MAG100 subtitles are displayed only in full screen mode.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | subtitles on
	 *  false | subtitles off
	 */
	SetSubtitles:
		function ( mode ) {},


	/**
	 * Set color for text subtitles.
	 *
	 * @param {number} rgbColor color in RGB format
	 *
	 * @example
	 * // set gray color of text subtitles
	 * gSTB.SetSubtitlesColor(0x808080);
	 */
	SetSubtitlesColor:
		function ( rgbColor ) {},


	/**
	 * Set the encoding which will be used to display external subtitles.
	 *
	 * @param {string} encoding encoding for external subtitles
	 *
	 * for example: "utf-8", "cp1250", "cp1251", "cp1252", ..., "cp1258", "iso8859-1", ... , "iso8859-16"
	 */
	SetSubtitlesEncoding:
		function ( encoding ) {},


	/**
	 * Set the font for displaying text subtitles.
	 *
	 * @param {string} font font file address in the root file system (e.g. `/home/default/arial.ttf`)
	 */
	SetSubtitlesFont:
		function ( font ) {},


	/**
	 * Set the offset for displaying text subtitles.
	 *
	 * @param {number} offset horizontal offset of subtitles
	 */
	SetSubtitlesOffs:
		function ( offset ) {},


	/**
	 * Set the size of text subtitles (in pixels).
	 *
	 * @param {number} size size of text subtitles
	 */
	SetSubtitlesSize:
		function ( size ) {},


	/**
	 * *For testing purpose only.*
	 *
	 * @param {number} intVal1
	 * @param {number} intVal2
	 *
	 * @deprecated
	 */
	SetSyncCorrection:
		function ( intVal1, intVal2 ) {},


	/**
	 * *For testing purpose only.*
	 *
	 * @param {number} intVal
	 *
	 * @deprecated
	 */
	SetSyncOffsetCorrection:
		function ( intVal ) {},


	/**
	 * Setup logging level via JS API.
	 *
	 * This function just enables logging to syslog but does not start/configure syslogd.
	 *
	 * syslogd should be configured (if needed) by operator who creates custom software images.
	 *
	 * @param {number} level logging level which should be OR-ed value of the following levels:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | quiet level, logging disabled (default)
	 *  1     | error level, e.i. "RTP counter error", "TS Continuity Counter error", "Video decoding error"
	 *  2     | warning level
	 *  4     | info level, e.i. "Starting playback", "External subtitles opening error", "Content opening error", "End of Stream"
	 *  8     | debug level, e.i.: {@link gSTB.Debug} from JS API do not filter frequent error events.
	 *
	 * By default logging is set to quiet mode.
	 *
	 * @example
	 * // enables error(1) and info(4) logging levels
	 * gSTB.SetSyslogLevel(5);
	 */
	SetSyslogLevel:
		function ( level ) {},


	/**
	 * Enable/disable teletext.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | enable teletext
	 *  false | disable teletext
	 */
	SetTeletext:
		function ( mode ) {},


	/**
	 * Set track number (PID) for teletext.
	 *
	 * @param {number} pid sets the number or PID of the teletext track to be played in the current content
	 */
	SetTeletextPID:
		function ( pid ) {},


	/**
	 * Set the preset window over others.
	 *
	 * @param {number} winNum number of the window for which this function is used:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | graphic window
	 *  1     | video window
	 */
	SetTopWin:
		function ( winNum ) {},


	/**
	 * Get current top window number.
	 *
	 * @return {number} number of window which is in top position now:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | graphic window
	 *  1     | video window
	 */
	GetTopWin:
		function () {},


	/**
	 * Set the color considered transparent at the moment.
	 *
	 * The function is a special case of {@link gSTB.SetChromaKey}.
	 *
	 * Any changes on the screen are visible only provided the ChromaKey mode is switched on by functions {@link gSTB.SetMode} or {@link gSTB.SetWinMode}.
	 *
	 * @param {number} color color in RGB format that can be considered transparent [0..0xffffff]
	 */
	SetTransparentColor:
		function ( color ) {},


	/**
	 * Set client to STB.
	 *
	 * @param {number} type supported RTSP-server types:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | RTSP server based on VLC
	 *  1     | BitBand RTSP server
	 *  2     | Kasenna RTSP server
	 *  3     | ARRIS (C-COR) RTSP server
	 *  4     | Live555 RTSP server
	 *  5     | ZTE RTSP server
	 *  6     | Netup RTSP server
	 *
	 * @param {number} flags control flags:
	 *
	 *  Value     | Description
	 * -----------|-------------
	 *  1         | switch on the keep-alive mode
	 *  2         | determination of the stream end by the field x-notice in the message ANNOUNCE from the server
	 *  4         | determination of te stream end by the field x-notice in the answer to GET_PARAMETER
	 *  8         | determination of the stream end after a period of time of the video stream from the server absence
	 *  16 (0x10) | determination of the stream end by the field according to the field rtptime sent in the RTP heading of the package (only for the mode of sending video under RTP)
	 *  32 (0x20) | Use UDP transport to send video
	 */
	SetupRTSP:
		function ( type, flags ) {},


	/**
	 * Set the mode of sound output through S/PDIF.
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | the sound is supplied only to analogue output
	 *  1     | sound is supplied to analogue output and through S/PDIF in tne format 2-channel PCM
	 *  2     | sound is supplied to S/PDIF without decoding (AC3 ...), if supported by codec, otherwise through S/PDIF in the format of 2-channel PCM
	 */
	SetupSPdif:
		function ( mode ) {},


	/**
	 * Set the control mode of flicker-filter.
	 *
	 * See {@link gSTB.SetFlicker}, {@link gSTB.SetDefaultFlicker}.
	 *
	 * *Platform: MAG100*
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | API user controls flicker-filter himself.
	 *  1     | The player automatically switches on flicker-filter during pauses and stops and switches it off during playing.
	 */
	SetUserFlickerControl:
		function ( mode ) {},


	/**
	 * Set the video window control mode.
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | the device automatically switches on the video window at the beginning of playing and switches it off when stops
	 *  1     | API user uses {@link gSTB.SetVideoState} for instructing whether to show the video window or not
	 */
	SetVideoControl:
		function ( mode ) {},


	/**
	 * Switch on/off the video window.
	 *
	 * Valid only if user control had been allowed with {@link gSTB.SetVideoControl}.
	 *
	 * @param {number} state allow/prohibit video display:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | video window is not displayed
	 *  1     | video window is displayed if the stream is present
	 */
	SetVideoState:
		function ( state ) {},


	/**
	 * Set the location and size of the video window.
	 *
	 * Parameters `xSize` and `ySize` depends on the screen resolution.
	 *
	 * @param {number} xSize horizontal size of the video window (width)
	 * @param {number} ySize vertical size of the video window (height)
	 * @param {number} x left upper corner of the video window horizontal offset from the screen edge
	 *
	 * must not exceed the screen width in sum with `xSize`
	 *
	 * @param {number} y left upper cornet of the video window vertical offset from the screen edge
	 *
	 * must not exceed the screen width in sum with `ySize`
	 */
	SetViewport:
		function ( xSize, ySize, x, y ) {},


	/**
	 * Set video plane position and size in pixels and clipping rectangle for input video.
	 * More flexible version of {@link gSTB.SetViewport}.
	 *
	 * Clip rectangle specifies which sub-rectangle will be shown in specified video window rectangle (stretched to fill whole video window).
	 * If clip_xsize==0 or clip_ysize==0 then clip will be ignored.
	 *
	 * If clip rectangle is ignored or has size equal to encoded video size then aspect ratio conversion will be performed inside specified video window rectangle according to the current aspect for fullscreen mode. This does not depend on specified video window size.
	 * At the same time {@link gSTB.SetViewport} function does aspect ratio conversion only in fullscreen mode.
	 *
	 * Clip rectangle size and position should be in pixels of the encoded video.
	 * Width and height of encoded video can be retrieved via {@link gSTB.GetVideoInfo}.
	 * See pictureWidth and pictureHeight.
	 *
	 * @param {number} xSize horizontal size of the video window (width)
	 * @param {number} ySize vertical size of the video window (height)
	 * @param {number} xPos left upper corner of the video window horizontal offset from the screen edge
	 *
	 * must not exceed the screen width in sum with `xSize`
	 *
	 * @param {number} yPos left upper cornet of the video window vertical offset from the screen edge
	 *
	 * must not exceed the screen width in sum with `ySize`
	 *
	 * @param {number} clipXSize clip rectangle horizontal size
	 * @param {number} clipYSize clip rectangle vertical size
	 * @param {number} clipXPos clip rectangle horizontal offset related to encoded video
	 * @param {number} clipYPos clip rectangle vertical offset related to encoded video
	 * @param {boolean} saveClip whether player should save clip region over the sequential playbacks:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | use this clip only for current playback
	 *  false | use this clip till next call of STB_SetViewportEx, STB_SetViewport, STB_SetPIG
	 */
	SetViewportEx:
		function ( xSize, ySize, xPos, yPos, clipXSize, clipYSize, clipXPos, clipYPos, saveClip ) {},


	/**
	 * Set volume level.
	 *
	 * @param {number} volume volume level (0 - no sound, 100 - maximal level)
	 */
	SetVolume:
		function ( volume ) {},


	/**
	 * @todo add description
	 */
	SetWebMode:
		function ( mode, strVal ) {},


	/**
	 * Given proxy settings are only applied to `http://` or `https://` requests of the browser, but not applied to content playback from HTTP server.
	 *
	 * For this purpose please use extended {@link gSTB.Play} using proxy server.
	 *
	 * @param {string} proxyAddress proxy server address
	 * @param {number} proxyPort proxy server port
	 * @param {string} userName user name for proxy server (can be empty)
	 * @param {string} password password for proxy server (can be empty)
	 * @param {string} excludeList proxy exclude list delimited by spaces
	 *
	 * access to any entry in the list is performed directly, without proxy e.i. `youtube.com .lenta.ru 192.168.1.1/24 192.168.1.*`
	 */
	SetWebProxy:
		function ( proxyAddress, proxyPort, userName, password, excludeList ) {},


	/**
	 * Disable sending all requests through proxy.
	 */
	ResetWebProxy:
		function () {},


	/**
	 * Set alpha transparency of the preset window.
	 *
	 * @param {number} winNum number of the window for which this function is used:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | graphic window
	 *  1     | video window
	 *
	 * @param {number} alpha transparency of the preset window (0 – completely transparent, 255 – completely opaque)
	 */
	SetWinAlphaLevel:
		function ( winNum, alpha ) {},


	/**
	 * Switch on/off the ChromaKey mode for the preset window.
	 *
	 * @param {number} winNum the number of the window for which this function is used:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | graphic window
	 *  1     | video window
	 *
	 * @param {number} mode ChromaKey mode for video window (0 – off, 1 – on)
	 *
	 * the parameters set by {@link gSTB.SetChromaKey} or {@link gSTB.SetTransparentColor} shall be active in the on-mode
	 */
	SetWinMode:
		function ( winNum, mode ) {},


	/**
	 * Show text string as a subtitle on screen.
	 *
	 * In case when start and end equal 0, text is shown on screen immediately until next {@link gSTB.ShowSubtitle} is called or 30 seconds elapsed.
	 *
	 * If this function was called then subtitles will work only via {@link gSTB.ShowSubtitle} until next call of {@link gSTB.Play}.
	 *
	 * @param {number} start string presentation start time in ms from start of current media
	 * @param {number} end string presentation end time in ms from start of current media
	 * @param {string} text this text will be shown on screen as a subtitle
	 */
	ShowSubtitle:
		function ( start, end, text ) {},


	/**
	 * Set whether to show video only after video synchronization established after seeking or starting playback.
	 *
	 * Experimental function.
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | Do not wait for video synchronization and start to show video as soon as possible. Can lead to jerky video for a few seconds right after channel switching.
	 *  false | Wait for synchronization (default).
	 *
	 */
	ShowVideoImmediately:
		function ( mode ) {},


	/**
	 * Show the virtual keyboard on the screen.
	 *
	 * User can switch virtual keyboard from english symbols to symbols of the language that is set as the local language in Service Menu.
	 *
	 * @param {boolean} [mode=false] warm up mode (read all associated files but not showing the VK itself):
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | the keyboard should be warmed up
	 *  false | ignore
	 */
	ShowVirtualKeyboard:
		function ( mode ) {},


	/**
	 * Enter or exit StandBy mode.
	 *
	 * When entering StandBy mode the following operations take place:
	 *
	 * - all video outputs switch off
	 * - content display, if it was on, stops
	 *
	 * @param {boolean} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  true  | enter Standby mode
	 *  false | exit from Standby mode
	 */
	StandBy:
		function ( mode ) {},


	/**
	 * Start local configuration menu (Service Menu).
	 *
	 * Result of this function is similar to pressing "`SET`" ("`service`" on old RC) button, if automatic appearance of Service Menu is disabled via {@link gSTB.EnableServiceButton}.
	 */
	StartLocalCfg:
		function () {},


	/**
	 * Display one next frame of video content.
	 *
	 * *Platform: MAG100*
	 */
	Step:
		function () {},


	/**
	 * Stop playing.
	 *
	 * {@link gSTB.Continue} shall begin playing from the beginning.
	 */
	Stop:
		function () {},


	/**
	 * Get API version.
	 *
	 * @return {string} the string in the form of:
	 *
	 * `JS API version: <JS_API>; STB API version: <STB_API>; Player Engine version: <Player>`
	 *
	 * where:
	 *
	 *  Value   | Description
	 * ---------|-------------
	 *  JS_API  | this API version number
	 *  STB_API | player API version
	 *  Player  | version of the player used in API in HEX code form
	 *
	 * @example
	 * // execution result
	 * 'JS API version: 301; STB API version: 104; Player Engine version: 0x23'
	 */
	Version:
		function () { return ''; },


	/**
	 * Write the file of portal settings `/etc/stb_params`.
	 *
	 * It must be kept in mind that the values PORTAL_IP, PORTAL_1, PORTAL_2 are used in the starting portal stored in `/home/web` of the root file system,
	 * therefore it is desirable to receive source values of these parameters via {@link gSTB.ReadCFG} before making the call and add them to the string cfg.
	 *
	 * @param {string} cfg the data to be stored in the file
	 */
	WriteCFG:
		function ( cfg ) {},


	/**
	 * Save the string as the browser set up (prefs.js).
	 *
	 * This function is not browser specific and it is used to set the right of access to the portal.
	 * This is performed in starting portal saved at `/home/web` of the root file system and it is recommended to avoid using it anywhere else.
	 *
	 * @param {string} value data to be saved in the file of browser settings
	 */
	WritePrefs:
		function ( value ) {},


	/**
	 * Get current input language.
	 */
	GetInputLang:
		function () {},


	/**
	 * Set new input language.
	 *
	 * @param {string} langId language unique identifier to be set as input language
	 */
	SetInputLang:
		function ( langId ) {},


	/**
	 * Set the user interface language.
	 *
	 * Attention! This function also causes {@link gSTB.SetInputLang}.
	 *
	 * @param {string} langId
	 */
	SetUiLang:
		function ( langId ) {},


	/**
	 * Set the LED indicator mode.
	 *
	 * @param {number} mode possible values:
	 *
	 *  Value | Description
	 * -------|-------------
	 *  0     | off
	 *  1     | normal
	 *  2     | standby
	 *
	 * @since 2.18
	 */
	SetLedIndicatorMode:
		function ( mode ) {},


	/**
	 * Set the LED indicator brightness level.
	 *
	 * @param {number} baseLevel
	 * @param {number} blinkLevel
	 *
	 * @since 2.18
	 */
	SetLedIndicatorLevels:
		function ( baseLevel, blinkLevel ) {},


	/**
	 * Return LED indicator mode and levels info.
	 *
	 * @return {string} info in **JSON** format
	 *
	 * *signature:* `{mode:number, levelBase:number, levelBlink:number}`
	 *
	 * Fields:
	 *
	 *  Name       | Description
	 * ------------|-------------
	 *  mode       | current mode
	 *  levelBase  | base LED level
	 *  levelBlink | level for blinking
	 *
	 * @since 2.18
	 */
	GetLedIndicatorState:
		function () { return ''; }

};