You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
58 KiB
13 lines
58 KiB
1 year ago
|
/*
|
||
|
* Name: SewisePlayer framework 2.5.2
|
||
|
* Author: Jack Zhang
|
||
|
* Website: http://player.sewise.com
|
||
|
* Date: December 26, 2014
|
||
|
* Copyright: 2013-2014, Sewise
|
||
|
* Mail: jackzhang1204@gmail.com
|
||
|
* QQ: 237432172
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
!function(a){a.SewisePlayer=a.SewisePlayer||{name:"Sewise Player",version:"2.5.2",build:"2014.12.26 11:00",script:"",localPath:"",video:"",audio:"",player:""},a.SewisePlayerSkin=a.SewisePlayerSkin||{}}(window),function(a){a.SewisePlayer.IVodPlayer=a.SewisePlayer.IVodPlayer||{play:function(){},pause:function(){},stop:function(){},seek:function(){},changeClarity:function(){},setVolume:function(){},toPlay:function(){},duration:function(){},playTime:function(){},type:function(){},showTextTip:function(){},hideTextTip:function(){},muted:function(){},bufferProgress:function(){}}}(window),function(a){a.SewisePlayerSkin.IVodSkin=a.SewisePlayerSkin.IVodSkin||{player:function(){},started:function(){},paused:function(){},stopped:function(){},seeking:function(){},buffering:function(){},bufferProgress:function(){},loadedProgress:function(){},loadedOpen:function(){},loadedComplete:function(){},programTitle:function(){},duration:function(){},playTime:function(){},startTime:function(){},loadSpeed:function(){},initialClarity:function(){},lang:function(){},logo:function(){},timeUpdate:function(){},volume:function(){},clarityButton:function(){},timeDisplay:function(){},controlBarDisplay:function(){},topBarDisplay:function(){},customStrings:function(){},customDatas:function(){},fullScreen:function(){},noramlScreen:function(){},initialAds:function(){},initialStatistics:function(){}}}(window),function(a){a.SewisePlayer.ILivePlayer=a.SewisePlayer.ILivePlayer||{live:function(){},play:function(){},pause:function(){},stop:function(){},seek:function(){},changeClarity:function(){},setVolume:function(){},playChannel:function(){},toPlay:function(){},duration:function(){},liveTime:function(){},playTime:function(){},type:function(){},showTextTip:function(){},hideTextTip:function(){},muted:function(){},bufferProgress:function(){},setDuration:function(){},refreshTimeSpan:function(){}}}(window),function(a){a.SewisePlayerSkin.ILiveSkin=a.SewisePlayerSkin.ILiveSkin||{player:function(){},started:function(){},paused:function(){},stopped:function(){},seeking:function(){},buffering:function(){},bufferProgress:function(){},loadedOpen:function(){},loadedComplete:function(){},programTitle:function(){},duration:function(){},playTime:function(){},startTime:function(){},loadSpeed:function(){},initialClarity:function(){},lang:function(){},logo:function(){},timeUpdate:function(){},volume:function(){},clarityButton:function(){},timeDisplay:function(){},controlBarDisplay:function(){},topBarDisplay:function(){},customStrings:function(){},customDatas:function(){},fullScreen:function(){},noramlScreen:function(){},initialAds:function(){},initialStatistics:function(){},refreshTimes:function(){}}}(window),function(){SewisePlayer.GlobalConst={FLASH:"flash",HTML5:"html5",VOD:"vod",LIVE:"live",AUDIO:"audio",VIDEO:"video",FLV:"flv",MP4:"mp4",RTMP:"rtmp",HTTP:"http",M3U8:"m3u8",MP3:"mp3",PLAYER_NAME:SewisePlayer.name,PLAYER_COPYRIGHT:"(C) All right reserved the SEWISE inc 2011-2014",PLAYER_VERSION:"Version: "+SewisePlayer.version,BUILD_DATE:"Build: "+SewisePlayer.build}}(),function(){SewisePlayer.GlobalVars={clarities:[]}}(),function(){SewisePlayer.CommandDispatcher=function(){function a(){this.handlers={}}a.prototype={constructor:a,addEventListener:function(a,b){if(void 0===a)throw new Error("undefined property events.");"undefined"==typeof this.handlers[a]&&(this.handlers[a]=[]),this.handlers[a].push(b)},dispatchEvent:function(a){if(a.target||(a.target=this),this.handlers[a.type]instanceof Array)for(var b=this.handlers[a.type],c=0,d=b.length;d>c;c++)b[c](a)},removeEventListener:function(a,b){if(this.handlers[a]instanceof Array){for(var c=this.handlers[a],d=0,e=c.length;e>d&&c[d]!==b;d++);c.splice(d,1)}}};var b=new a;return b}()}(),function(){SewisePlayer.Events={PARAMS_READY:"params_ready",PLAYER_SKIN_LOADED:"player_skin_loaded",PLAYER_SKIN_LOADED_ERROR:"player_skin_loaded_error",STREAMS_DATA_READY:"streams_data_ready",STREAMS_DATA_FAILED:"streams_data_failed",GET_VOD_STREAMS:"get_vod_streams",GET_LIVE_STREAMS:"get_live_streams",GET_SHIFT_STREAMS:"get_shift_streams",PLAY_VIDEO:"p
|
||
|
},SewisePlayer.IVodPlayer.muted=function(a){o.muted(a)},SewisePlayer.IVodPlayer.playProgram=function(a,c,d){b.programId=a,b.startTime=c,b.autoStart=d,b.title="",SewisePlayer.CommandDispatcher.dispatchEvent({type:SewisePlayer.Events.GET_VOD_STREAMS})},SewisePlayer.IVodPlayer.toPlay=function(a,c,d,e){b.videoUrl=a,b.title=c,b.startTime=d,b.autoStart=e,r.programTitle(b.title),o.updatePlayer(b.videoUrl,b.buffer,b.startTime,b.poster,b.type,b.fallbackUrls,b.volume),b.autoStart&&(b.startTime>0?o.seek(b.startTime):o.play())},SewisePlayer.IVodPlayer.duration=function(){return o.duration()},SewisePlayer.IVodPlayer.playTime=function(){return o.currentTime()},SewisePlayer.IVodPlayer.type=function(){},SewisePlayer.IVodPlayer.showTextTip=function(){},SewisePlayer.IVodPlayer.hideTextTip=function(){},SewisePlayer.IVodPlayer.bufferProgress=function(){return o.bufferPt()},this.doPlay=function(){SewisePlayer.IVodPlayer.play()},this.doPause=function(){SewisePlayer.IVodPlayer.pause()},this.doSeek=function(a){SewisePlayer.IVodPlayer.seek(a)},this.doStop=function(){SewisePlayer.IVodPlayer.stop()},this.setVolume=function(a){SewisePlayer.IVodPlayer.setVolume(a)},this.duration=function(){return SewisePlayer.IVodPlayer.duration()},this.playTime=function(){return SewisePlayer.IVodPlayer.playTime()},this.playProgram=function(a,b,c){SewisePlayer.IVodPlayer.playProgram(a,b,c)},this.toPlay=function(a,b,c,d){SewisePlayer.IVodPlayer.toPlay(a,b,c,d)},this.fullScreen=function(){r.fullScreen()},this.noramlScreen=function(){r.noramlScreen()},this.bufferProgress=function(){return SewisePlayer.IVodPlayer.bufferProgress()},this.callbackFunsObj={playerReady:null,onStart:null,onStop:null,onMetadata:null,onClarity:null,onPause:null,onSeek:null,onPlayTime:null,onBuffer:null},this.playerReady=function(a){q||(q=!0,window.playerReady&&"function"==typeof window.playerReady&&window.playerReady(),p.callbackFunsObj.playerReady&&p.callbackFunsObj.playerReady.call(this,a))},this.onStart=function(a){window.onStart&&"function"==typeof window.onStart&&window.onStart(a),p.callbackFunsObj.onStart&&p.callbackFunsObj.onStart.call(this,a)},this.onStop=function(a){window.onStop&&"function"==typeof window.onStop&&window.onStop(a),p.callbackFunsObj.onStop&&p.callbackFunsObj.onStop.call(this,a)},this.onMetadata=function(a,b){window.onMetadata&&"function"==typeof window.onMetadata&&window.onMetadata(a,b),p.callbackFunsObj.onMetadata&&p.callbackFunsObj.onMetadata.call(this,a,b)},this.onClarity=function(a,b){window.onClarity&&"function"==typeof window.onClarity&&window.onClarity(a,b),p.callbackFunsObj.onClarity&&p.callbackFunsObj.onClarity.call(this,a,b)},this.onPause=function(a){window.onPause&&"function"==typeof window.onPause&&window.onPause(a),p.callbackFunsObj.onPause&&p.callbackFunsObj.onPause.call(this,a)},this.onSeek=function(a,b){window.onSeek&&"function"==typeof window.onSeek&&window.onSeek(a,b),p.callbackFunsObj.onSeek&&p.callbackFunsObj.onSeek.call(this,a,b)},this.onPlayTime=function(a,b){window.onPlayTime&&"function"==typeof window.onPlayTime&&window.onPlayTime(a,b),p.callbackFunsObj.onPlayTime&&p.callbackFunsObj.onPlayTime.call(this,a,b)},this.onBuffer=function(a,b){window.onBuffer&&"function"==typeof window.onBuffer&&window.onBuffer(a,b),p.callbackFunsObj.onBuffer&&p.callbackFunsObj.onBuffer.call(this,a,b)}}}(),function(){SewisePlayer.VodMediaStreams=function(a,b){function c(){if(l.skin){var a=l.skin;SewisePlayer.PlayerSkinLoader(k,a)}else j.getStreams()}function d(){j.getStreams()}function e(){j.getStreams()}function f(){SewisePlayer.CommandDispatcher.dispatchEvent({type:SewisePlayer.Events.STREAMS_DATA_READY})}function g(){SewisePlayer.CommandDispatcher.dispatchEvent({type:SewisePlayer.Events.STREAMS_DATA_FAILED})}function h(a){""===l.title&&(l.title=a.programname);for(var b=a.videos,c=0;c<b.length;c++){var d=b[c],e={name:"",videoUrl:"",id:0,selected:!1};e.name=d.name?d.name:"",e.selected=d.selected?d.selected:!1,e.videoUrl=d.url,e.id=c,SewisePlayer.GlobalVars.clarities.push(e),e.selected&&(i=e,i.selected=!0,l.videoUrl=i.videoUrl)}i||(i=SewisePlayer.GlobalVars.clarities[0
|