发现“易播器V1.2”源码的几个问题:
1、第三步MV标签代码应为:
- <script language="JavaScript" src="music/player/js/linkfunc.js"></script><img src="images/tryer4/bb_mv.gif" border="0" alt="黑色天堂论坛播放器">如果你想在论坛播放器播放,请先<a href="music/">启动播放器</a>,再进行右面操作.
- <a href="javascript: hh_play(true,'{2}','{3}',0,'{1}',0);">马上播放</a> <a href="javascript: hh_play(false,'{2}','{3}',0,'{1}',0);">追加到播放列表</a>
- <script language="javascript">
- var LINK = new Array("{3}","黑色天堂");
- var linkType = new Array();
- linkType['WMA'] = 'MP3';
- linkType['MP3'] = 'MP3';
- linkType['WMV'] = 'WMP';
- linkType['ASF'] = 'WMP';
- linkType['MPG'] = 'WMP';
- linkType['MPEG'] = 'WMP';
- linkType['AVI'] = 'WMP';
- linkType['ASX'] = 'WMP';
- linkType['WAV'] = 'WMP';
- linkType['RM'] = 'Real';
- linkType['RMVB'] = 'Real';
- linkType['RAM'] = 'Real';
- linkType['RA'] = 'Real';
- linkType['SWF'] = 'Flash';
- var sufFix = LINK[0].substring(LINK[0].lastIndexOf(".")+1,LINK[0].length).toUpperCase();
- if(sufFix.indexOf("#")) sufFix = sufFix.split("#")[0];
- if(sufFix.indexOf("?")) sufFix = sufFix.split("?")[0];
- function MP3(){
- document.write("<iframe border='0' width='350' height='101' scrolling='no' frameborder='0' src='./music/bbsplaymv.php?url="+LINK[0]+"'></iframe>");
- document.close();
- }
- function WMP(){
- document.write("<iframe border='0' width='350' height='346' scrolling='no' frameborder='0' src='./music/bbsplaymv1.php?url="+LINK[0]+"'></iframe>");
- document.close();
- }
- function Real(){
- document.writeln("<object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width='400' height='300' id='amourReal'>");
- document.writeln(" <param name='src' value='"+LINK[0]+"'>");
- document.writeln(" <param name='autostart' value='true'>");
- document.writeln(" <param name='controls' value='imagewindow'>");
- document.writeln(" <param name='console' value='clip1'>");
- document.writeln(" <embed src='"+LINK[0]+"' width='400' height='300' type='audio/x-pn-realaudio-plugin' autostart='true' controls='imagewindow' console='video'>");
- document.writeln(" </embed>");
- document.writeln("</object>");
- document.writeln("<br />");
- document.writeln("<object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width='400' height='50' id='amourReal'>");
- document.writeln(" <param name='src' value='"+LINK[0]+"'>");
- document.writeln(" <param name='autostart' value='true'>");
- document.writeln(" <param name='controls' value='all'>");
- document.writeln(" <param name='console' value='clip1'>");
- document.writeln(" <embed type='audio/x-pn-realaudio-plugin' src='"+LINK[0]+"' width='400' height='50' autostart='true' controls='all' console='video'>");
- document.writeln(" </embed>");
- document.writeln("</object>");
- document.close();
- }
- function Flash(){
- document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='600' height='480'>");
- document.write("<param name='movie' value='"+LINK[0]+"'>");
- document.write("<param name='quality' value='high'>");
- document.write("<embed src='"+LINK[0]+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='480' height='330'></embed>");
- document.write("</object>");
- document.close();
- }
- function Default(){
- document.writeln("<a href='"+ LINK[0] +"' target='_blank'>" + LINK[1] + "</a>");
- document.close();
- }
- if(linkType[sufFix]){
- eval(linkType[sufFix]+"()");
- }else{
- Default();
- }
- </script>
复制代码
否则会出现MP类的文件无法播放,找不到播放器的问题
2、bbsplaymv、bbsplaymv1两个文件有问题
解决方法:将两个文件内的
全部替换为
最后,希望易播器越做越好!
PS:还有个问题
播放按钮和静音按钮的图片有问题,要改Javascript。
[ 本帖最后由 Sail侠客 于 2006-6-21 14:32 编辑 ] |