var Scene = caph.require('ui.base.Scene');

caph.app.addScene('VideoScene', $class({
    $extends: Scene,
    
	onshow: function() {
		var View = caph.require('module.renderer.View');
		var VideoPlayer = caph.require('stripe.ui.widget.videoPlayer.html5');

		var videoPlayer = new VideoPlayer({
			items: [{
				url: 'resource/movie/videos/1391749340917.mp4',
				title: 'Kyeshong',
				date: '2014/02/07'
			}],
			enablePrevNext: true,
   			viewType: 'full',
   			callback: function() {
   				this.back(Scene.state.READY);
   			}.bind(this)
		});
        
		videoPlayer.getChildren()[0].getChildren()[1].setStyle({
			zIndex: 1
		});
		
		this.addChild(videoPlayer);
		
		this.getParent().addChild(new View({
			dom: {
				style: {
					width: '100%',
					height: '100%',
					zIndex: -1,
					backgroundColor: '#4e4e4e'
				}
			}
		}));
		
		currentScene = null;
		currentCategory = null;
		currentItem = null;
	},
    
    onkeydown: function(message) {
    	if (message.key()['return']) {
    		this.back(Scene.state.READY);
    	}
    }
}));
