Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

immosmart/smartbox

Open more actions menu

Repository files navigation

Demo

Overview

A smartbox library allows to start one application on a few smartTV platforms.

Currently supported platforms:

To add your own platform please see the platform documentation.

Initialization

Smartbox has three dependencies:

The compiled version of the library is located in the directory /dist.

Library plugins

How to use the library

To use all plugins and functions of the library it's necessary to wrap a code as callback SB.ready SB.ready(function(){ // your code });

SB.ready will be executed after all callbacks jQuery.ready, $(function(){}), $.ready(function(){});

Library's methods

  • isInited() - checking the library initialization. Returns true or false

      SB.isInited();
    
  • ready(func) executes the code of the funtion func after the library has been initializated

      SB.ready(function(){
          // your code
      });
    
  • readyForPlatform(platform, cb) executes the code of the funtion func after the library has been initializated, if the current plaform - platform

      SB.readyForPlatform('samsung', function(){
          // code for samsung
      });
    

Library configuration

All configurations of the library are located in the object SB.platform

        SB.config = {
          /**
           * Platform which will be used in case detectPlatform returns false
           * ex: browser, samsung, lg
           * @type: {String}
           */
          defaultPlatform: 'browser'
        }

Autotests

Jasmine autotest start

About

SmartTV universal library for Samsung, LG, Philips, SmartTV Aliance, STB Mag app development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 8

Morty Proxy This is a proxified and sanitized view of the page, visit original site.