Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
5.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. {
  2. id: 'db_node_%%%NODEID%%%',
  3. //xxtype: 'panel',
  4. xtype: 'portlet',
  5. //columnWidth:.33,
  6. //layout: 'fit',
  7. width: 258,
  8. height: %%%HEIGHT%%%+68,
  9. tools: [{
  10. id:'gear',
  11. handler: function(){
  12. editAnalogStream( %%%STREAMID%%%, 1 );
  13. }
  14. }/*,{
  15. id:'close',
  16. handler: function(e, target, panel){
  17. panel.ownerCt.remove(panel, true);
  18. }
  19. }*/],
  20. frame: true,
  21. bodyStyle: 'padding: 0px;',
  22. plr: null,
  23. title: '%%%NODENAME%%%',
  24. items:[{
  25. html: '<img onmouseover="ptzCtrl(\'img-%%%NODEID%%%\');" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="%%%WIDTH%%%" height="%%%HEIGHT%%%"/>',
  26. },{
  27. xtype: 'spacer',
  28. height: 5
  29. },{
  30. xtype: 'button',
  31. id: 'ptz_btn_%%%NODEID%%%',
  32. width: '100%',
  33. text: 'PTZ Control',
  34. enableToggle: true,
  35. handler: function(){
  36. var t = Ext.getCmp('db_node_%%%NODEID%%%');
  37. if( Ext.getCmp('ptz_btn_%%%NODEID%%%').pressed ){
  38. document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  39. document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  40. document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  41. document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  42. document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  43. document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  44. document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  45. document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  46. document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  47. document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  48. document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  49. document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  50. document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  51. document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  52. document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  53. document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  54. document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  55. document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  56. document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  57. document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  58. document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop );
  59. } else {
  60. t.setSize( 258, %%%HEIGHT%%%+68 );
  61. //Ext.Msg.alert('Message', 'The 270 tool was clicked.');
  62. };
  63. t.doLayout();
  64. }
  65. },{
  66. xtype: 'spacer',
  67. height: 3
  68. },{
  69. html: '<table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td>&nbsp;</td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td>&nbsp;</td></tr></table>',
  70. height: 90
  71. }],
  72. listeners:{
  73. afterrender: function( t ){
  74. /*
  75. t.plr = videojs.getPlayer('hls-%%%NODEID%%%');
  76. if( t.plr == null ){
  77. t.plr = videojs('hls-%%%NODEID%%%',{
  78. autoplay: 'muted',
  79. controls: true,
  80. controlBar: {
  81. volumePanel: false,
  82. playToggle: false,
  83. pictureInPictureToggle: false
  84. }
  85. });
  86. };
  87. t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'});
  88. */
  89. return true;
  90. },
  91. destroy: function( t ){
  92. if( t.plr != null ) t.plr.dispose();
  93. t.plr = null;
  94. }
  95. }
  96. }