Skip navigation

Ministra TV platform allows to integrate services which are adaptive for working on STB.

The integration is to create separate module, adding icons for main menu and adding the name of created module in list which is initialized with boot. The service can be either in middleware or in the remote http server.

Requirements for adaptive services

  1. support at least 3 resolutions: 720х480 (NTSC), 720х576 (PAL), 1280х720 (720p)
  2. correct exit process from service (using GET parameter referrer for returning)
  3. interface optimization on RC

Exit process from service

One of the requirement is an ability to exit from service and return back to Ministra. URL for returning is in GET parameter referrer in urlencoded, so it is neccessary previously to decode it.

Getting GET parameters in JavaScript:

var $_GET = {};
function decode(s) {
    return decodeURIComponent(s.split("+").join(" "));
}\??(?:([^=]+)=([^&]*)&?)/g, function () {
    $_GET[decode(arguments[1])] = decode(arguments[2]);

Code of returning in Ministra:

window.location = decodeURIComponent($_GET['referrer']);

Example of integration

There is an example of abstract service integration For example the service is available by url

Module creation

Creating the file exampletv.js in folder /c/ with content:

    // The first argument - caption under the icon in the main menu
    // Третий аргумент - icon file name
    main_menu.add('EXAMPLE.TV', [], 'mm_ico_exampletv.png', function(){
        var params = '';
        if (stb.user['web_proxy_host']){
            params = '?proxy=http://'+stb.user['web_proxy_host']+':' +stb.user['web_proxy_port'];
        if (!params){
            params += '?';
            params += '&';
        params += 'referrer='+encodeURIComponent(window.location);
        //window.location = '/' + stb.portal_path + '/external/olltv/index.html'+params;
        window.location = ''+params;
    }, {layer_name : "exampletv"}); // For correct module work it is neccessary to point unique layer_name;

Icons adding in the main menu

It is necessary to create three icon files with mm_ico_exampletv.png name corresponding to three using resolutions.

Icon sizes:

  • 200x100px - NTSC
  • 200x120px - PAL
  • 360x160px - 720p

Place the files in folder with corresponding resolutions:

  • NTSC - catalogue /c/template/<theme_name>/i_480/
  • PAL - catalogue /c/template/<theme_name>/i/
  • 720p - catalogue /c/template/<theme_name>/i_720/

For compatibility with mechanism of module loading it is necessary to create three empty css files in /c/.

  • exampletv.css
  • exampletv_480.css
  • exampletv_720.css

Module adding in the initialization list

In the config file (custom.ini) in all_modules parameter it is necessary to add the module name in correct place, for example after Video Club

all_modules[] = vclub
all_modules[] = exampletv ;our module
all_modules[] = ex

If all step are completed then there icon of added service must appear in the main menu (after reloading Ministra).

Need Help

Cindy is an expert on the Ministra TV platform and the author of this article.

Was this article helpful?

Yes No

Sorry to hear that.
How can we improve this article?

We use cookies in order to optimise our website, provide you with the best possible user experience and help us promote our products. Please read our Cookie Policy to find out how we use cookies and how you can control cookies.
By using this website or closing this message, you acknowledge our Privacy Policy and agree to our use of cookies as described in our Cookie Policy.