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.

92 lines
1.9 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
  1. {
  2. id: 'db_node_%%%NODEID%%%',
  3. //xxtype: 'panel',
  4. xtype: 'portlet',
  5. //columnWidth:.33,
  6. //layout: 'fit',
  7. width: 258,
  8. height: 400,
  9. tools: [{
  10. id:'gear',
  11. handler: function(){
  12. Ext.Msg.alert('Message', 'The Settings tool was clicked.');
  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: '<video id="hls-%%%NODEID%%%" class="video-js vjs-default-skin" width="244" height="200"></video>',
  26. },{
  27. xtype: 'spacer',
  28. height: 5
  29. },{
  30. xtype: 'combo',
  31. id: 'src_combo_%%%NODEID%%%',
  32. typeAhead: false,
  33. width: 244,
  34. triggerAction: 'all',
  35. listEmptyText: 'No Video Sources',
  36. lazyRender:true,
  37. mode: 'local',
  38. %%%SELID%%%
  39. listeners:{
  40. 'select': function( t, r, i ){
  41. var p = Ext.getCmp('db_node_%%%NODEID%%%');
  42. if( p != null ){
  43. if( p.plr!= null ){
  44. p.plr.src({type: 'application/x-mpegURL', src: r.data.src });
  45. };
  46. };
  47. }
  48. },
  49. store: new Ext.data.ArrayStore({
  50. id: 0,
  51. fields: [
  52. 'id',
  53. 'label',
  54. 'src'
  55. ],
  56. data: %%%URLS%%%
  57. }),
  58. valueField: 'id',
  59. displayField: 'label'
  60. },{
  61. xtype: 'spacer',
  62. height: 5
  63. },{
  64. xtype: 'button',
  65. text: 'PTZ Control',
  66. width: 244,
  67. handler: function(){
  68. alert("ptz ");
  69. }
  70. }],
  71. listeners:{
  72. afterrender: function( t ){
  73. t.plr = videojs.getPlayer('hls-%%%NODEID%%%');
  74. if( t.plr == null ){
  75. t.plr = videojs('hls-%%%NODEID%%%',{
  76. autoplay: 'muted',
  77. controls: true,
  78. controlBar: {
  79. volumePanel: false,
  80. playToggle: false,
  81. pictureInPictureToggle: false
  82. }
  83. });
  84. };
  85. t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'});
  86. return true;
  87. },
  88. destroy: function( t ){
  89. if( t.plr != null ) t.plr.dispose();
  90. t.plr = null;
  91. }
  92. }
  93. }