(function(window,undefined){ var ShmPlayer={ render:function(width,height,pars){ var player=document.getElementById('shmplayer_1023_1520396698'); if(player){ // if(this.witchbrowser()){ if(width == '100%' && height != '100%') { player.style.width=width; player.style.height=height+'px'; player.innerHTML=""; } else if(width != '100%' && height == '100%') { player.style.width='100%'; player.style.height=height; player.innerHTML=""; } else if(width == '100%' && height == '100%'){ player.style.width=width; player.style.height=height; player.innerHTML=""; } else { player.style.width='100%'; player.style.height='100%'; player.innerHTML=""; } }else{ if(pars.pc_src!=""){ pars.src=pars.pc_src; } swfobject.embedSWF("http://vod.static.shm.com.cn/files/contents/shmplayer.swf","shmplayer_1023_1520396698",width,height,"10.1.0","expressInstall.swf",pars,{allowFullScreen: "true",wmode: "direct"}); } } }, witchbrowser:function(){ var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp = sUserAgent.match(/midp/i) == "midp"; var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; var bIsAndroid = sUserAgent.match(/android/i) == "android"; var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; if(bIsIphoneOs||bIsAndroid||bIsWM||bIsCE) return true; else return false; } }; window.ShmPlayer=ShmPlayer; })(window);