1//æ£æä¸è¾åºmp4ææ¾ä»£ç 2//æµè§å¨æ¯æflashæ¶ï¼ä½¿ç¨flowplayerææ¾å¨ï¼å¦åæ¯æhtml5æ¶ä½¿ç¨html5çvideoæ ç¾ææ¾ 3function showVsbVideo(vurl,vheight,vwidth,align,style,vautoplay,mid) 4{ 5 if(vurl=="") 6 { 7 return; 8 } 9 var outputHTML=""; 10 if (hasPlayHtml5Vedio()) 11 { 12 outputHTML = outPutHTML5Video(vurl, vheight, vwidth, vautoplay, align, style, mid); 13 } else { 14 outputHTML = outPutFlashVideo(vurl, vheight, vwidth, vautoplay, align, style, mid); 15 } 16 document.write(outputHTML); 17} 18 19function hasPlayHtml5Vedio() 20{ 21 var a=document.createElement("video"), c=!!a.canPlayType; 22 if(c) 23 { 24 c=new Boolean(c), 25 c.ogg=a.canPlayType('video/ogg; codecs="theora"'); 26 var d='video/mp4; codecs="avc1.42E01E'; 27 c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"') 28 } 29 return c; 30} 31function outPutFlashVideo(videoUrl,wHeight,wWidth,bautoPlay,align,style,mid) 32{ 33 if(!mid||mid=="") 34 { 35 mid="id=_vsb_player"; 36 } 37 var flashUrl = ""; 38 var hasLoadPlayer = false; 39 try{ 40 //夿æ¯å¦å¼ç¨äºflowplayer çç¸å ³JS å 容ç»ä»¶æ¯ä¸å¼ç¨ç 41 var tmpplayer = flowplayer; 42 hasLoadPlayer = true; 43 }catch (e){ 44 } 45 46 if(hasLoadPlayer){ 47 var realmid = mid.replace("id=","").replace(/\\/g,"").replace(/"/g,""); 48 var realwidth = wWidth.replace("width=","").replace(/\\/g,"").replace(/"/g,""); 49 var realheight = wHeight.replace("height=","").replace(/\\/g,"").replace(/"/g,""); 50 flashUrl = '<a href="'+videoUrl+'" style="display:block;width:'+realwidth+'px;height:'+realheight+'px;" '+mid+'></a><script>flowplayer(\"'+realmid+'\", \"/system/resource/swf/flowplayer.commercial.swf\", {clip:{autoPlay:"+bautoPlay+",autoBuffering:true}});</script>'; 51 }else{ 52 flashUrl='<object '+mid+' align="'+align+'" style="'+style+'" type="application/x-shockwave-flash" data="/system/resource/swf/flowplayer.commercial.swf" '+wWidth+' '+wHeight+'>'; 53 var configstr='"playlist":[{"url":"'+videoUrl+'","scaling":"fit","autoPlay":'+bautoPlay+',"autoBuffering":"false"}]'; 54 flashUrl=flashUrl+'<param name="flashvars" value="config={'+configstr+'}">'; 55 flashUrl=flashUrl+'<param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="sameDomain"><param name="quality" value="high"><param name="cachebusting" value="false"><param name="bgcolor" value="#000000"><param name="src" value="/system/resource/swf/flowplayer.commercial.swf">'; 56 flashUrl=flashUrl+'</object>'; 57 } 58 return flashUrl; 59} 60 61function outPutHTML5Video(videoUrl,wHeight,wWidth,bautoPlay,align,style,mid) 62{ 63 if(!mid||mid=="") 64 { 65 mid="id=_vsb_player"; 66 } 67 //var res='<video controlsList="nodownload" controls '+mid+' style="background-color:#474747;'+style+'" align="'+align+'" '+wWidth+' '+wHeight; 68 var res='<video controls '+mid+' style="background-color:#474747;'+style+'" align="'+align+'" '+wWidth+' '+wHeight; 69 if(bautoPlay && bautoPlay=="true") 70 { 71 res+=' autoplay="autoplay" '; 72 } 73 res +='><source src="'+videoUrl+'" type="video/mp4" /></video> '; 74 return res; 75} 76 77function outVideoForMobile(vurl,vheight,vwidth,vautoplay) 78{ 79 //ææºæ¾ç¤ºæ¶ï¼è§é¢å®½åº¦ä¸ºè®¾å¤å®½åº¦ 80 if(hasPlayHtml5Vedio()) 81 { 82 var res='<video controls="controls" controlsList="nodownload" width="'+document.body.clientWidth+'"'; 83 if(vautoplay&&vautoplay=="true") 84 { 85 res+=' autoplay="autoplay" '; 86 } 87 res +='><source src="'+vurl+'" type="video/mp4" /></video> '; 88 89 document.write(res); 90 } 91 else 92 alert("䏿¯æ"); 93} 94//æç« å 容ç»ä»¶å ¶å®æ¯ä¸éè¦ç å 为newscontent.jséé¢å·²ç»å å«äºè¿ä¸ªæ¹æ³ï¼å å°è¿éåªè¦æ¯ä¸ºäºç®ä»ç»ä»¶ä½¿ç¨ 95//æ£æä¸è¾åºmp3ææ¾ä»£ç 96function showVsbAudio(aurl,vheight,vwidth,align,styles,vautoplay) 97{ 98 if(aurl=="") 99 { 100 return; 101 } 102 var playersrc = "/system/resource/images/ueditor/musicFlash/player_mp3_maxi.swf"; 103 var flashvars = "mp3="+aurl+"&showstop=1&showvolume=1&bgcolor1=eeeeee&bgcolor2=a0a0a0"; 104 var autoplayStr = ""; 105 if(vautoplay=="true") 106 { 107 autoplayStr = "autoplay = 'true'"; 108 flashvars +="&autoplay=1"; 109 } 110 var outputHTML=""; 111 outputHTML +='<audio src="'+aurl+'" width="'+vwidth+'" height="'+vheight+'" '+autoplayStr+' align="'+align+'" style="'+styles+'" controls="controls" loop="true"><embed align="'+align+'" style="'+styles+'" width="'+vwidth+'" height="'+vheight+'" src="'+playersrc+'" flashvars="'+flashvars+'" /></audio>'; 112 document.write(outputHTML); 113} 114 115 116/** 117 * æ£æä¸æ¾ç¤ºPDF 118 * @param path 119 * @param width 120 * @param heigth 121 * @param imagenum 122 * @param style 123 * @param imagedata 124 */ 125function showVsbpdfIframe(path,width,heigth,imagenum,style,imagedata){ 126 if(path=="") 127 { 128 return; 129 } 130 var outputHTML=""; 131 132 //夿æµè§å¨çæ¬ 133 if(isSupportPddfjs()){ 134 //pdfjs 135 outputHTML = "<iframe src=\"/system/resource/pdfjs/viewer.html?file="+encodeURIComponent(path)+"\" width=\""+width+"\" height=\""+heigth+"\" style='"+style+"'></iframe>"; 136 }else{ 137 //å¾ç 138 if(imagedata && imagedata.length >0){ 139 var imageStr = ""; 140 imageStr = "<div style='"+style+";overflow-y: auto;overflow-x:hidden;text-indent: 0;width: "+(width.indexOf("%") != -1?width:width+"px")+";height: "+(heigth.indexOf("%") != -1?heigth:heigth+"px")+"; '>"; 141 for(var i=0;i<imagedata.length ;i++){ 142 var tmpimgpath = imagedata[i]; 143 imageStr += "<img src='"+tmpimgpath+"' width='100%' class='img_vsb_content'>"; 144 imageStr += "<div style=\"height:32px;line-height:32px;font-size:14px; width:100%;background-color:#3D3D3D;text-align:center;color:#ececec;\">第 "+(i+1)+" 页</div>"; 145 } 146 imageStr += "</div>"; 147 outputHTML = imageStr; 148 }else{ 149 outputHTML = "<iframe src=\""+path+"\" width=\""+width+"\" height=\""+heigth+"\" style='"+style+"'></iframe>"; 150 } 151 } 152 document.write(outputHTML); 153} 154 155/** 156 * 夿æµè§å¨æ¯å¦æ¯æpdf.jsz` 157 * @returns {boolean} 158 */ 159function isSupportPddfjs(){ 160 var agent = navigator.userAgent.toLowerCase(); 161 var isIe = /(msie\s|trident.*rv:)([\w.]+)/.test(agent); 162 if(isIe){ 163 return false; 164 } 165 166 var safari; 167 if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(agent) && !/chrome/i.test(agent)){ 168 safari = + (RegExp['\x241'] || RegExp['\x242']); 169 } 170 171 if(safari && safari < 11){ 172 return false; 173 } 174 175 var mobile = agent.match(/applewebkit.*mobile.*/); 176 if(mobile){ 177 return false; 178 } 179 180 return true; 181}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.