Giter Site home page Giter Site logo

smartbox's Introduction

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

smartbox's People

Contributors

loshadushka avatar artempoletsky avatar ploginoff avatar paunin avatar langovoi avatar dchinin avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.