|
|
|
@ -682,6 +682,7 @@ var videosListSelModel_ops = { |
|
|
|
}; |
|
|
|
|
|
|
|
var CompositeVideoStatus = 0; |
|
|
|
var oldCompositeVideoStatus = -1; |
|
|
|
var CompositeVideoProgress = 0; |
|
|
|
var CompositeVideoStatusTO = null; |
|
|
|
var sesVideosListWindow = null; |
|
|
|
@ -691,6 +692,7 @@ var sesVideosListRExists = false; |
|
|
|
var sesVideosListLExists = false; |
|
|
|
var CompositeVideoRightInfo = null; |
|
|
|
var CompositeVideoLeftInfo = null; |
|
|
|
|
|
|
|
function startVideoComposer(){ |
|
|
|
Ext.Ajax.request({ |
|
|
|
url: '/lib/controller/doSessionOperations.php', |
|
|
|
@ -702,10 +704,12 @@ function startVideoComposer(){ |
|
|
|
}, |
|
|
|
success: function( response, opts ){ |
|
|
|
var data = Ext.decode(response.responseText); |
|
|
|
if( data.status == 'ok' ){ |
|
|
|
if( data.status == 'ok' ){ |
|
|
|
CompositeVideoStatus = 1; |
|
|
|
CompositeVideoProgress = 0; |
|
|
|
CompositeVideoStatusUpdate(); |
|
|
|
setDonatStatus( 1, 0, CompositeVideoProgress ); |
|
|
|
CompositeVideoStatusTO = window.setTimeout( eventVideosStatusUpdater, 1000 ); |
|
|
|
} else { |
|
|
|
Ext.Msg.show({ |
|
|
|
title:'<?=$Labels->GetLabel('_ERROR_MSG_');?>', |
|
|
|
@ -718,68 +722,160 @@ function startVideoComposer(){ |
|
|
|
failure: failureAJAXFunction |
|
|
|
}); |
|
|
|
} |
|
|
|
function CompositeVideoStatusUpdate(){ |
|
|
|
var rr = Ext.getCmp('EvtVidCompDownPanel'); |
|
|
|
rr.removeAll(); |
|
|
|
switch( CompositeVideoStatus ){ |
|
|
|
case 0:{ |
|
|
|
rr.add({ |
|
|
|
xtype: 'panel', |
|
|
|
frame: false, |
|
|
|
border: false, |
|
|
|
html: '<div class="vid_dwc_panel"><table width="100%"><tr><td align="center" colspan=2>Compose Videos into one file</td></tr><tr><td colspan=2> </td></tr><tr><td align="center" colspan=2><a class="big_vd_btn" href="javascript:startVideoComposer()">Start Video Composer</a></td></tr><tr><td colspan=2> </td></tr></table></div>' |
|
|
|
}); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 1:{ |
|
|
|
rr.add({ |
|
|
|
border: false, |
|
|
|
frame: false, |
|
|
|
//layout: 'vbox',
|
|
|
|
//layoutConfig: {
|
|
|
|
// align: 'center'
|
|
|
|
//},
|
|
|
|
items:[{ |
|
|
|
html: '<center>Composing Video</center>' |
|
|
|
},{ |
|
|
|
xtype: 'progress', |
|
|
|
value: CompositeVideoProgress |
|
|
|
}] |
|
|
|
}); |
|
|
|
//CompositeVideoStatusTO = window.setTimeout( 1000, eventVideosStatusUpdater );
|
|
|
|
eventVideosStatusUpdater(); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 2:{ |
|
|
|
if( sesVideosListRExists ){ |
|
|
|
function CompositeVideoStatusUpdate(){ |
|
|
|
if( oldCompositeVideoStatus != CompositeVideoStatus ){ |
|
|
|
var rr = Ext.getCmp('EvtVidCompDownPanel'); |
|
|
|
rr.removeAll(); |
|
|
|
oldCompositeVideoStatus = CompositeVideoStatus; |
|
|
|
switch( CompositeVideoStatus ){ |
|
|
|
case 0:{ |
|
|
|
rr.add({ |
|
|
|
xtype: 'panel', |
|
|
|
frame: false, |
|
|
|
border: false, |
|
|
|
html: '<div class="vid_dwc_panel"><table width="100%"><tr><td align="center" colspan=2>Composed Video from '+sesVideosListRName+' side</td></tr><tr><td align="right">Resolution:</td><td>'+CompositeVideoRightInfo.pic_size+'</td></tr><tr><td align="right">Frame rate:</td><td>'+CompositeVideoRightInfo.fps+'</td></tr><tr><td align="right">Codec:</td><td>'+CompositeVideoRightInfo.codec+'</td></tr><tr><td align="right">Duration:</td><td>'+CompositeVideoRightInfo.duration+'</td></tr><tr><td align="right">File size:</td><td>'+CompositeVideoRightInfo.file_size+'</td></tr><tr><td align="center" colspan=2><a class="big_vd_btn" href="/lib/controller/getComposedVideo.php?SESSION='+rep_selectedEventId+'&SIDE=R">Download</a></td></tr></table></div>' |
|
|
|
html: '<div class="vid_dwc_panel"><table width="100%"><tr><td align="center" colspan=2>Compose Videos into one file</td></tr><tr><td colspan=2> </td></tr><tr><td align="center" colspan=2><a class="big_vd_btn" href="javascript:startVideoComposer()">Start Video Composer</a></td></tr><tr><td colspan=2> </td></tr></table></div>' |
|
|
|
}); |
|
|
|
break; |
|
|
|
}; |
|
|
|
if( sesVideosListLExists ){ |
|
|
|
case 1:{ |
|
|
|
rr.add({ |
|
|
|
xtype: 'panel', |
|
|
|
frame: false, |
|
|
|
border: false, |
|
|
|
html: '<div class="vid_dwc_panel"><table width="100%"><tr><td align="center" colspan=2>Composed Video from '+sesVideosListLName+' side</td></tr><tr><td align="right">Resolution:</td><td>'+CompositeVideoLeftInfo.pic_size+'</td></tr><tr><td align="right">Frame rate:</td><td>'+CompositeVideoLeftInfo.fps+'</td></tr><tr><td align="right">Codec:</td><td>'+CompositeVideoLeftInfo.codec+'</td></tr><tr><td align="right">Duration:</td><td>'+CompositeVideoLeftInfo.duration+'</td></tr><tr><td align="right">File size:</td><td>'+CompositeVideoLeftInfo.file_size+'</td></tr><tr><td align="center" colspan=2><a class="big_vd_btn" href="/lib/controller/getComposedVideo.php?SESSION='+rep_selectedEventId+'&SIDE=L">Download</a></td></tr></table></div>' |
|
|
|
frame: false, |
|
|
|
//layout: 'vbox',
|
|
|
|
//layoutConfig: {
|
|
|
|
// align: 'center'
|
|
|
|
//},
|
|
|
|
items:[{ |
|
|
|
html: '<div class="vid_dwc_panel"><table width="100%"><tr><td align="center">Composing Video<br/>You may close this window<br/>and<br/>come back later to download video.</td><td width="100px" align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut0_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut0_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut0_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text-black"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue0">0%</text><text x="50%" y="50%" class="chart-label">DONE</text></g></svg></td></tr></table></div>' |
|
|
|
}], |
|
|
|
listeners:{ |
|
|
|
afterrender: function(){ |
|
|
|
setDonatStatus( 1, 0, 29 ); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
eventVideosStatusUpdater(); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 2:{ |
|
|
|
if( sesVideosListRExists ){ |
|
|
|
rr.add({ |
|
|
|
xtype: 'panel', |
|
|
|
frame: false, |
|
|
|
border: false, |
|
|
|
html: '<div class="vid_dwc_panel"><table width="100%"><tr><td align="center" colspan=3>Composed Video from '+sesVideosListRName+' side</td></tr><tr><td align="right">Duration:</td><td colspan=2>'+CompositeVideoRightInfo.duration+'</td></tr><tr><td align="right">File size:</td><td colspan=2>'+CompositeVideoRightInfo.file_size+'</td></tr><tr><td align="center" colspan=2><div id="r_d_button"></div></td><td align="center"><div id="r_e_button"></div></td></tr><tr><td colspan=3> </td></tr></table></div>' |
|
|
|
}); |
|
|
|
rr.doLayout(); |
|
|
|
new Ext.Button({ |
|
|
|
text: 'Download', |
|
|
|
width: '80%', |
|
|
|
renderTo: 'r_d_button', |
|
|
|
handler: function(){ |
|
|
|
const l = document.createElement('a'); |
|
|
|
l.style.display = 'none'; |
|
|
|
l.href = '/lib/controller/getComposedVideo.php?SESSION='+rep_selectedEventId+'&SIDE=L'; |
|
|
|
document.body.appendChild(l); |
|
|
|
l.click(); |
|
|
|
} |
|
|
|
}); |
|
|
|
new Ext.Button({ |
|
|
|
text: 'Delete', |
|
|
|
width: '80%', |
|
|
|
renderTo: 'r_e_button', |
|
|
|
handler: function(){ |
|
|
|
Ext.Ajax.request({ |
|
|
|
url: '/lib/controller/doSessionOperations.php', |
|
|
|
params: { |
|
|
|
SESSION: rep_selectedEventId, |
|
|
|
OPID: 4, |
|
|
|
UID: <?=$UserID;?>, |
|
|
|
SID: '<?=$Session;?>' |
|
|
|
}, |
|
|
|
success: function( response, opts ){ |
|
|
|
var data = Ext.decode(response.responseText); |
|
|
|
if( data.status == 'ok' ){ |
|
|
|
CompositeVideoStatus = 0; |
|
|
|
CompositeVideoProgress = 0; |
|
|
|
CompositeVideoStatusUpdate(); |
|
|
|
} else { |
|
|
|
Ext.Msg.show({ |
|
|
|
title:'<?=$Labels->GetLabel('_ERROR_MSG_');?>', |
|
|
|
msg: data.msg, |
|
|
|
buttons: Ext.Msg.OK, |
|
|
|
icon: Ext.MessageBox.ERROR |
|
|
|
}); |
|
|
|
}; |
|
|
|
}, |
|
|
|
failure: failureAJAXFunction |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
if( sesVideosListLExists ){ |
|
|
|
rr.add({ |
|
|
|
xtype: 'panel', |
|
|
|
frame: false, |
|
|
|
border: false, |
|
|
|
html: '<div class="vid_dwc_panel"><table width="100%"><tr><td align="center" colspan=3>Composed Video from '+sesVideosListLName+' side</td></tr><tr><td align="right">Duration:</td><td colspan=2>'+CompositeVideoLeftInfo.duration+'</td></tr><tr><td align="right">File size:</td><td colspan=2>'+CompositeVideoLeftInfo.file_size+'</td></tr><tr><td align="center" colspan=2><div id="l_d_button"></div></td><td align="center"><div id="l_e_button"></div></td></tr><tr><td colspan=3> </td></tr></table></div>' |
|
|
|
}); |
|
|
|
rr.doLayout(); |
|
|
|
new Ext.Button({ |
|
|
|
text: 'Download', |
|
|
|
width: '80%', |
|
|
|
renderTo: 'l_d_button', |
|
|
|
handler: function(){ |
|
|
|
const l = document.createElement('a'); |
|
|
|
l.style.display = 'none'; |
|
|
|
l.href = '/lib/controller/getComposedVideo.php?SESSION='+rep_selectedEventId+'&SIDE=L'; |
|
|
|
document.body.appendChild(l); |
|
|
|
l.click(); |
|
|
|
} |
|
|
|
}); |
|
|
|
new Ext.Button({ |
|
|
|
text: 'Delete', |
|
|
|
width: '80%', |
|
|
|
renderTo: 'l_e_button', |
|
|
|
handler: function(){ |
|
|
|
Ext.Ajax.request({ |
|
|
|
url: '/lib/controller/doSessionOperations.php', |
|
|
|
params: { |
|
|
|
SESSION: rep_selectedEventId, |
|
|
|
OPID: 4, |
|
|
|
UID: <?=$UserID;?>, |
|
|
|
SID: '<?=$Session;?>' |
|
|
|
}, |
|
|
|
success: function( response, opts ){ |
|
|
|
var data = Ext.decode(response.responseText); |
|
|
|
if( data.status == 'ok' ){ |
|
|
|
CompositeVideoStatus = 0; |
|
|
|
CompositeVideoProgress = 0; |
|
|
|
CompositeVideoStatusUpdate(); |
|
|
|
} else { |
|
|
|
Ext.Msg.show({ |
|
|
|
title:'<?=$Labels->GetLabel('_ERROR_MSG_');?>', |
|
|
|
msg: data.msg, |
|
|
|
buttons: Ext.Msg.OK, |
|
|
|
icon: Ext.MessageBox.ERROR |
|
|
|
}); |
|
|
|
}; |
|
|
|
}, |
|
|
|
failure: failureAJAXFunction |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
break; |
|
|
|
}; |
|
|
|
break; |
|
|
|
}; |
|
|
|
rr.doLayout(); |
|
|
|
}; |
|
|
|
rr.doLayout(); |
|
|
|
} |
|
|
|
|
|
|
|
function hideEventsVideos(){ |
|
|
|
//if( sesVideosListWindow != null ){
|
|
|
|
// sesVideosListWindow.hide();
|
|
|
|
//}
|
|
|
|
if( CompositeVideoStatusTO!= null ) window.clearTimeout( CompositeVideoStatusTO ); |
|
|
|
CompositeVideoStatusTO = null; |
|
|
|
sesVideosListWindow = null; |
|
|
|
oldCompositeVideoStatus = -1; |
|
|
|
} |
|
|
|
|
|
|
|
function eventVideosStatusUpdater(){ |
|
|
|
@ -792,9 +888,21 @@ function eventVideosStatusUpdater(){ |
|
|
|
}, |
|
|
|
success: function( response, opts ){ |
|
|
|
var data = Ext.decode(response.responseText); |
|
|
|
|
|
|
|
CompositeVideoStatusUpdate() |
|
|
|
CompositeVideoStatusTO = window.setTimeout( 1000, eventVideosStatusUpdater ); |
|
|
|
if( data.status == 'ok' ){ |
|
|
|
if( data.composed_video_status == 'D'){ |
|
|
|
CompositeVideoStatus = 2; |
|
|
|
sesVideosListRExists = data.composed_right_video_exists; |
|
|
|
sesVideosListLExists = data.composed_left_video_exists; |
|
|
|
if( sesVideosListLExists ) CompositeVideoLeftInfo = data.composed_left_info; else CompositeVideoLeftInfo = null; |
|
|
|
if( sesVideosListRExists ) CompositeVideoRightInfo = data.composed_right_info; else CompositeVideoRightInfo = null; |
|
|
|
CompositeVideoStatusUpdate(); |
|
|
|
} else { |
|
|
|
CompositeVideoStatusUpdate(); |
|
|
|
CompositeVideoProgress = data.composed_video_progress; |
|
|
|
setDonatStatus( 1, 0, CompositeVideoProgress ); |
|
|
|
CompositeVideoStatusTO = window.setTimeout( eventVideosStatusUpdater, 1000 ); |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -804,7 +912,7 @@ function showEventsVideos(){ |
|
|
|
sesVideosListWindow = new Ext.Window({ |
|
|
|
title: 'Videos', |
|
|
|
modal: true, |
|
|
|
width: 490, |
|
|
|
width: 510, |
|
|
|
height: 560, |
|
|
|
closeAction: 'close', |
|
|
|
resizable: false, |
|
|
|
|