Additional options allow you to change the appearance and behavior of the application, and are specified in the configuration file /etc/microimpuls/portal/client.js.
Mandatory options
Client ID
Option name: client, data type: int.
This option specifies the operator ID in Smarty (Client ID) and is used in API requests.
Example:
var CLIENT_SETTINGS = {
///...
'client_id': 1
};
API
Option name: api_key, data type: string.
This option specifies the Key API (not to be confused with the Billing API Key) of the Smarty operator for this Client ID. Used in API requests.
Example:
var CLIENT_SETTINGS = {
///...
'api_key': 'dmt6rH0qbDeGacPnUDDkVb8jafcqewKl'
};
API URL
Option name: api_url, data type: string.
Smarty server address. To circumvent the CORS policy (if the Smarty web server settings do not include permission headers), the server address may be specified relative to the portal domain it was downloaded from, for example, /apiIf the settings of the web server determine the appropriate location, redirecting requests to Smarty.
Example:
var CLIENT_SETTINGS = {
///...
'api_url': '/api'
};
The used interface (template) of the portal by default
Option name: template, data type: string.
The name of the pattern used by default. The list of available templates can be viewed in the templates portal folder. This value can be redefined in the device settings in Smarty, as well as in the account settings.
Example:
var CLIENT_SETTINGS = {
///...
'template_name': 'futuristic'
};
Interface screen sizes
Option name: template_size, data type: array.
List of available template resolutions. It is necessary to specify each separately coiled resolution if there is a corresponding style for the template in the specified resolution. For example, the classic template has a separate layout for resolutions 1280x720 and 720x576. For other templates, automatic scaling is used, so it is enough to specify only the standard resolution of 1280x720. For some Samsung Tizen TV, LG Smart TV and Android TV devices, specifying this option is mandatory, otherwise the interface may be displayed at the wrong scale.
Example:
var CLIENT_SETTINGS = {
///...
'template_size':
'default':
'default': [1280, 720]
}
'futuristic':
'default': [1280, 720]
}
'impuls':
'default': [1280, 720]
}
'infinitly':
'default': [1280, 720]
}
'classic':
'default': [1280, 720]
'720x576': [720, 576]
}
'iridium':
'default': [1280, 720]
}
'focus':
'default': [1280, 720]
}
};
List of permitted interfaces
Option name: available_templates, data type: array.
Set a list of available templates to override from the server. Template specified in the mandatory parameter templateIt is not necessary to add to the list of available templates. If the server tries to identify a template for the device and / or account that is not in this list, the application will ignore this. By default [].
Example:
var CLIENT_SETTINGS = {
///...
'available_templates': ['impuls', 'futuristic', 'infinitly']
};
Settings file name
Option name: settings_filename, data type: string.
File name to save local settings on the device. It is necessary to specify a unique name (for example, coinciding with the name of the provider in the broadcast), because this file saves including the login and password of the account. If for an already working service in the process of operation (or moving to another server) to change this name, the next time the device is turned on, the subscribers will have a logout. Default value example.
Example:
var CLIENT_SETTINGS = {
///...
'settings_filename': 'mytelecom.dat'
};
Additional options
Operator's website address
Option name: site_url, data type: string.
It is used in service messages of the portal for the subscriber related to informing about technical problems and obtaining additional information, as well as in some templates it is displayed in the contact information block. Default value www.example.com.
Example:
var CLIENT_SETTINGS = {
// …
'site_url': 'http://mytelecom.com'
};
Frequency of requests to save television viewing
Option name: push_stat_interval, data type: int.
The frequency of execution of requests to the Smarty server to save data about TV viewing is set in milliseconds. Do not use too small a value, however, the lower this value, the more accurate the data on browsing sessions and content rankings will be. Default value 300000 (5 minutes).
Example:
var CLIENT_SETTINGS = {
///...
'push_stat_interval': 300,000
};
Frequency of requests to save viewing position
Option name: content_position_set_interval, data type: int.
Frequency of requests to the Smarty server to save the current viewing position of the PVR and VOD content for the return function to the last saved viewing position. It's set in milliseconds. Default value 30000 (30 seconds).
Example:
var CLIENT_SETTINGS = {
///...
'content_position_set_interval': 30,000
};
Frequency of account status requests
Option name: account_status_interval, data type: int.
Allows you to set the custom value of the AccountStatus request intervals in the portal. When specifying a small value (<60000), the check will be carried out with an interval of 1-2 minutes. It's set in milliseconds. Default value 600000 10 minutes.
Example:
var CLIENT_SETTINGS = {
// ...
'account_status_interval': 60,000
};
Default hourly correction shift
Option name: default, data type: int.
The displayed time in the portal is calculated using the following algorithm:
- From the Smarty server, the portal takes time to UTC+0. This time is used for all calculations and for EPG.
- The local time zone is determined according to the time settings on the device.
- The correction hour shift specified by the user in the application settings is determined. Default equals
default. - A local time zone and an adjustment hour shift are added to the time from the server, thus calculating the local displayed time.
As the value of this option, you must specify a value in the range from 0 (which corresponds to the shift -12) to 24 (+12). This value will be used by default to set the “Hour Shift” set by users in the application settings. By default 12 (corresponds to +0). With the correct operation of time on the device and the correct NTP settings, you do not need to use the corrective shift, but with the help of it, the user can adjust the time in the application himself.
Example:
var CLIENT_SETTINGS = {
///...
'default_timezone': 12
};
Disabling the time zone of the device
Option name: ignore_device_timezone, data type: bool.
The option makes sense and works only at a given value default. If both of these options are enabled, the time zone is considered GMT+0+ for displaying time on the device default. Options do not affect the time itself, as it comes from the server. The default value of the option - falsely.
Example:
var CLIENT_SETTINGS = {
///...
'ignore_device_timezone': true
};
Default buffer size
Option name: default_buffersize, data type: int.
The default “buffer size” setting set by the user in the application settings. Possible values:
- 0 - automatically (by default).
- 1 - no buffering.
- 2 - small size buffer.
- 3 - medium size buffer.
- 4 - big size buffer.
- 5 - very large buffer size.
Example:
var CLIENT_SETTINGS = {
///...
'default_buffersize': 0
};
Default interface language
Option name: default_lang, data type: int.
The default value of the “Interface Language” setting set by the user in the application settings. It is necessary to specify an index (starting with 0) of the language from the list of languages that are supported by a specific template. By default 0 - first language on the list.
Example:
var CLIENT_SETTINGS = {
///...
'default_lang': 0
};
Disabling the system language of the device
Option name: ignore_system_lang, data type: bool.
The option allows you to disable the effect of the system language on the application language by default. At the moment, the system language is installed for the application only on TVs and STB under Android OS. Default option value: false.
Example:
var CLIENT_SETTINGS = {
///...
'ignore_system_lang': true,
};
System debugging console
Option name: system_debug, data type: bool.
Includes a display of the portal system console, which displays additional service information for debugging.
Possible values:
- true - the console is displayed.
- falsely the console is not displayed (by default).
Example:
var CLIENT_SETTINGS = {
///...
'system_debug': true
};
Display of service error reports
Option name: user_debug, data type: bool.
It includes displaying messages to the subscriber about various service errors that occurred during the operation of the portal (including, for example, communication errors with the Middleware server). It is currently supported only in futuristic and infinitly templates.
Possible values:
- true - errors are displayed.
- falsely errors are not displayed (by default).
Example:
var CLIENT_SETTINGS = {
///...
'user_debug': false
};
The mode of processing the button off the console
Option name: handle_key_power_by_device, data type: bool.
Flag for selecting the processing of the console switch off button. It is supported only on WRT consoles.
Possible values:
- true - prefix-level processing.
- falsely - processing at the portal level (by default).
var CLIENT_SETTINGS = {
///...
'handle_key_power_by_device': false
};
Model identification of the device
Option name: send_device_model_in_request_parameters, data type: bool.
Possible values:
- true - to the Middleware server as a device parameter will be sent to the device type and model, connected with the underline, for example: android_stb_redbox (by default).
- falsely only the type of device will be sent, for example android_stb.
Meaning true if the server fails to identify the device, it is repeated in the mode falsely.
Example:
var CLIENT_SETTINGS = {
///...
'send_device_model_in_request_parameters': true
};
Numbering of channels starting from 0
Option name: start_channel_numbers_from_zero, data type: bool.
- true channel numbers start with 0.
- falsely channel numbers start with 1 (by default).
Example:
var CLIENT_SETTINGS = {
///...
'begin_channel_numbers_from_zero': false
};
Solution for the default MAG player
Option name: default_player_solution_for_mag, data type: string.
Для приставки MAG устанавливается тип solution, который будет использоваться в случае, если формат потока не удалось определить. Значением должен быть тип формата контента (см. список http://soft.infomir.com/stbapi/JS/v343/tutorial-media-formats.html). По умолчанию automate.
Example:
var CLIENT_SETTINGS = {
///...
'default_player_solution_for_mag': 'ffrt2'
};
Solution for MAG player to play HLS by default
Option name: hls_player_solution_for_mag, data type: string.
Для приставки MAG устанавливается тип solution, который будет использоваться в случае, если формат потока — HLS (ссылка имеет разширение .m3u8). Значением должен быть тип формата контента (см. список http://soft.infomir.com/stbapi/JS/v343/tutorial-media-formats.html). По умолчанию ffrt2.
Example:
var CLIENT_SETTINGS = {
///...
'hls_player_solution_for_mag': 'ffrt2'
};
Player for Android STB/TV by default
Option name: default_player_solution, data type: string.
For consoles and TVs under OS Android / Android TV set the type of player that will be used by default. When this option is set, the ability to select a player from the Settings screen will not be available. By default blank-line.
Possible values:
- native the system standard player of the device.
- exoplayer - Exoplayer.
- vlc_default - VLC player.
- vlc_mediacodec VLC-player with an exposed parameter
mediacode.
Example:
var CLIENT_SETTINGS = {
///...
'default_player_solution': 'exoplayer'
};
The choice of player on devices under OS Android / Android TV is available only in builds version 2.0 and higher.
Waiting for a response from the Middleware server
Option name: requests_timeout_timeout, data type: int.
Sets for HTTP requests a waiting time for a response from the server, after which the request will be interrupted by the client. It's set in milliseconds. By default 10000. The value can be increased when the communication network between the user and the server is unstable. For example, if some data in the interface does not load within 10 seconds, then you should try to increase this parameter (and, of course, try to fix network problems first).
Example:
var CLIENT_SETTINGS = {
///...
'requests_timeout_time': 10,000
};
UID generation method on Android STB and Android TV
Option name: android_uid_generation_method, data type: string.
A field that allows you to redefine the method of generating UID for Android devices.
Possible values:
- default the standard generation method is used (by default).
- mac The MAC address is always returned as a UID.
- serial The serial number is always returned as a UID.
- mac_serial The UID is always returned as a combination of the MAC address and the serial number separated by the underline.
Example:
var CLIENT_SETTINGS = {
///...
'android_uid_generation_method': 'default'
};
UID generation method on other devices (Tizen TV)
Option name: uid_generation_method, data type: string.
A field that allows you to redefine the method of generating UID for devices (currently supported only for Tizen TV).
Possible values:
- default the standard generation method is used (by default).
- mac The MAC address is always returned as a UID.
Example:
var CLIENT_SETTINGS = {
///...
'uid_generation_method': 'default'
};
Replace https with http in the thread URL
Option name: https_stream_url_replace_enable, data type: bool.
It is recommended to play external theaters on LG Netcast, MAG and Android STB devices.
Possible values:
- true Before playing content, https will be replaced with http in the stream URL.
- falsely The replacement of https with http in the URL does not occur (by default).
Example:
var CLIENT_SETTINGS = {
// ..
'https_stream_url_replace_enable': false
};
Replace https with http in thread URL (Samsung)
Option name: samsung_smart_tv_https_stream_url_replace, data type: bool.
Recommended for Samsung Smart TV devices to play streams of external theaters.
Possible values:
- true Before playing content, https will be replaced with http in the stream URL.
- falsely The replacement of https with http in the URL does not occur (by default).
Example:
var CLIENT_SETTINGS = {
///...
'samsung_smart_tv_https_stream_url_replace': false
};
Duration of the promotional period after registration
Option name: signup_auto_activation_period, data type: int.
Allows you to set the number of days for which free access will be issued for the initial use of the account after registration. Default 0.
Example:
var CLIENT_SETTINGS = {
///...
'signup_auto_activation_period': 7
};
Authorization and registration directly through third-party billing
Option name: use_external_api_for_registration_and_login, bool data type.
When setting this field to the true state, registration and authorization occurs directly through external billing, this is required for some types of close integration. We do not recommend setting this field yourself without an explicit recommendation from our developers. By default falsely.
Example:
var CLIENT_SETTINGS = {
///...
'use_external_api_for_registration_and_login': true
};
Method of confirming the phone number during registration
Option name: phone_confirmation_type, data type: string.
Possible values:
- blank-line - the confirmation method is not specified, the number confirmation is disabled (default value).
- text The phone number is confirmed by SMS (setting the SMS gateway is necessary).
- call the phone number is confirmed by call (it is necessary to set up the appropriate gateway for calls).
Example:
var CLIENT_SETTINGS = {
///...
-phone_confirmation_type'sms'
};
Server URL with images and static resources
Option name: media_base_url, data type: string.
A full URL that is used as a basic path to images and static resources, such as posters from EPG. By default, an empty line (in this case, the path coincides with the Smarty address).
Example:
var CLIENT_SETTINGS = {
///...
'media_base_url':'
};
Update interval of the transmission program if it is not on the server
Option name: channel_programs_update_interval_for_channels_with_empty_epg, data type: string.
The application requests an up-to-date transmission program for the channel list as current transmissions on the channels end. But there are situations when there is no downloaded transmission program on the server, in which case the application recites it much less often (by default - every 90 minutes). This option allows you to reduce or increase the request period for the transmission program for this case.
Example:
var CLIENT_SETTINGS = {
///...
'channel_programs_update_interval_for_channels_with_empty_epg': 5400,
};
Request a list of programs with a compact flag
Option name: use_compact_program_category_channel_list, bool data type.
Additional fields will be excluded from the server response, such as information about the next transmission. In the futuristic template, when this option is enabled, the second line will be hidden with transmission in the channel list in the normal list mode.
Possible values:
- true ProgramCategoryChannelList will add a “compact” option (to reduce response size).
- falsely the “compact” option will not be added (by default).
Example:
var CLIENT_SETTINGS = {
// ..
'use_compact_program_category_channel_list': true
};
Request a list of programs with the wrt_compact flag
Option name: use_wrt_compact_program_category_channel_list, bool data type.
Additional fields will be excluded from the server response, there is a brief information about the next transfer. Warning: this option is not compatible with use_compact_program_category_channel_list. If both options are included, only “compact” is added to the option description use_compact_program_category_channel_list.
Possible values:
- true ProgramCategoryChannelList requests will be added with the "wrt_compact" option (to reduce response size).
- falsely the “wrt_compact” option will not be added (by default).
Example:
var CLIENT_SETTINGS = {
// ..
'use_wrt_compact_program_category_channel_list': true
};
Flag including special behavior for Flussonic
Option name: stream_type, data type: string.
In the release 22.04 colleagues from Flussonic made some changes in the formation of HLS playlists, in connection with which some players when working with archival links of the format https://pvr.example.com/$prefix/archive-$flpbt-$flpdur.m3u8 they began to behave not quite correctly when rewinding from Live - the playback began with the current Live position, and not with the one to which the rewind was carried out.
To properly handle the new playlist behavior, we have added this new option 'streamer_type': 'flussonic', which, when rewinding back from Live, forcibly rewinds to the first stream segment.
Example:
var CLIENT_SETTINGS = {
///...
'streamer_type': 'flussonic'
};
Redefinition of channel numbers by LCN values
Option name: override_channel_list_number_by_lcn, bool data type.
Possible values:
- true In the interface, instead of channel numbers, their LCN values are displayed (by default).
- falsely channel numbers are displayed in the interface.
Example:
var CLIENT_SETTINGS = {
///...
'override_channel_list_number_by_lcn': false
};
Requesting PIN when trying to launch a movie/series with an age rating of 18+
Option name: set_parent_control_for_adult_rated_videos, data type: bool.
Possible values:
- true When trying to launch a film / series with an age rating of 18+, a PIN code will be requested.
- falsely the function is disabled (by default).
Example:
var CLIENT_SETTINGS = {
///...
-set_parent_control_for_adult_rated_videos': true
};
Disabling sending logs about playback errors to the server
Option name send_portal_logs_to_server, data type: bool.
Possible values:
- true - to the server, to the file
/var/log/microimpuls/smarty/smarty_portal.logerrors of stream reproduction on devices will be sentandroid_stb. - falsely the function is disabled (by default).
Example:
var CLIENT_SETTINGS = {
///...
-send_portal_logs_to_server': true
};
Maximum time to block request after 500th error
Option name max_retry_delay_for_internal_server_error, data type: int.
If the application receives a 500 error in response from the server, it will stop contacting it for a while (minimizing the load on the server in emergency situations). This option sets the maximum waiting time for the application until the next attempt to access the server. Default value: 3600it's set in seconds.
Example:
var CLIENT_SETTINGS = {
///...
'max_retry_delay_for_internal_server_error': 3600
};
List of intervals to re-query after receiving 500th error
Option name retry_delay_sequence_for_internal_server_error, data type: list.
If the application receives a 500 error in response from the server, it will stop contacting it for a while (minimizing the load on the server in emergency situations). This option sets a list of intervals in seconds, after which the application will try to re-refer to the method with an error of 500.
Example:
var CLIENT_SETTINGS = {
///...
'retry_delay_sequence_for_internal_server_error': [60, 120, 180, 300, 600, 900, 1800, 3600]
};