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.

82 lines
1.7 KiB

6 years ago
​
​
​
​
​
​
5 years ago
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: 270,
  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. listeners:{
  62. afterrender: function( t ){
  63. t.plr = videojs.getPlayer('hls-%%%NODEID%%%');
  64. if( t.plr == null ){
  65. t.plr = videojs('hls-%%%NODEID%%%',{
  66. autoplay: 'muted',
  67. controls: true,
  68. controlBar: {
  69. volumePanel: false,
  70. playToggle: false,
  71. pictureInPictureToggle: false
  72. }
  73. });
  74. };
  75. t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'});
  76. return true;
  77. },
  78. destroy: function( t ){
  79. if( t.plr != null ) t.plr.dispose();
  80. t.plr = null;
  81. }
  82. }
  83. }