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 if(bautoPlay && bautoPlay=="true") 69 { 70 res+=' autoplay="autoplay" '; 71 } 72 res +='><source src="'+videoUrl+'" type="video/mp4" /></video> '; 73 return res; 74} 75 76function outVideoForMobile(vurl,vheight,vwidth,vautoplay) 77{ 78 //ææºæ¾ç¤ºæ¶ï¼è§é¢å®½åº¦ä¸ºè®¾å¤å®½åº¦ 79 if(hasPlayHtml5Vedio()) 80 { 81 var res='<video controls="controls" controlsList="nodownload" width="'+document.body.clientWidth+'"'; 82 if(vautoplay&&vautoplay=="true") 83 { 84 res+=' autoplay="autoplay" '; 85 } 86 res +='><source src="'+vurl+'" type="video/mp4" /></video> '; 87 88 document.write(res); 89 } 90 else 91 alert("䏿¯æ"); 92} 93//æç« å 容ç»ä»¶å ¶å®æ¯ä¸éè¦ç å 为newscontent.jséé¢å·²ç»å å«äºè¿ä¸ªæ¹æ³ï¼å å°è¿éåªè¦æ¯ä¸ºäºç®ä»ç»ä»¶ä½¿ç¨ 94//æ£æä¸è¾åºmp3ææ¾ä»£ç 95function showVsbAudio(aurl,vheight,vwidth,align,styles,vautoplay) 96{ 97 if(aurl=="") 98 { 99 return; 100 } 101 var playersrc = "/system/resource/images/ueditor/musicFlash/player_mp3_maxi.swf"; 102 var flashvars = "mp3="+aurl+"&showstop=1&showvolume=1&bgcolor1=eeeeee&bgcolor2=a0a0a0"; 103 var autoplayStr = ""; 104 if(vautoplay=="true") 105 { 106 autoplayStr = "autoplay = 'true'"; 107 flashvars +="&autoplay=1"; 108 } 109 var outputHTML=""; 110 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>'; 111 document.write(outputHTML); 112} 113 114 115/** 116 * æ£æä¸æ¾ç¤ºPDF 117 * @param path 118 * @param width 119 * @param heigth 120 * @param imagenum 121 * @param style 122 * @param imagedata 123 */ 124function showVsbpdfIframe(path,width,heigth,imagenum,style,imagedata){ 125 if(path=="") 126 { 127 return; 128 } 129 var outputHTML=""; 130 131 //夿æµè§å¨çæ¬ 132 if(isSupportPddfjs()){ 133 //pdfjs 134 outputHTML = "<iframe src=\"/system/resource/pdfjs/viewer.html?file="+encodeURIComponent(path)+"\" width=\""+width+"\" height=\""+heigth+"\" style='"+style+"'></iframe>"; 135 }else{ 136 //å¾ç 137 if(imagedata && imagedata.length >0){ 138 var imageStr = ""; 139 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")+"; '>"; 140 for(var i=0;i<imagedata.length ;i++){ 141 var tmpimgpath = imagedata[i]; 142 imageStr += "<img src='"+tmpimgpath+"' width='100%' class='img_vsb_content'>"; 143 imageStr += "<div style=\"height:32px;line-height:32px;font-size:14px; width:100%;background-color:#3D3D3D;text-align:center;color:#ececec;\">第 "+(i+1)+" 页</div>"; 144 } 145 imageStr += "</div>"; 146 outputHTML = imageStr; 147 }else{ 148 outputHTML = "<iframe src=\""+path+"\" width=\""+width+"\" height=\""+heigth+"\" style='"+style+"'></iframe>"; 149 } 150 } 151 document.write(outputHTML); 152} 153 154/** 155 * 夿æµè§å¨æ¯å¦æ¯æpdf.jsz` 156 * @returns {boolean} 157 */ 158function isSupportPddfjs(){ 159 var agent = navigator.userAgent.toLowerCase(); 160 var isIe = /(msie\s|trident.*rv:)([\w.]+)/.test(agent); 161 if(isIe){ 162 return false; 163 } 164 165 var safari; 166 if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(agent) && !/chrome/i.test(agent)){ 167 safari = + (RegExp['\x241'] || RegExp['\x242']); 168 } 169 170 if(safari && safari < 11){ 171 return false; 172 } 173 174 var mobile = agent.match(/applewebkit.*mobile.*/); 175 if(mobile){ 176 return false; 177 } 178 179 return true; 180}
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.