论坛里现在有一些 快播和百度影音的帖子
有时候一个资料两种播放器都可以用。
但现在只搞定快播和百度影音单一播放模式。
有快播就没百度影音,有百度影音就没有快播
先帖出快播的代码:
- <script>
- function ubbShowObj(strType,strID,strURL,intWidth,intHeight)
- {
- var objPrefix="bShow";
- var tmpstr="";
- var bSwitch = false;
- bSwitch = document.getElementById(objPrefix+strID).value;
- bSwitch =~bSwitch;
- document.getElementById(objPrefix+strID).value = bSwitch;
- if(bSwitch){
- document.getElementById(strID).innerHTML = "";
- }else{
- switch(strType){
- case "qplay":
- tmpstr='<object classid="clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF" width="'+intWidth+'" height="'+intHeight+'" id="QvodPlayer" name="QvodPlayer" onError=if(window.confirm("请您先安装Qvod播放器,然后再点击播放.")){window.location.;}else{self.reload();}><PARAM NAME="URL" VALUE="'+strURL+'"><param name="Autoplay" value="1"></object>';
- break;
- }
- document.getElementById(strID).innerHTML = tmpstr;
- }
- }
- </script>
复制代码
再来是百度影音的代码:
- <object classid="clsid:02E2D748-67F8-48B4-8AB4-0A085374BB99" width="'+intWidth+'" height="'+intHeight+'" id="BaiduPlayer" name="BaiduPlayer" onError=if(window.confirm('请您先安装百度影音软件,然后刷新本页才可以正常播放.')){window.open('http://player.baidu.com')}else{self.location='http://player.baidu.com'}>
- <PARAM NAME='URL' VALUE="'+strURL+'">
- <PARAM NAME='Autoplay' VALUE='1'>
- </object>
复制代码
因为在代码方面实在是太菜鸟了。请问怎么把上面两段代码合而为一。求码神{:soso_e121:}
|