
VIEWS.Lite = {
    
    buttons: [ 'about', 'play', 'return' ],
    
    init: function() {
        AMOSTV.showView('Lite');
        
        this.loadPlaylist('652498404001');
        
        AMOSTV.stopLoading();
    },
    
    exit: function() {
        
    },
    
    keyHandler: function(key) {
        if ( key == KEYS.OK ) {
            AMOSTV.loadView('Play', {playerIndex: 'LITE'});
        }
        
        if ( key == KEYS.RED ) {
            AMOSTV.loadView('About');
        }
        
        if ( key == KEYS.BACK ) {
            Samsung.quit();
        }
    },
    
    loadPlaylist: function(id) {
        if ( typeof AMOSTV.players['LITE'] == 'undefined' ) {
            
            Brightcove.getPlaylistById(id, function(playlist) {
                
                // make a fake player structure, for Play view
                AMOSTV.players['LITE'] = {};
                AMOSTV.players['LITE'].playlists = [playlist];
                AMOSTV.players['LITE'].positions = {curr: 0};
                
                AMOSTV.stopLoading();
            });
        }
    }
    
};

