html5播放器支持修改方案
找到这个文件 \source\function\function_discuzcode.php
查找这个代码
把他下面的这些代码
- $randomid = 'mp3_'.random(3);
- return '<span id="'.$randomid.'"></span><script type="text/javascript" reload="1">$(\''.$randomid.'\').innerHTML=AC_FL_RunContent(\'FlashVars\', \'soundFile='.urlencode($url).'\', \'width\', \'290\', \'height\', \'24\', \'allowNetworking\', \'internal\', \'allowScriptAccess\', \'never\', \'src\', \''.STATICURL.'image/common/player.swf\', \'quality\', \'high\', \'bgcolor\', \'#FFFFFF\', \'menu\', \'false\', \'wmode\', \'transparent\', \'allowscriptaccess\', \'none\', \'allowNetworking\', \'internal\');</script>';
复制代码 替换为
- if (strpos($_SERVER["HTTP_USER_AGENT"], "MSIE 6") || strpos($_SERVER["HTTP_USER_AGENT"], "MSIE 7") || strpos($_SERVER["HTTP_USER_AGENT"], "MSIE 8")) {//判别IE版本
- $randomid = 'mp3_'.random(3);
- return '<span id="'.$randomid.'"></span><script type="text/javascript" reload="1">$(\''.$randomid.'\').innerHTML=AC_FL_RunContent(\'FlashVars\', \'soundFile='.urlencode($url).'\', \'width\', \'290\', \'height\', \'24\', \'allowNetworking\', \'internal\', \'allowScriptAccess\', \'never\', \'src\', \''.STATICURL.'image/common/player.swf\', \'quality\', \'high\', \'bgcolor\', \'#FFFFFF\', \'menu\', \'false\', \'wmode\', \'transparent\', \'allowscriptaccess\', \'none\', \'allowNetworking\', \'internal\');</script>';
- }else {
- return '<audio src="'.$url.'" controls="true" preload="true" autoplay="true"></audio>';
- }
复制代码 看看是不是以HTML5的播放器播放的!
修改前请备份你的文件!以免误操作!
|