SmartTV universal library for

Документация на русском Demo Full demo with plugins Overview

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

Currently supported platforms:

Samsung SmartTv 2011+ Lg SmartTv Philips 2012+ STB Infomir MAG200/250 (MAG200/250 How-to).

To add your own platform please see the platform documentation.

Initialization

Smartbox has three dependencies:

jQuery(1.8.1+) Underscore(or lodash) Event Emitter( Backbone or Frontbone ) for the player plugin

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

Library plugins Platforms' methods Log console Legend Navigation Initialization and methods Algorithm Extended usage Input fields Keyboard(virtual) Voice management Legend @todo_doc Player 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

版权声明:

1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。
2、网站不提供资料下载,如需下载请到原作者页面进行下载。