Smartbox
SmartTV universal library for Samsung, LG, Philips, SmartTV Aliance, STB Mag app development.
Install / Use
/learn @immosmart/SmartboxREADME
Demo
- <a href="http://immosmart.github.io/smartbox/demo/demoApp">Full demo with plugins</a>
Overview
A smartbox library allows to start one application on a few smartTV platforms.
Currently supported platforms:
- Samsung SmartTv 2011+
- Lg SmartTv
- Philips 2012+
- <a href="http://wiki.infomir.eu/">STB Infomir MAG200/250</a> (MAG200/250 How-to).
To add your own platform please see the platform documentation.
Initialization
Smartbox has three dependencies:
- <a href="https://github.com/jquery/jquery/tree/1.8-stable">jQuery(1.8.1+)</a>
- <a href="https://github.com/jashkenas/underscore">Underscore</a>(or <a href="https://github.com/lodash/lodash">lodash</a>)
- <a href="https://github.com/Wolfy87/EventEmitter">Event Emitter</a>( <a href="https://github.com/jashkenas/backbone">Backbone</a> or <a href="https://github.com/artempoletsky/Frontbone">Frontbone</a> ) for the player plugin
The compiled version of the library is located in the directory /dist.
Library plugins
- Platforms' methods
- Log console
- Legend
- Navigation
- 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
<a href="http://immosmart.github.io/smartbox/">Jasmine autotest start</a>
Related Skills
node-connect
341.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.5kCommit, push, and open a PR
