function SceneVideoCallFullTV(options) {
	this.options = options;
    
    this.VideoCallFullHDView =null;

    this.CallDurationBgHDLabel =null;
    this.CallDurationTextHDLabel =null;
    this.CallDurationTimeHDLabel=null;

    this.YourThumbnailHDLabel=null;
    this.MyThumbnailHDLabel=null;
    this.MyFrameLabel=null;
    
    this.CallEndHDBtn=null;
    
    this.HoldIconLabel = null;
	this.HoldAniLabel = null;
    
    this.HDHelpBar=null;
}

SceneVideoCallFullTV.prototype.initialize = function () {
	alert("SceneVideoCallFullTV.initialize()");
    
   this.create();
}

SceneVideoCallFullTV.prototype.handleShow = function () {
	alert("SceneVideoCallFullTV.handleShow()");

	//$.sfService.setVolumeControl(true);
	this.closeVideoRect();
    this.update();
}

SceneVideoCallFullTV.prototype.handleHide = function () {
	alert("SceneVideoCallFullTV.handleHide()");
	//$.sfService.setVolumeControl(false);
}

SceneVideoCallFullTV.prototype.handleFocus = function () {
	alert("SceneVideoCallFullTV.handleFocus()");

	this.highlight(this.CallEndHDBtn);
}

SceneVideoCallFullTV.prototype.handleBlur = function () {
	alert("SceneVideoCallFullTV.handleBlur()");

	
	var currentHighlight =  this.VideoCallFullHDView.getCurrentHighlight();
     if(currentHighlight !=null)
    {
        currentHighlight.blur();
    }
}

SceneVideoCallFullTV.prototype.handleKeyDown = function (keyCode) {
	alert("SceneVideoCallFullTV.handleKeyDown(" + keyCode + ")");
	if(ProcMgr.checkWidgetHighlight()==false){
		return;
	}

	switch (keyCode) {

		case sf.key.LEFT:
		case sf.key.RIGHT:
			this.processVolumeKey();
			break;

		case sf.key.ENTER:
        this.processEnterKey();
			break;
            
        case sf.key.RETURN:
        case sf.key.EXIT:
            sf.key.block(event);
			break;
            
         case 147:  //infolink
         case 261:  //contents
         case 115:  //wiselink
            ProcMgr.processInfolinkKey();
			break;

        case sf.key.VOL_DOWN:
		case sf.key.VOL_UP:
			break;
            
        default:
            ProcMgr.processBlockKey(keyCode);
            break;  
	}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////

SceneVideoCallFullTV.prototype.create = function(){
    
	alert(">>> SceneVideoCallFullTV version 1");
	
	alert("SceneVideoCallFullTV.create() ");
    this.VideoCallFullHDView = new View("VideoCallFullTV");
     this.VideoCallFullHDView.SetBgImage(null);

    this.CallDurationBgHDLabel= new Label("call_duration_bg_tv", null);
    this.CallDurationBgHDLabel.SetBgImage(g_Image.IMAGE_VIDEO_CALL_DURATION_BG);
 

    this.CallDurationTextHDLabel = new Label(null,"call_duration_text_tv");
    this.CallDurationTextHDLabel.SetTextStyle("call_duration_full_text_tv_style");
    this.CallDurationTextHDLabel.SetText(IDWS_MOIP_SKYPE_CALL_DURATION);

    this.CallDurationTimeHDLabel = new Label(null,"call_duration_time_tv");
    this.CallDurationTimeHDLabel.SetTextStyle("call_duration_time_tv_style");
    this.CallDurationTimeHDLabel.SetText("00:00:00");

    this.YourThumbnailHDLabel= new Label("your_thumbnail_tv", null);
    this.YourThumbnailHDLabel.SetBgImage(g_Image.IMAGE_VIDEO_CALL_VIEW_THUMBNAIL_HD_L);
    this.YourThumbnailHDLabel.visibleObj();    

    this.MyThumbnailHDLabel= new Label("my_thumbnail_tv", null);
    this.MyThumbnailHDLabel.SetBgImage(g_Image.IMAGE_VIDEO_CALL_VIEW_THUMBNAIL_FULL_S);
    this.MyThumbnailHDLabel.visibleObj();
    
    this.MyFrameLabel= new Label("my_frame_tv", null);
    this.MyFrameLabel.SetBgImage(g_Image.IMAGE_VIDEO_CALL_VIEW_MY_FRAME_FULL);

    this.CallEndHDBtn = new Button();
    this.CallEndHDBtn.SetImageObjId("video_call_end_tv_btn");
    this.CallEndHDBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_VIDEO_CALL_END_NOR_BTN_NORMAL);
    this.CallEndHDBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_VIDEO_CALL_END_NOR_BTN_NORMALFOCUS);	
    this.CallEndHDBtn.SetTextObjId("video_call_end_tv_btn_text");
    this.CallEndHDBtn.SetText(TV_SID_END_CALL);
    this.CallEndHDBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"common_btn_text_f17_normal_style");
   

   this.HDHelpBar = new HelpBar(HelpBarIndex.VIDEO_CALL_FULL_HD_VIEW, "SceneVideoCallFullTV",g_Image.IMAGE_VIDEO_CALL_FULL_VIEW_HELPBAR_BG );

	this.CallEndHDBtn.registHelpBar( this.HDHelpBar);
   
}

SceneVideoCallFullTV.prototype.update=function()
{  
     //this.toggleYourVideo();
     //this.toggleMyVideo();
    this.CallDurationBgHDLabel.visibleObj();        
    //this.CallDurationTextHDLabel.visibleObj();
    //this.CallDurationTimeHDLabel.visibleObj();
}

SceneVideoCallFullTV.prototype.updateCallDuration = function(time)
{
     this.CallDurationTimeHDLabel.SetText(time);
}

SceneVideoCallFullTV.prototype.toggleCameraOffBtnEnable=function()
{
    alert("SceneVideoCallFullTV.toggleCameraOffBtnEnable() ");
    
    var camera_state = PluginAPIMgr.GetCameraState();
    
    if(camera_state == ENUM_CAM_STATE.CAM_STATE_DISCONNECTED || camera_state == ENUM_CAM_STATE.CAM_STATE_CONNECTING)
    {
        alert("SceneVideoCallFullTV.toggleCameraOffBtnEnable() Dim : true ->  camera_state : "+ camera_state );
    }
    else
    {
        alert("SceneVideoCallFullTV.toggleCameraOffBtnEnable() Dim :  false ");
        if(PluginAPIMgr.IsInCall()==1)
		{
			PluginAPIMgr.StartRecord();
		}
    }    
}

SceneVideoCallFullTV.prototype.toggleMyVideo = function()
{
    var is_sending_video = PluginAPIMgr.IsSendingVideo(); 
    
    if(is_sending_video == 1)
    {
        this.MyThumbnailHDLabel.hiddenObj();
    }
    else
    {
        this.MyThumbnailHDLabel.visibleObj();
    }
}

SceneVideoCallFullTV.prototype.toggleYourVideo = function()
{
    var is_receiving_video =    ProcMgr.IsReceivingVideo(); 
    
    if(is_receiving_video == true)
    {
        this.YourThumbnailHDLabel.hiddenObj();
    }
    else
    {
        this.YourThumbnailHDLabel.visibleObj();
    }
}

SceneVideoCallFullTV.prototype.closeVideoRect= function()
{
	alert("SceneVideoCallFullTV.closeVideoRect() ");
	
    $("#VideoCallFullTV").css('background-color' , 'rgb(0,0,0)');
    
     this.YourThumbnailHDLabel.visibleObj();
     this.MyThumbnailHDLabel.visibleObj();
}

SceneVideoCallFullTV.prototype.openVideoRect= function()
{
	
	alert("SceneVideoCallFullTV.openVideoRect() ");
	
    $("#VideoCallFullTV").css('background-color' , 'transparent');
	this.YourThumbnailHDLabel.hiddenObj();
	this.MyThumbnailHDLabel.hiddenObj();	
}

SceneVideoCallFullTV.prototype.highlight=function(obj)
{
    this.VideoCallFullHDView.setCurrenHighlight(obj);
}

SceneVideoCallFullTV.prototype.processEnterKey=function()
{
    alert("SceneVideoCallFullTV.processEnterKey() ");
    var currentHighlight =  this.VideoCallFullHDView.getCurrentHighlight();
    
    switch(currentHighlight)
    {
        case this.CallEndHDBtn:		
            this.closeVideoRect();
            ProcMgr.DisconnectCall();
            break;

        case this.MicVolumeBtn:
             StateMgr.Start_Volume_Mic_State();
            break;

    }
}

SceneVideoCallFullTV.prototype.processVolumeKey=function()
{
    alert("SceneVideoCallFullTV.processVolumeKey() ");
    StateMgr.Start_Volume_Speaker_State();
}

