|
|
{ id: 'db_node_%%%NODEID%%%', //xxtype: 'panel',
xtype: 'portlet', //columnWidth:.33,
//layout: 'fit',
width: 258, height: 400, tools: [{ id:'gear', handler: function(){ Ext.Msg.alert('Message', 'The Settings tool was clicked.'); } },{ id:'close', handler: function(e, target, panel){ panel.ownerCt.remove(panel, true); } }], frame: true, bodyStyle: 'padding: 0px;', plr: null, title: '%%%NODENAME%%%', items:[{ html: '<video id="hls-%%%NODEID%%%" class="video-js vjs-default-skin" width="244" height="200"></video>', },{ xtype: 'spacer', height: 5 },{ xtype: 'combo', id: 'src_combo_%%%NODEID%%%', typeAhead: false, width: 244, triggerAction: 'all', listEmptyText: 'No Video Sources', lazyRender:true, mode: 'local', %%%SELID%%% listeners:{ 'select': function( t, r, i ){ var p = Ext.getCmp('db_node_%%%NODEID%%%'); if( p != null ){ if( p.plr!= null ){ p.plr.src({type: 'application/x-mpegURL', src: r.data.src }); }; }; } }, store: new Ext.data.ArrayStore({ id: 0, fields: [ 'id', 'label', 'src' ], data: %%%URLS%%% }), valueField: 'id', displayField: 'label' },{ xtype: 'spacer', height: 5 },{ xtype: 'button', text: 'PTZ Control', width: 244, handler: function(){ alert("ptz "); } }], listeners:{ afterrender: function( t ){ t.plr = videojs.getPlayer('hls-%%%NODEID%%%'); if( t.plr == null ){ t.plr = videojs('hls-%%%NODEID%%%',{ autoplay: 'muted', controls: true, controlBar: { volumePanel: false, playToggle: false, pictureInPictureToggle: false } }); }; t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'}); return true; }, destroy: function( t ){ if( t.plr != null ) t.plr.dispose(); t.plr = null; } }}
|