Web Interface For Lite Argus Control modules
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.

84 lines
2.5 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
4 years ago
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
4 years ago
​
​
  1. {
  2. id: 'db_node_%%%NODEID%%%',
  3. layout:'vbox',
  4. tools: [{
  5. id:'gear',
  6. handler: function(){
  7. }
  8. }],
  9. frame: true,
  10. draggable: false,
  11. collapsible: false,
  12. bodyStyle: 'padding: 0px;',
  13. title: '%%%NODENAME%%%',
  14. sukaMineWidth: -1,
  15. items:[{
  16. id: 'db_node_%%%NODEID%%%_pic',
  17. border: true,
  18. width: '100%',
  19. html: '<div id="video-%%%STREAMID%%%" style="display: flex;align-items: center;" ><!--img id="video-img-%%%STREAMID%%%" ondblclick="fullScreen(\'video-%%%STREAMID%%%\');" style="cursor: zoom-in" src="/style/assets/no-signal.png" width="100%" /--><video id="video-img-%%%STREAMID%%%" ondblclick="fullScreen(\'video-%%%STREAMID%%%\');" style="cursor: zoom-in" width="100%" src="/style/assets/nosignal.mp4"></video><div id="video-ctl-%%%STREAMID%%%" style="float: left; position: absolute; left: 30px; bottom: 30px; z-index: 1000;"></div></div>'
  20. }],
  21. listeners:{
  22. resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
  23. if( rawWidth!= undefined ){
  24. if( p.sukaMineWidth != adjWidth ){
  25. p.sukaMineWidth = adjWidth;
  26. var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%;
  27. p.setHeight( XX + 32 );
  28. var z = document.getElementById( 'video-%%%STREAMID%%%' );
  29. z.height = XX;
  30. };
  31. };
  32. },
  33. afterrender: function( p ){
  34. var xx = p.getWidth() * ( %%%HEIGHT%%% / %%%WIDTH%%% );
  35. p.setHeight( xx + 32 );
  36. videoElements[videoElements.length] = %%%STREAMID%%%;
  37. var xx = new Ext.Panel({
  38. id: 'video-ctl-panel-%%%STREAMID%%%',
  39. renderTo: 'video-ctl-%%%STREAMID%%%',
  40. border: false,
  41. hidden: true,
  42. frame: false,
  43. width: 400,
  44. height: 42,
  45. layout: 'hbox',
  46. items:[{
  47. xtype: 'button',
  48. width: 32,
  49. iconCls: 'download',
  50. scale: 'medium',
  51. id: 'video-btn-download-%%%STREAMID%%%',
  52. handler: function(){
  53. downloadCurrentVideo( %%%STREAMID%%% );
  54. }
  55. },{
  56. xtype: 'spacer',
  57. width: 20
  58. },{
  59. xtype: 'slider',
  60. width: 250,
  61. id: 'video-slider-%%%STREAMID%%%',
  62. value: 0,
  63. minValue: 0,
  64. maxValue: 100,
  65. listeners:{
  66. change: function( t, b, o ){
  67. setVideoSource( %%%STREAMID%%%, b );
  68. }
  69. }
  70. }]
  71. });
  72. var tt = document.getElementById( 'video-img-' + %%%STREAMID%%% );
  73. tt.addEventListener('timeupdate', () => {
  74. console.log('Progress updated:', tt.currentTime);
  75. });
  76. tt.poster = "/style/assets/no-signal.png";
  77. },
  78. beforedestroy: function(){
  79. var oldPlayer = document.getElementById( 'video-%%%STREAMID%%%' );
  80. /*
  81. videojs( oldPlayer ).dispose();
  82. */
  83. }
  84. }
  85. }