{ "pandav:/template.html.js": { "cubeCode": "Cube('pandav:/com/video/2.5.10/template.html',[],function(a){return a.exports=function(){return''},a.exports});", "requires": [], "buildLevel": 3, "outputDir": "/com/video/2.5.10", "outputPath": "/com/video/2.5.10/template.html.js", "fileName": "/template.html" }, "pandav:/rtsp.html.js": { "cubeCode": "Cube('pandav:/com/video/2.5.10/rtsp.html',[],function(a){return a.exports=function(){return'\" height=\"<%= containerHeight %>\" title=\"rtsp\">\\r\\n \\' />\\r\\n \\' />\\r\\n \\' />\\r\\n \\' />\\r\\n \\r\\n \\r\\n'},a.exports});", "requires": [], "buildLevel": 2, "outputDir": "/com/video/2.5.10", "outputPath": "/com/video/2.5.10/rtsp.html.js", "fileName": "/rtsp.html" }, "pandav:/index.js": { "cubeCode": "Cube('pandav:/com/video/2.5.10',['pandav:/npm/bcore/0.0.18/event','pandav:/npm/lodash/4.6.1','pandav:/npm/jquery/2.1.4','pandav:/com/video/2.5.10/rtsp.html','pandav:/com/video/2.5.10/template.html'],function(a,b,c){var d=c('pandav:/npm/bcore/0.0.18/event'),e=c('pandav:/npm/lodash/4.6.1'),f=c('pandav:/npm/jquery/2.1.4'),g=c('pandav:/com/video/2.5.10/rtsp.html')(),h=c('pandav:/com/video/2.5.10/template.html')();return a.exports=d.extend(function(a,b){this.config={isMuted:!1,theme:{}},this.container=f(a),this.apis=b.apis,this._data=null,this.init(b),window&&window.$ms&&(window.$ms.on('visible',this.videoPlay&&this.videoPlay.bind(this)),window.$ms.on('hide',this.videoPause&&this.videoPause.bind(this)))},{init:function(a){this.mergeConfig(a),this.updateLayout(),this.updateStyle()},render:function(a,b){var c=this;a=this.data(a);var d=this.mergeConfig(b),i=!0;if((a&&a[0]&&a[0].url||d.src)&&(i=!1),this.container.empty(),this.video&&delete this.video,i)this.container.append('

').find('p').text(d.empty);else{var j=a&&a[0]&&a[0].url||d.src;this.template=0===j.toString().indexOf('rtsp:')?e.template(g):e.template(h);var k=this.template({cfg:d,containerWidth:f(this.container).width(),containerHeight:f(this.container).height(),src:j}),l=f(k);this.container.append(l),this.video=l,this.video.on('error',function(a){console.error('video play',a)}),this.video.on('ended',function(){c.emit('video-ended')}),this.video.on('play',function(){c.emit('video-start')}),this.videoDom=l[0],this.videoDom.muted=this.config.isMuted,this.videoDom.volume=d.volume/100,this.updateStyle()}},resize:function(a,b){this.updateLayout(a,b),this.video&&this.video.css({width:a,height:b})},data:function(a){return a&&(this._data=a),this._data},mergeConfig:function(a){return a?(this.config.theme=e.defaultsDeep(a.theme||{},this.config.theme),this.config=e.defaultsDeep(a||{},this.config),this.config):this.config},updateLayout:function(){},updateStyle:function(){},clear:function(){},videoPlay:function(){this.config.autoplay&&this.videoDom&&this.videoDom.play()},videoPause:function(){this.videoDom&&this.videoDom.pause()},videoStart:function(){this.videoDom&&this.videoDom.play()},videoEnded:function(){this.videoDom&&(this.videoDom.pause(),this.videoDom.currentTime=0)},destroy:function(){window&&window.$ms&&(window.$ms.off('visible',this.videoPlay),window.$ms.off('hide',this.videoPause)),this.video=null,this._data=null,this.container.empty()}}),a.exports});", "requires": [ "pandav:/rtsp.html.js", "pandav:/template.html.js" ], "buildLevel": 1, "outputDir": "/com/video/2.5.10", "outputPath": "/com/video/2.5.10/index.js", "fileName": "/index.js" } }