filesbox/web/dist/design/designstatic/chatroom/video/player.js
2024-07-26 14:10:54 +08:00

2 lines
21 KiB
JavaScript

var player,isLive=!1,autoplay=!1,videoPlayer,showControls=!1,speed=[.75,1,1.25,1.5],playerList=[],flvplayerList=[],createList=[],createing=!1,onlineCameraIndex=0,onlineIndex=0,playHistory=[],onlineTime,camTime,isSettingSwf=!1,refreshCount=0,isFull=!1,isAddLise=!1,audioId,playseek=0,isSetSeeked=!1,seekId,needSeek=!1,errorCount=0,intervalId=null,RECONNECT_TIME=4e3,onlineStatus="",onlineCameraStatus="",interactionStatus="",isShowAutoTip=!1;function createPlayer(n,e,a,i,r,l,o,f){if(n==null||n==null||n==""){console.log("\u64AD\u653E\u5668Id\u4E0D\u80FD\u4E3A\u7A7A");return}var d=$("#"+n),v=null;return d.length==0&&(v=document.createElement("VIDEO"),v.id=n),v}var flashChecker=function(){var n=/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent);if(n)return window.localStorage.setItem("isFlashPlayerError",1),{f:0,v:0};var e=0,a=0;if(document.all){var i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");i&&(e=1,VSwf=i.GetVariable("$version"),a=parseInt(VSwf.split(" ")[1].split(",")[0]))}else if(navigator.plugins&&navigator.plugins.length>0){var i=navigator.plugins["Shockwave Flash"];if(i){e=1;for(var r=i.description.split(" "),l=0;l<r.length;++l)isNaN(parseInt(r[l]))||(a=parseInt(r[l]))}}return{f:e,v:a}},errorcallback;function init(n,e,a,i,r,l,o,f,d){!isSettingSwf&&typeof videojs!="undefined"&&(videojs.options.flash.swf="/design/designstatic/chatroom/video/VideoJS.swf",isSettingSwf=!0);for(var v=0;v<playerList.length;v++)if(playerList[v].id_===n)return;if(e=="flash"&&flashChecker().f===0){var j=$("#flashplayerError");if(j.length===0){var S='<div id="flashplayerError" class="player_choice_box"><div class="choice_content"><div class="choice_header">\u68C0\u6D4B\u5230\u60A8\u7684\u6D4F\u89C8\u5668\u672A\u5B89\u88C5\u6216\u8005\u88AB\u7981\u7528\u4E86</br>Flash\u63D2\u4EF6\uFF0C\u6682\u65F6\u65E0\u6CD5\u89C2\u770B\u3002\u60A8\u53EF\u4EE5...</p></div><div class="choice_footer"><a href="javascript:void(0);" onclick="changeMedia()">\u4F7F\u7528HTML5\u64AD\u653E\u5668</a><a class="active" href="//www.adobe.com/go/getflash" target="_blank">\u542F\u7528Flash\u63D2\u4EF6</a></div></div></div>',_=window.location.href||"";_.indexOf("/views/troom/assistantlive.html")>-1&&$("body").append(S)}}if(createing){createList.push({id:n,playerType:e,callback:f,url:a,isLive,autoplay:r,showControls:l,thumbUrl:o});return}isLive=i;var h=document.getElementById(n);if(createing=!0,window.localStorage.setItem("isFlashPlayerError",0),a===""){if(n==="onlineCamera"){liveObj.cameraBackState(1,!0),f&&f(),createing=!1,removeCreateListById(n);return}else if(n==="online"){liveObj.cameraBackState(0,!0),f&&f(),createing=!1,removeCreateListById(n);return}}if(console.log("playerType:",e),e==="html5"&&(getVideoType(a)==""||getVideoType(a)=="flv"))if(d===void 0&&(d=!0),flvjs.isSupported()){var w=d&&n==="floatCamera"?!0:n==="floatCamera"?!1:void 0,m=flvjs.createPlayer({type:"flv",url:a,isLive:!0,hasAudio:w},{fixAudioTimestampGap:!1}),k=n==="onlineCamera"?"video-js vjs-default-skin vjs-big-play-centered vjs-fluid":"centeredVideo flvVideo vjs-full";h.className=k,m.attachMediaElement(h),m.load();var g=document.getElementById(n);if(g.volume=0,g.play&&g.play(),createing=!1,removeCreateListById(n),flvplayerList.push(m),n==="onlineCamera"){let s=function(){liveObj.cameraBackState(1,!0),onlineCameraStatus="error";try{setTimeout(function(){console.log("\u6444\u50CF\u5934\u91CD\u8FDE\u4E2D"),getPlayer("onlineCamera").unload(),getPlayer("onlineCamera").load(),getPlayer("onlineCamera").play()},RECONNECT_TIME),window.ScreenFull&&document.fullscreenElement&&document.fullscreenElement.id=="onlineCamera"&&ScreenFull.exitFullscreen()}catch(t){console.log("\u6444\u50CF\u5934\u91CD\u8FDE\u5931\u8D25:",t)}};var I=s;getPlayer("onlineCamera").on("alive",function(){liveObj.cameraBackState(1,!1),camTime&&window.clearInterval(camTime)}),getPlayer("onlineCamera")._msectl.on("update_end",function(t){var c=getPlayer("onlineCamera")._msectl._mediaSource.readyState;c==="ended"&&(console.log("\u6444\u50CF\u5934\u7ED3\u675F"),s());var u=document.getElementById("onlineCamera");u.paused?(onlineCameraStatus!=="pause"&&liveObj.addPlay.campauseListenerFun(),onlineCameraStatus="pause"):(onlineCameraStatus!=="playing"&&liveObj.addPlay.camPlayListenerFun(),onlineCameraStatus="playing")}),getPlayer("onlineCamera").on("error",function(t){s()}),getPlayer("onlineCamera").on("noLiveStream",function(){console.log("onlineCamera","noLiveStream"),liveObj.cameraBackState(1,!0)})}else if(n==="interaction"){let s=function(){interactionStatus="error";try{setTimeout(function(){console.log("\u65C1\u8DEF\u91CD\u8FDE\u4E2D"),getPlayer("interaction").unload(),getPlayer("interaction").load(),getPlayer("interaction").play()},RECONNECT_TIME)}catch(t){console.log("\u65C1\u8DEF\u91CD\u8FDE\u5931\u8D25:",t)}};var B=s;console.log("\u65C1\u8DEF\u6D41"),getPlayer("interaction").on("alive",function(){camTime&&window.clearInterval(camTime)}),getPlayer("interaction")._msectl.on("update_end",function(t){var c=getPlayer("interaction")._msectl._mediaSource.readyState;c==="ended"?s():c==="open"&&($("#interaction")[0].volume==0||$("#interaction")[0].muted)&&!$(".volumeinter").length&&$("#interaction").length&&($("#interaction")[0].muted=!1,$("#interaction")[0].volume=1);var u=document.getElementById("interaction");u.paused?interactionStatus="pause":interactionStatus="playing"}),getPlayer("interaction").on("error",function(t){s()}),getPlayer("interaction").on("noLiveStream",function(){})}else if(n==="floatCamera")console.log("\u60AC\u6D6E\u76F4\u64AD\u6D41");else{let s=function(){liveObj.cameraBackState(0,!0),onlineStatus="error";try{setTimeout(function(){console.log("\u767D\u677F\u6D41\u91CD\u8FDE"),getPlayer("online").unload(),getPlayer("online").load(),getPlayer("online").play()},RECONNECT_TIME),window.ScreenFull&&document.fullscreenElement&&document.fullscreenElement.id=="online"&&ScreenFull.exitFullscreen()}catch(t){console.log("\u767D\u677F\u91CD\u8FDE\u5931\u8D25:",t)}};var P=s;getPlayer("online").on("alive",function(){console.log("alive"),typeof liveObj!="undefined"&&liveObj.cameraBackState(0,!1),onlineTime&&window.clearInterval(onlineTime)}),getPlayer("online")._msectl.on("update_end",function(t){var c=getPlayer("online")._msectl._mediaSource.readyState,u=document.getElementById("online");if(console.log("readyState:",c),c==="ended")console.log("\u767D\u677F\u7ED3\u675F"),s();else if(c==="open"&&window.layer&&u.volume===0&&!isShowAutoTip){isShowAutoTip=!0;var b=+window.localStorage.getItem("voicePlayerTip");b!==1&&layer.open({type:1,offset:"auto",title:"",skin:"volume-class-modal",area:["350px","110px"],content:'<div><p class="intro">\u68C0\u6D4B\u5230\u60A8\u5F53\u524D\u5904\u4E8E\u9759\u97F3\u72B6\u6001\uFF0C\u662F\u5426\u5F00\u542F\u58F0\u97F3\u3002</p></div> ',btn:["\u70B9\u51FB\u5F00\u542F"],btnAlign:"c",yes:function(F,O){$("#online").length&&($("#online")[0].muted=!1),$(".js_voice_btn").trigger("click"),layer.closeAll()},btn2:function(F,O){}})}u.paused?(onlineStatus!=="pause"&&liveObj.addPlay.pauseListenerFun(),onlineStatus="pause"):(onlineStatus!=="playing"&&($(".js_live_wait").length>0&&$(".js_live_wait").text("\u6B63\u5728\u52AA\u529B\u8FDB\u5165\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF5E"),liveObj.addPlay.playListenerFun()),onlineStatus="playing")}),getPlayer("online").on("error",function(t){console.log("online:",t),s()}),getPlayer("online").on("noLiveStream",function(){console.log("noLiveStream"),console.log("online","noLiveStream"),typeof liveObj!="undefined"&&liveObj.cameraBackState(0,!0)})}f()}else init(n,"flash",a,isLive,r,l,o,f,d);else if(h.className="video-js vjs-default-skin vjs-big-play-centered vjs-fluid",isLive){setTimeout(function(){flashIsAdd==!1&&(window.localStorage.setItem("isFlashPlayerError",1),removePlayerById("online"),removePlayerById("onlineCamera"),$("#whiteboard_box").html(""),$("#teacher_camera_box").html(""),liveObj.addPlay.addFlashOnline(),liveObj.addPlay.addFlashOnlineCamera())},15e3);var C=window.location.href||"",y=void 0;if(C.indexOf("views/myroom/livecourse.html")>-1)switch(n){case"onlineCamera":{y=!1;break}case"online":break;default:break}videoPlayer=videojs(n,{techId:n,autoplay:!0,controlBar:y},function(){window.localStorage.setItem("isFlashPlayerError",0),playerList.push(videoPlayer),this.src({src:a,type:"rtmp/flv"}),n==="online"&&($("#online .vjs-control-bar").hide(),playerList[playerList.length-1].on("playing",function(s){console.log("playing"),$(".full_screen").on("click",function(){$("#online .vjs-control-bar").show(),getPlayer("online").requestFullscreen()}),getPlayer("online").on("fullscreenchange",function(t){if(getPlayer("online").player_.isFullscreen_){var c=$("#whiteboard_box").attr("studio");$(".video-js .vjs-play-control.vjs-playing")[0].style.display="none",$(".video-js .vjs-volume-menu-button")[0].style.display="none",$(".video-js .vjs-progress-control")[0].style.display="none",$(".video-js .vjs-time-control")[3].style.display="none",c=="1"&&($("body").find(".video-js .vjs-play-control.vjs-playing").hide(),$("body").find(".video-js .vjs-volume-menu-button").hide(),$("body").find(".video-js .vjs-progress-control").hide(),$("body").find(".video-js .vjs-time-control").hide()),$(".vjs-paused .vjs-ended").hide()}else $("#online .vjs-control-bar").hide();getPlayer("online").controls(getPlayer("online").player_.isFullscreen_)})}),isAddLise=!0),f&&f(),createing=!1,removeCreateListById(n)})}else{var p=[];typeof e=="string"||typeof e=="String"?p.push(e):p=e,(/windows nt 5.1/.test(navigator.userAgent)||/Windows NT 5.1/.test(navigator.userAgent))&&(p=["flash"]),videoPlayer=videojs(n,{techOrder:p,controls:l,bigPlayButton:l,autoplay:r,fluid:!0,hasAudio:!1,hasVideo:!0,poster:o,language:"zh-CN",controlBar:{currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,remainingTimeDisplay:!0,playbackRateMenuButton:{playbackRates:[.5,.75,1,1.25,1.5,2]},volumeMenuButton:{inline:!1,vertical:!0},fullscreenToggle:!0}},function(){playerList.push(videoPlayer),$(".full_screen").on("click",function(){getPlayer("online")===void 0||getPlayer("online")===null?getPlayer("online_video").requestFullscreen():getPlayer("online").requestFullscreen()}),playerList[playerList.length-1].on("ended",function(t){t.target.id==="onlineCamera"&&liveObj.cameraBackState(1,!1),t.target.id==="online"&&liveObj.cameraBackState(0,!1)}),playerList[playerList.length-1].on("ratechange",function(t){reviewWhiteSynCamera(t,"ratechange")}),playerList[playerList.length-1].on("error",function(t){console.error("\u76D1\u542C\u5230\u5F02\u5E38\uFF0C\u9519\u8BEF\u4FE1\u606F\uFF1A%o",t),t.target.id==="onlineCamera"&&liveObj.cameraBackState(1,!0),t.target.id==="online"&&liveObj.cameraBackState(0,!0)}),playerList[playerList.length-1].on("play",function(t){reviewWhiteSynCamera(t,"play")}),playerList[playerList.length-1].on("stop",function(t){});var s=0;playerList[playerList.length-1].on("timeupdate",function(t){try{var c=t.target.id;if(c==="online"){var u=getPlayer(c).currentTime();Math.abs(u-s)>1&&reviewWhiteSynCamera(t,"timeupdate"),s=u}}catch(b){}}),playerList[playerList.length-1].on("pause",function(t){reviewWhiteSynCamera(t,"pause")}),playerList[playerList.length-1].on("playing",function(t){$(".vjs-audio-button").length>0&&($(".vjs-audio-button")[0].style.display="none"),t.target.id==="onlineCamera"&&liveObj.cameraBackState(1,!1),t.target.id==="online"&&(liveObj.cameraBackState(0,!1),l||getPlayer("online").on("fullscreenchange",function(c){getPlayer("online").player_.isFullscreen_&&($(".video-js .vjs-play-control.vjs-playing").length>0&&($(".video-js .vjs-play-control.vjs-playing")[0].style.display="none"),$(".video-js .vjs-volume-panel").length>0&&($(".video-js .vjs-volume-panel")[0].style.display="none"),$(".video-js .vjs-progress-control").length>0&&($(".video-js .vjs-progress-control")[0].style.display="none"),$(".video-js .vjs-time-control").length>0&&($(".video-js .vjs-time-control")[3].style.display="none"),$(".video-js .vjs-playback-rate").length>0&&($(".video-js .vjs-playback-rate")[0].style.display="none"),$(".vjs-paused .vjs-ended").hide()),getPlayer("online").controls(getPlayer("online").player_.isFullscreen_)})),needSeek&&$("#seekDiv").length>0&&($("#seekDiv")[0].style.display="none")}),playerList[playerList.length-1].on("waiting",function(t){}),_setVideoUrl(videoPlayer.id_,a),f&&f(),createing=!1,removeCreateListById(n)})}}function reviewWhiteSynCamera(n,e){try{var a=window.location.href;if(a.indexOf("review.html")===-1)return;if(n.target.id==="online"){var i=getPlayer("onlineCamera");if(!i)return;switch(e){case"play":{i.play();break}case"pause":{i.pause();break}case"timeupdate":{i.currentTime(getPlayer("online").currentTime());break}case"ratechange":{var r=getPlayer(n.target.id).playbackRate();i.playbackRate(r);break}default:break}}}catch(l){console.log("\u56DE\u770B\u540C\u6B65\u64CD\u4F5C\u5931\u8D25:",l)}}function changeMedia(){window.localStorage.setItem("isFlashPlayerError",1),location.reload()}function removeCreateListById(n){for(var e=0;e<createList.length;e++)createList[e].id===n&&createList.splice(e,1);createList.length>0&&init(createList[0].id,createList[0].playerType,createList[0].url,createList[0].isLive,createList[0].autoplay,createList[0].showControls,createList[0].thumbUrl,createList[0].callback)}var settingList=[],issettingURL=!1;function _setVideoUrl(n,e){issettingURL=!0;var a=e.split("?"),i=a[0];appU=i.split("/");var r=appU[appU.length-1],l=r.split("."),o="rtmp/flv";switch(l[l.length-1]){case"m3u8":o="application/x-mpegURL";break;case"flv":isLive=!0,o="rtmp/flv";break;case"mp4":o="video/mp4";break}getPlayer(n).src({src:e,type:o})}var volumeNumber=1,flashIsAdd=!1,flashErrorCount=0;function callJS(n,e){if(flashIsAdd=!0,n.search("online")>-1||n.search("interaction")>-1)switch(e){case"NetConnection.Connect.Success":break;case"NetConnection.Connect.Failed":n.search("onlineCamera")>-1?liveObj.cameraBackState(1,!0):n.search("interaction")>-1?getPlayer("online").hasOwnProperty("_type")&&getPlayer("online")._type==="FlvPlayer"?getPlayer("online").muted=!1:getPlayer("online").techCall_("setMuted",!1):(errorCount++,$(".full_screen").length>0&&$(".full_screen").attr("isPlay","0"),$(".setting_btn").length>0&&$(".setting_btn").attr("isPlay","0"),$(".size_btn").length>0&&$(".size_btn").attr("isPlay","0"),$("#sizePanel").length>0&&$(".size_btn").attr("isPlay","0"),$("#noSreamMessage").length>0&&($("#noSreamMessage")[0].style.display=""),liveObj&&errorCount>10&&liveObj.cameraBackState(0,!0),currentSize=1,$("#sizeText").val(Math.round(currentSize*100)),changeOnlieSize(300,300));break;case"NetConnection.Connect.Closed":n.search("onlineCamera")>-1?liveObj.cameraBackState(1,!0):n.search("interaction")>-1?getPlayer("online").techCall_("setMuted",!1):(errorCount++,intervalId==null&&(intervalId=window.setInterval(function(){errorCount>50&&($("#dnsError").show(),window.clearInterval(intervalId),intervalId=0)},1e4)),$(".full_screen").length>0&&$(".full_screen").attr("isPlay","0"),$(".setting_btn").length>0&&$(".setting_btn").attr("isPlay","0"),$(".size_btn").length>0&&$(".size_btn").attr("isPlay","0"),$("#sizePanel").length>0&&$(".size_btn").attr("isPlay","0"),$("#noSreamMessage").length>0&&($("#noSreamMessage")[0].style.display=""),currentSize=1,liveObj&&errorCount>10&&liveObj.cameraBackState(0,!0),$("#sizeText").val(Math.round(currentSize*100)),changeOnlieSize(300,300));break;case"NetConnection.Connect.Rejected":break;case"NetStream.Play.Stop":break;case"NetStream.Play.StreamNotFound":break;case"NetStream.Play.Start":break;case"NetStream.Buffer.Full":n.search("onlineCamera")>-1?liveObj.cameraBackState(1,!1):n.search("interaction")>-1?getPlayer("online")&&(getPlayer("online").hasOwnProperty("_type")&&getPlayer("online")._type==="FlvPlayer"?getPlayer("online").muted=!0:getPlayer("online").techCall_("setMuted",!0)):(errorCount=0,intervalId!=null&&window.clearInterval(intervalId),intervalId=null,$("#dnsError").hide(),$(".full_screen").length>0&&$(".full_screen").attr("isPlay","1"),$(".setting_btn").length>0&&$(".setting_btn").attr("isPlay","1"),$(".size_btn").length>0&&$(".size_btn").attr("isPlay","1"),$("#noSreamMessage").length>0&&($("#noSreamMessage")[0].style.display="none"),liveObj&&liveObj.cameraBackState(0,!1));break;case"NetStream.Buffer.Flush":break;case"NetStream.Video.DimensionChange":break;case"NetStream.Buffer.Empty":n.search("onlineCamera")>-1?liveObj.cameraBackState(1,!0):liveObj.cameraBackState(0,!0),n.search("interaction")>-1&&getPlayer("online").techCall_("setMuted",!1);break}}var currentSize=1,fristWidth=0,fristHeight=0;function changeSize(n,e){n.search("online")<0||n.search("onlineCamera")>-1||n.search("interaction")>-1||n.search("floatCamera")>-1||(currentSize=1,$("#sizeText").val(Math.round(currentSize*100)),fristWidth=e.height,fristHeight=e.width,fristWidth>0&&fristHeight>0&&(liveObj.getPlayerLoade?liveObj.getPlayerLoade(fristWidth,fristHeight):changeOnlieSize(fristWidth,fristHeight,function(){var a=window.location.href;a.indexOf("assistantlive.html")>-1&&$("#whiteboard_box").css({height:$("#studio_play_content").height(),width:$("#studio_play_content").width()})})))}function changeAssVideoSize(n){fristWidth=fristWidth===0?$("#whiteboard_box").width():fristWidth,fristHeight=fristHeight===0?$("#whiteboard_box").height():fristHeight;var e=currentSize;n?(currentSize+=.05,currentSize>2&&(currentSize=2),changeAssOnlieSize(Math.round(fristWidth*currentSize),Math.round(fristHeight*currentSize))):(currentSize-=.05,currentSize<.5&&(currentSize=.5),changeAssOnlieSize(Math.round(fristWidth*currentSize),Math.round(fristHeight*currentSize))),$("#sizeText").val(Math.round(currentSize*100))}function changeAssOnlieSize(n,e,a){var i,r,l,o;i=n,r=e,l=($("#studio_play_content").width()-n)/2<0?0:($("#studio_play_content").width()-n)/2,o=($("#studio_play_content").height()-e)/2<0?0:($("#studio_play_content").height()-e)/2,$(".video-wrap").css("width",i),$(".video-wrap").css("height",r),$(".video-wrap").css("left",l),$(".video-wrap").css("top",o),a&&a()}function changeVideoSize(n){var e=currentSize;n?(currentSize+=.05,currentSize>2&&(currentSize=2),changeOnlieSize(Math.round(fristWidth*currentSize),Math.round(fristHeight*currentSize))):(currentSize-=.05,currentSize<.5&&(currentSize=.5),changeOnlieSize(Math.round(fristWidth*currentSize),Math.round(fristHeight*currentSize))),$("#sizeText").val(Math.round(currentSize*100))}function changeOnlieSize(n,e,a){var i,r,l,o;i=n,r=e,l=($("#live_content").width()-e)/2<0?0:($("#live_content").width()-e)/2,o=($("#live_content").height()-n)/2<0?0:($("#live_content").height()-n)/2,$(".video-wrap").css("height",i),$(".video-wrap").css("width",r),$(".video-wrap").css("left",l),$(".video-wrap").css("top",o),a&&a()}function settingSound(n,e){if(volumeNumber=n,e){var a=$("#setting_video");a.remove(),liveObj.addPlay.settingDialog=null}getPlayer("online")&&getPlayer("online").volume(n),getPlayer("onlineCamera")&&getPlayer("onlineCamera").volume(n)}function checkSettingUrl(){if(issettingURL=!1,settingList.length>0){var n=settingList[0].id,e=settingList[0].url;settingList.splice(0,1),_setVideoUrl(n,e)}}function getVideoType(n){var n=n||"",e=n.split("?"),a=e[0];appU=a.split("/");var i=appU[appU.length-1],r=i.split(".");return r[r.length-1]}function removePlayerById(n){for(var e=0;e<playHistory.length;e++)playHistory[e].id===n&&playHistory.splice(e,1);for(var e=0;e<playerList.length;e++)(playerList[e].id_===n||playerList[e].player_==null)&&(playerList[e].player_!=null&&playerList[e].dispose(),playerList.splice(e,1));for(var e=0;e<flvplayerList.length;e++)flvplayerList[e]._mediaElement.id===n&&(flvplayerList[e].pause(),flvplayerList[e].unload(),flvplayerList[e].detachMediaElement(),flvplayerList[e].destroy(),flvplayerList[e]=null,flvplayerList.splice(e,1))}function getPlayer(n){for(var e=0;e<playerList.length;e++)if(playerList[e].id_===n)return playerList[e];for(var e=0;e<flvplayerList.length;e++)if(flvplayerList[e]._mediaElement.id===n)return flvplayerList[e];return null}function play(){}function pause(){}function volume(){}function videoFullScreen(n){}function sacle(){}function rtmpStop(n){getPlayer(n).pause()}function setSeek(n,e,a){console.log(e),!isSetSeeked&&(needSeek=!0,a?(getPlayer(n).pause(),$("#seekDiv")[0].style.display="",$("#seekLabel").text(SecondToDate(e)),playseek=e,seekId=n):getPlayer(n).currentTime(e))}function goSeek(n){isSetSeeked=!0,$("#seekDiv")[0].style.display="none",getPlayer(seekId).currentTime(playseek),getPlayer(seekId).play()}function clearSeek(n){isSetSeeked=!0,$("#seekDiv")[0].style.display="none",getPlayer(seekId).play()}function SecondToDate(n){var e=n;return e!=null&&e!=""&&(e>60&&e<60*60?e=parseInt(e/60)+"\u5206"+parseInt((parseFloat(e/60)-parseInt(e/60))*60)+"\u79D2":e>=60*60&&e<60*60*24?e=parseInt(e/3600)+"\u5C0F\u65F6"+parseInt((parseFloat(e/3600)-parseInt(e/3600))*60)+"\u5206"+parseInt((parseFloat((parseFloat(e/3600)-parseInt(e/3600))*60)-parseInt((parseFloat(e/3600)-parseInt(e/3600))*60))*60)+"\u79D2":e>=60*60*24?e=parseInt(e/3600/24)+"\u5929"+parseInt((parseFloat(e/3600/24)-parseInt(e/3600/24))*24)+"\u5C0F\u65F6"+parseInt((parseFloat(e/3600)-parseInt(e/3600))*60)+"\u5206"+parseInt((parseFloat((parseFloat(e/3600)-parseInt(e/3600))*60)-parseInt((parseFloat(e/3600)-parseInt(e/3600))*60))*60)+"\u79D2":e=parseInt(e)+"\u79D2"),e}function rotationFun(n,e){getPlayer(n).zoomrotate({rotate:e})}function zoomFun(n,e){getPlayer(n).zoomrotate({zoom:e})}