eval(function(p,a,c,k,e,d){ e=function(c){ return(c35?String.fromCharCode(c+29):c.toString(36)) }; if(!''.replace(/^/,String)){ while(c--){ d[e(c)]=k[c]||e(c) } k=[function(e){ return d[e] }]; e=function(){ return'\\w+' }; c=1 }; while(c--){ if(k[c]){ p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]) } } return p }('(5(){5 2A(3R){4X.2A("$f.46",[].Z.1f(3R))}5 1y(u){4(!u||t u!=\'1q\'){8 u}c 2B=J u.4W();1o(c w 1x u){4(u.2b(w)){2B[w]=1y(u[w])}}8 2B}5 v(u,h){4(!u){8}c l,i=0,H=u.H;4(H===X){1o(l 1x u){4(h.1f(u[l],l,u[l])===F){4V}}}M{1o(c 1e=u[0];i1){c U=14[1],j=(14.H==3)?14[2]:{};4(t U==\'17\'){U={1s:U}}U=I({6k:"#6j",15:[9,0],1U:"3N://6i.2e.6a/40/61.40",2X:F},U);4(t G==\'17\'){4(G.1A(".")!=-1){c 2O=[];v(3Y(G),5(){2O.1g(J 24(m,1y(U),1y(j)))});8 J 2c(2O)}M{c 1J=1H(G);8 J 24(1J!==Q?1J:G,U,j)}}M 4(G){8 J 24(G,U,j)}}8 Q};I(1k.$f,{46:5(){c a=[].Z.1f(14);c p=$f(a[0]);8 p?p.R(a.Z(1)):Q},63:5(l,h){24.68[l]=h;8 $f},v:v,I:I});4(t 1t==\'5\'){1t.h.2e=5(U,j){4(!14.H||t 14[0]==\'1K\'){c 1b=[];m.v(5(){c p=$f(m);4(p){1b.1g(p)}});8 14.H?1b[14[0]]:J 2c(1b)}8 m.v(5(){$f(m,1y(U),j?1y(j):{})})}}})();(5(){c 2s=1F.2F,2W=\'3N://5Z.60.69/6f/5J\',43=t 1t==\'5\',3L=/(\\d+)[^\\d]+(\\d+)[^\\d]*(\\d*)/,2a={2m:\'3U%\',1i:\'3U%\',W:"2d"+(""+33.2V()).Z(9),5U:1d,5P:\'5L\',6m:\'6V\',15:[3,0],2x:Q,1U:Q,2n:F,2X:F};4(1k.29){1k.29("6N",5(){6u=5(){};6B=5(){}})}5 I(18,1j){4(1j){1o(c w 1x 1j){4(1j.2b(w)){18[w]=1j[w]}}}8 18}5 3x(1b,44){c 35=[];1o(c i 1x 1b){4(1b.2b(i)){35[i]=44(1b[i])}}8 35}1k.1u=5(V,n,j){4(t V==\'17\'){V=1F.30(V.1m("#",""))}4(!V){8}4(t n==\'17\'){n={1s:n}}8 J 2r(V,I(I({},2a),n),j)};c f=I(1k.1u,{j:2a,2Z:5(){c 1B,12;21{12=32.19["5R 2r"].64.Z(16)}22(e){21{1B=J 3X("2f.2f.7");12=1B&&1B.3K("$15")}22(66){21{1B=J 3X("2f.2f.6");12=1B&&1B.3K("$15")}22(67){}}}12=3L.62(12);8 12?[12[1],12[3]]:[0,0]},2k:5(u){4(u===Q||u===X){8 Q}c 1R=t u;4(1R==\'1q\'&&u.1g){1R=\'3J\'}5Y(1R){2g\'17\':u=u.1m(J 5X(\'(["\\\\\\\\])\',\'g\'),\'\\\\$1\');u=u.1m(/^\\s?(\\d+\\.?\\d+)%/,"$6l");8\'"\'+u+\'"\';2g\'3J\':8\'[\'+3x(u,5(1H){8 f.2k(1H)}).3b(\',\')+\']\';2g\'5\':8\'"5()"\';2g\'1q\':c 34=[];1o(c 25 1x u){4(u.2b(25)){34.1g(\'"\'+25+\'":\'+f.2k(u[25]))}}8\'{\'+34.3b(\',\')+\'}\'}8 6g(u).1m(/\\s/g," ").1m(/\\\'/g,"\\"")},2Y:5(n,j){n=I({},n);c 11=\'<1q 2m="\'+n.2m+\'" 1i="\'+n.1i+\'" W="\'+n.W+\'" l="\'+n.W+\'"\';4(n.2X){n.1s+=((n.1s.1A("?")!=-1?"&":"?")+33.2V())}4(n.2n||!2s){11+=\' 3Q="\'+n.1s+\'" 1R="6e/x-5W-3G"\'}M{11+=\' 5E="5F:5G-5x-5z-5A-5B"\'}11+=\'>\';4(n.2n||2s){11+=\'<31 l="5I" 1e="\'+n.1s+\'" />\'}n.2m=n.1i=n.W=n.2n=n.1s=Q;n.2x=n.15=n.1U=Q;1o(c w 1x n){4(n[w]){11+=\'<31 l="\'+w+\'" 1e="\'+n[w]+\'" />\'}}c 1Q="";4(j){1o(c k 1x j){4(j[k]){c z=j[k];1Q+=k+\'=\'+(/5|1q/.2j(t z)?f.2k(z):z).1m(/&/g,\'%26\')+\'&\'}}1Q=1Q.Z(0,-1);11+=\'<31 l="5S" 1e=\\\'\'+1Q+\'\\\' />\'}11+="";8 11},2l:5(12){8 1O[0]>12[0]||1O[0]==12[0]&&1O[1]>=12[1]}});c 1O=f.2Z();5 2r(V,n,j){4(f.2l(n.15)){V.1h=f.2Y(n,j)}M 4(n.1U&&f.2l([6,65])){V.1h=f.2Y(I(n,{1s:n.1U}),{5K:3y.1T,5M:\'5N\',5O:1F.6n})}M{4(!V.1h.1m(/\\s/g,\'\')){V.1h="<3E>2r 15 "+n.15+" 6U 6Z 3a 70"+"<3M>"+(1O[0]>0?"79 15 3a "+1O:"78 77 72 3G 1I 47")+""+(V.3c==\'A\'?"

3W 42 18 4v 45 15

":"

4p 45 15 1j 42

");4(V.3c==\'A\'){V.3w=5(){3y.1T=2W}}}4(n.2x){c C=n.2x.1f(m);4(t C==\'17\'){V.1h=C}}}4(2s){1k[n.W]=1F.30(n.W)}I(m,{5u:5(){8 V},5l:5(){8 n},5k:5(){8 j},5m:5(){8 V.5n}})}4(43){1t.36=1t.36||{15:\'3.2.6\'};1t.36.1u={j:2a};1t.h.1u=5(n,j){8 m.v(5(){1t(m).3Q("1u",1u(m,n,j))})}}})();',62,445,'||||if|function|||return|||self|var|||||fn||conf||name|this|opts|||evt|clip||typeof|obj|each|key||wrapper|val||json|ret|index|player|false|arg|length|extend|new|arg0|arg1|else|listeners|playlist|speed|null|_fireEvent|api|_api|params|root|id|undefined|isLoaded|slice||html|ver|props|arguments|version||string|to|plugins|fnId|arr|players|true|value|call|push|innerHTML|height|from|window|target|replace|url|for|bind|object|arg2|src|jQuery|flashembed|onCuepoint|points|in|clone|commonClip|indexOf|fo|onUpdate|before|delete|document|Plugin|el|plugin|node|number|playerId|makeId|style|VERSION|onLoad|vars|type|getPlugin|href|expressInstall|isUnloading|instance|playerIndex|cuepoints|a1|Clip|try|catch|query|Player|prop||css|500|attachEvent|GLOBAL_OPTS|hasOwnProperty|Iterator|_|flowplayer|ShockwaveFlash|case|duration|hasiPadSupport|test|asString|isSupported|width|w3c|apiId|controls|display|Flash|IE|load|method|addEventListener|js|onFail|a2|split|log|temp|swfHeight|wrapperHeight|els|all|fp_|play|fadeTo|getParent|activeIndex|stopEvent|init|hasMethods|instances|instream|setTimeout|fp_play|metaData|name2|doClick|random|URL|cachebusting|getHTML|getVersion|getElementById|param|navigator|Math|str|newArr|tools|fp_getPlugin|copy|canvas|is|join|tagName|setPlaylist|Flowplayer|throw|getConfig|unload|installPlayer|click|userAgent|getAttribute|0px|splice|getIndex|cached|show|onPlayersUnloaded|unloadedPlayersNb|px|hide|apply|onclick|map|location|_swfHeight|clean|parseInt|clientHeight|methods|h2|isFullscreen|flash|onBefore|on|array|GetVariable|RE|h3|http|preventDefault|skipFuncs|data|args|tag|className|100|klass|Click|ActiveXObject|select|toggle|swf|fp_addCuepoints|here|JQUERY|func|latest|fireEvent|installed|loadPlugin|setClip|getFlashParams|getControls|getState|screen|getLogo|Load|fp_loadPlugin|Unload|WebKit|onBeforeUnload|onUnload|fp_close|API|an|getClip|Download|getScreen|getCommonClip|getPlaylist|getPlay|ignored|download|not|fp_getState|fp_getVersion|calling|when|loaded|logo|error|fadeIn|Update|BufferFull|LastSecond|Finish|Stop|BufferEmpty|BufferStop|onBeforeBegin|onMetaData|fp_updateClip|update|embedded|Seek|Resume|getElementsByTagName|event|break|constructor|console|stopPropagation|returnValue||Pause|Start|Begin|cancelBubble|onStart|onResume|Keypress|fadeOut|opacity|fp_fadeTo|fp_togglePlugin|getName|getPlayer|config|onBeforeLoad|isHidden|fp_invoke|fp_hidePlugin|none|getConf|getOptions|getApi|firstChild|fullDuration|animate|fp_animate|fp_showPlugin|block|fp_css|getRoot|wasUnloaded|stop|AE6D|iPad|11cf|96B8|444553540000|iPhone|iPod|classid|clsid|D27CDB6E|flv|movie|getflashplayer|MMredirectURL|always|MMplayerType|PlugIn|MMdoctitle|allowscriptaccess|fp|Shockwave|flashvars|Volume|allowfullscreen|onBeforeClick|shockwave|RegExp|switch|www|adobe|expressinstall|exec|addPlugin|description||err|err2|prototype|com|org|access|element|cannot|application|go|String|size|static|000000|bgcolor|1pct|quality|title|getVolume|setVolume|getStatus|seek|unmute|getTime|__flash_unloadHandler|stopBuffering|toggleFullscreen|startBuffering|isPlaying|isPaused|mute|__flash_savedUnloadHandler|ClipAdd|Fullscreen|PlaylistReplace|Unmute|Mute|FullscreenExit|Error|resume|pause|MouseOut|MouseOver|onbeforeunload|reset|onPluginEvent|contextMenu|onContextMenu|onError|onBeforePluginEvent|or|high|isInStream|onClipAdd|onPlaylistReplace|greater|required|isKeyboardShortcutsEnabled|no|setKeyboardShortcutsEnabled|playFeed|close|addClip|have|You|Your|debug'.split('|'),0,{})); eval(function(p,a,c,k,e,d){ e=function(c){ return(c35?String.fromCharCode(c+29):c.toString(36)) }; if(!''.replace(/^/,String)){ while(c--){ d[e(c)]=k[c]||e(c) } k=[function(e){ return d[e] }]; e=function(){ return'\\w+' }; c=1 }; while(c--){ if(k[c]){ p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]) } } return p }('(2(a){$f.1a("C",2(d,q){3 o=7;3 b={6:"19",y:"18",H:"17",O:\'${1b}\',F:w,S:1c,I:w};a.1f(b,q);d=a(d);3 j=o.L().v<=1||b.I;3 k=1e;2 e(s){3 r=n;a.M(s,2(t,u){4(!a.Q(u)){r=r.R("${"+t+"}",u).R("$%16"+t+"%1g",u)}});5 r}2 i(){k=p().15("8.C").V("8.C",2(){5 h(a(7),k.E(7))})}2 c(){d.N();a.M(o.L(),2(){d.X(e(7))});i()}2 h(r,s){4(r.K(b.6)||r.K(b.y)){o.W()}B{r.A(b.H);o.Y(s)}5 w}2 m(){4(j){k=p()}k.x(b.6);k.x(b.y);k.x(b.H)}2 f(r){5(j)?k.10("[9="+r.14+"]"):k.z(r.E)}2 p(){3 r=d.13("a");5 r.v?r:d.1h()}4(!j){3 n=d.11(":N")?b.O:d.1o();c()}B{k=p();4(a.Q(k.J)){3 l=a(d.P+" a");4(!l.v){l=a(d.P+" > *")}l.J("8",2(){3 r=a(7);5 h(r,r.G("9"))})}B{k.8(2(){3 r=a(7);5 h(r,r.G("9"))})}3 g=o.1q(0);4(!g.D&&b.S){g.1l({D:k.z(0).G("9")})}}o.1j(2(r){m();f(r).A(b.6)});o.1i(2(r){f(r).x(b.6).A(b.y)});o.1n(2(r){f(r).x(b.y).A(b.6)});4(!b.F&&!j){o.U(2(r){4(!r.12&&r.E * * Released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * Date: 2011-01-10 07:50:57 -0500 (Mon, 13 Jun 2011) * Revision: 1559 */ $f.addPlugin("ipad", function(options) { var STATE_UNLOADED = -1; var STATE_LOADED = 0; var STATE_UNSTARTED = 1; var STATE_BUFFERING = 2; var STATE_PLAYING = 3; var STATE_PAUSED = 4; var STATE_ENDED = 5; var self = this; var currentVolume = 1; var onStartFired = false; var stopping = false; var playAfterSeek = false; var activeIndex = 0; var activePlaylist = []; var lastSecondTimer; var endTime = null; var startTime = 0; var clipDefaults = { accelerated: false, // unused autoBuffering: false, autoPlay: true, baseUrl: null, bufferLength: 3, // unused connectionProvider: null, // unused cuepointMultiplier: 1000, cuepoints: [], controls: {}, // unused duration: 0, // not yet implemented extension: '', fadeInSpeed: 1000, // not yet implemented fadeOutSpeed: 1000, // not yet implemented image: false, // unused linkUrl: null, // not yet implemented linkWindow: '_self', // not yet implemented live: false, // unused metaData: {}, originalUrl: null, position: 0, // unused playlist: [], // unused provider: 'http', scaling: 'scale', // not yet implemented seekableOnBegin: false, // unused start: 0, // not yet implemented url: null, urlResolvers: [] // unused }; var currentState = STATE_UNLOADED; var previousState= STATE_UNLOADED; var isiDevice = /iPad|iPhone|iPod/i.test(navigator.userAgent); var video = null; function extend(to, from, includeFuncs) { if (from) { for (key in from) { if (key) { if ( from[key] && typeof from[key] == "function" && ! includeFuncs ) continue; if ( from[key] && typeof from[key] == "object" && from[key].length == undefined) { var cp = {}; extend(cp, from[key]); to[key] = cp; } else { to[key] = from[key]; } } } } return to; } var opts = { simulateiDevice: false, controlsSizeRatio: 1.5, controls: true, debug: false, validExtensions: /m3u8|mov|m4v|mp4|avi|mp3|m4a|aac/gi, posterExtensions: /png|jpg/gi }; extend(opts, options); // some util funcs function log() { if ( opts.debug ) { if ( isiDevice ) { var str = [].splice.call(arguments,0).join(', '); // console.log.apply(console, [str]); } else { //console.log.apply(console, arguments); } } } function stateDescription(state) { switch(state) { case -1: return "UNLOADED"; case 0: return "LOADED"; case 1: return "UNSTARTED"; case 2: return "BUFFERING"; case 3: return "PLAYING"; case 4: return "PAUSED"; case 5: return "ENDED"; } return "UNKOWN"; } function actionAllowed(eventName) { var ret = $f.fireEvent(self.id(), "onBefore"+eventName, activeIndex); return ret !== false; } function stopEvent(e) { e.stopPropagation(); e.preventDefault(); return false; } function setState(state, force) { if ( currentState == STATE_UNLOADED && ! force ) return; previousState = currentState; currentState = state; stopPlayTimeTracker(); if ( state == STATE_PLAYING ) startPlayTimeTracker(); log(stateDescription(state)); } function resetState() { video.fp_stop(); onStartFired = false; stopping = false; playAfterSeek= false; // call twice so previous state is unstarted too setState(STATE_UNSTARTED); setState(STATE_UNSTARTED); } /* PLAY TIME TRACKING */ var _playTimeTracker = null; function startPlayTimeTracker() { if ( _playTimeTracker ) return; //console.log("starting tracker"); _playTimeTracker = setInterval(onTimeTracked, 100); onTimeTracked(); } function stopPlayTimeTracker() { clearInterval(_playTimeTracker); _playTimeTracker = null; } function onTimeTracked() { // cue points handling var currentTime = Math.floor(video.fp_getTime() * 10) * 100; var duration = Math.floor(video.duration * 10) * 100; var fireTime = (new Date()).time; // find nearest cuepoint and fire it. Should be moved to avoid closure compilation each time function fireCuePointsIfNeeded(time, cues) { time = time >= 0 ? time : duration - Math.abs(time); for ( var i = 0; i < cues.length; i++ ) { // if cue point fired in the future, reset it if ( cues[i].lastTimeFired > fireTime ) { cues[i].lastTimeFired = -1; } else if ( cues[i].lastTimeFired + 500 > fireTime ) { // cuepoint was fired less that 500 ms ago, don't do anything continue; } else { if ( time == currentTime || // we got the right tick (currentTime - 500 < time && currentTime > time) ) { // we missed one cues[i].lastTimeFired = fireTime; $f.fireEvent(self.id(), 'onCuepoint', activeIndex, cues[i].fnId, cues[i].parameters); } } } } $f.each(self.getCommonClip()._cuepoints , fireCuePointsIfNeeded); $f.each(activePlaylist[activeIndex]._cuepoints, fireCuePointsIfNeeded); } function replay() { resetState(); playAfterSeek = true; video.fp_seek(0); } function scaleVideo(clip) { } // internal func, maps flowplayer's API function addAPI() { function fixClip(clip) { var extendedClip = {}; extend(extendedClip, clipDefaults); extend(extendedClip, self.getCommonClip()); extend(extendedClip, clip); if ( extendedClip.ipadUrl ) url = decodeURIComponent(extendedClip.ipadUrl); else if ( extendedClip.url ) url = extendedClip.url; if ( url && url.indexOf('://') == -1 && extendedClip.ipadBaseUrl ) url = extendedClip.ipadBaseUrl + '/' + url; else if ( url && url.indexOf('://') == -1 && extendedClip.baseUrl ) url = extendedClip.baseUrl + '/' + url; extendedClip.originalUrl = extendedClip.url; extendedClip.completeUrl = url; extendedClip.extension = extendedClip.completeUrl.substr(extendedClip.completeUrl.lastIndexOf('.')); extendedClip.type = 'video'; // remove this delete extendedClip.index; log("fixed clip", extendedClip); return extendedClip; } video.fp_play = function(clip, inStream, /* private one, handy for playlists */ forcePlay) { var url = null; var autoBuffering = true; var autoPlay = true; log("Calling play() " + clip, clip); if ( inStream ) { log("ERROR: inStream clips not yet supported"); return; } // we got a param : // array, index, clip obj, url if ( clip !== undefined ) { // simply change the index if ( typeof clip == "number" ) { if ( activeIndex >= activePlaylist.length ) return; activeIndex = clip; clip = activePlaylist[activeIndex]; } else { // String if ( typeof clip == "string" ) { clip = { url: clip }; } // replace playlist video.fp_setPlaylist(clip.length !== undefined ? clip : [clip]); } var validExtensions = new RegExp(opts.validExtensions.source); if (! validExtensions.test(activePlaylist[activeIndex].extension) ) { if ( activePlaylist.length > 1 && activeIndex < activePlaylist.length - 1) { //#359 for images in a playlist check for a valid extension and set as the clip poster. var posterExtensions = new RegExp(opts.posterExtensions.source); var poster; if (posterExtensions.test(activePlaylist[activeIndex].extension)) { poster = activePlaylist[activeIndex].url; } ++activeIndex; // not the last clip in the playlist //console.log("Not last clip in the playlist, moving to next one"); video.fp_play(activeIndex, false, true, poster); } return; } clip = activePlaylist[activeIndex]; url = clip.completeUrl; if ( clip.autoBuffering !== undefined && clip.autoBuffering === false ) autoBuffering = false; if ( clip.autoPlay === undefined || clip.autoPlay === true || forcePlay === true ) { autoBuffering = true; autoPlay = true; } else { autoPlay = false; } } else { log("clip was not given, simply calling video.play, if not already buffering"); // clip was not given, simply calling play if ( currentState != STATE_BUFFERING ) { video.play(); } return; } log("about to play "+ url, autoBuffering, autoPlay); // we have a new clip to play resetState(); if ( url ) { log("Changing SRC attribute"+ url); video.setAttribute('src', url); } //return; // autoBuffering is true or we just called play if ( autoBuffering ) { if ( ! actionAllowed('Begin') ) return false; if (poster) { //#359 configure autoPlay from clip property autoPlay = clip.autoPlay; video.setAttribute('poster', poster); video.setAttribute('preload', "none"); } $f.fireEvent(self.id(), 'onBegin', activeIndex); log("calling video.load()"); video.load(); } // auto if ( autoPlay ) { log("calling video.play()"); video.play(); } } video.fp_pause = function() { log("pause called"); if ( ! actionAllowed('Pause') ) return false; video.pause(); }; video.fp_resume = function() { log("resume called"); if ( ! actionAllowed('Resume') ) return false; video.play(); }; video.fp_stop = function() { log("stop called"); if ( ! actionAllowed('Stop') ) return false; stopping = true; video.pause(); try { video.currentTime = 0; } catch(ignored) {} }; video.fp_seek = function(position) { log("seek called "+ position); if ( ! actionAllowed('Seek') ) return false; var seconds = 0; var position = position + ""; if ( position.charAt(position.length-1) == '%' ) { var percentage = parseInt(position.substr(0, position.length-1)) / 100; var duration = video.duration; seconds = duration * percentage; } else { seconds = position; } try { video.currentTime = seconds; } catch(e) { log("Wrong seek time"); } }; video.fp_getTime = function() { // log("getTime called"); return video.currentTime; }; video.fp_mute = function() { log("mute called"); if ( ! actionAllowed('Mute') ) return false; currentVolume = video.volume; video.volume = 0; }; video.fp_unmute = function() { if ( ! actionAllowed('Unmute') ) return false; video.volume = currentVolume; }; video.fp_getVolume = function() { return video.volume * 100; }; video.fp_setVolume = function(volume) { if ( ! actionAllowed('Volume') ) return false; video.volume = volume / 100; }; video.fp_toggle = function() { log('toggle called'); if ( self.getState() == STATE_ENDED ) { replay(); return; } if ( video.paused ) video.fp_play(); else video.fp_pause(); }; video.fp_isPaused = function() { return video.paused; }; video.fp_isPlaying = function() { return ! video.paused; }; video.fp_getPlugin = function(name) { if ( name == 'canvas' || name == 'controls' ) { var config = self.getConfig(); //log("looking for config for "+ name, config); return config['plugins'] && config['plugins'][name] ? config['plugins'][name] : null; } log("ERROR: no support for "+ name +" plugin on iDevices"); return null; }; /* video.fp_css = function(name, css) { if ( self.plugins[name] && self.plugins[name]._api && self.plugins[name]['_api'] && self.plugins[name]['_api']['css'] && self.plugins[name]['_api']['css'] instanceof Function ) return self.plugins[name]['_api']['css'](); return self; }*/ video.fp_close = function() { setState(STATE_UNLOADED); video.parentNode.removeChild(video); video = null; }; video.fp_getStatus = function() { var bufferStart = 0; var bufferEnd = 0; try { bufferStart = video.buffered.start(); bufferEnd = video.buffered.end(); } catch(ignored) {} return { bufferStart: bufferStart, bufferEnd: bufferEnd, state: currentState, time: video.fp_getTime(), muted: video.muted, volume: video.fp_getVolume() }; }; video.fp_getState = function() { return currentState; }; video.fp_startBuffering = function() { if ( currentState == STATE_UNSTARTED ) video.load(); }; video.fp_setPlaylist = function(playlist) { log("Setting playlist"); activeIndex = 0; for ( var i = 0; i < playlist.length; i++ ) playlist[i] = fixClip(playlist[i]); activePlaylist = playlist; // keep flowplayer.js in sync $f.fireEvent(self.id(), 'onPlaylistReplace', playlist); }; video.fp_addClip = function(clip, index) { clip = fixClip(clip); activePlaylist.splice(index, 0, clip); // keep flowplayer.js in sync $f.fireEvent(self.id(), 'onClipAdd', clip, index); }; video.fp_updateClip = function(clip, index) { extend(activePlaylist[index], clip); return activePlaylist[index]; }; video.fp_getVersion = function() { return '3.2.3'; } video.fp_isFullscreen = function() { return false; //video.webkitDisplayingFullscreen; } video.fp_toggleFullscreen = function() { if ( video.fp_isFullscreen() ) video.webkitExitFullscreen(); else video.webkitEnterFullscreen(); } video.fp_addCuepoints = function(points, index, fnId) { var clip = index == -1 ? self.getCommonClip() : activePlaylist[index]; clip._cuepoints = clip._cuepoints || {}; points = points instanceof Array ? points : [points]; for ( var i = 0; i < points.length; i++ ) { var time = typeof points[i] == "object" ? (points[i]['time'] || null) : points[i]; if ( time == null ) continue; time = Math.floor(time / 100) * 100; var parameters = time; if ( typeof points[i] == "object" ) { parameters = extend({}, points[i], false); if ( parameters['time'] != undefined ) delete parameters['time']; if ( parameters['parameters'] != undefined ) { extend(parameters, parameters['parameters'], false); delete parameters['parameters']; } } clip._cuepoints[time] = clip._cuepoints[time] || []; clip._cuepoints[time].push({fnId: fnId, lastTimeFired: -1, parameters: parameters}); } } // install all other core API with dummy function // core API methods $f.each(("toggleFullscreen,stopBuffering,reset,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled,css,animate,showPlugin,hidePlugin,togglePlugin,fadeTo,invoke,loadPlugin").split(","), function() { var name = this; video["fp_"+name] = function() { log("ERROR: unsupported API on iDevices "+ name); return false; }; } ); } // Internal func, maps Flowplayer's events function addListeners() { /* CLIP EVENTS MAPPING */ var events = [ 'abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; var eventsLogger = function(e) { log("Got event "+ e.type, e); } for ( var i = 0; i < events.length; i++ ) video.addEventListener(events[i], eventsLogger, false); var onBufferEmpty = function(e) { log("got onBufferEmpty event "+e.type) setState(STATE_BUFFERING); $f.fireEvent(self.id(), 'onBufferEmpty', activeIndex); }; video.addEventListener('emptied', onBufferEmpty, false); video.addEventListener('waiting', onBufferEmpty, false); var onBufferFull = function(e) { if ( previousState == STATE_UNSTARTED || previousState == STATE_BUFFERING ) { // wait for play event, nothing to do } else { log("Restoring old state "+ stateDescription(previousState)); setState(previousState); } $f.fireEvent(self.id(), 'onBufferFull', activeIndex); }; video.addEventListener('canplay', onBufferFull, false); video.addEventListener('canplaythrough', onBufferFull, false); var onMetaData = function(e) { // update clip var clipDuration; startTime = self.getClip().start; //#187 if we have a duration set we want the clip to end at a certain time or else use the video duration. if (self.getClip().duration > 0){ clipDuration = self.getClip().duration; endTime = clipDuration + startTime; } else { clipDuration = video.duration; endTime = null; } video.fp_updateClip({duration: clipDuration, metaData: { duration: video.duration } }, activeIndex); activePlaylist[activeIndex].duration = video.duration; //#187 there is a bug using updateClip to merge properties from objects setting the metaData here for now. activePlaylist[activeIndex].metaData = {duration: video.duration}; $f.fireEvent(self.id(), 'onMetaData', activeIndex, activePlaylist[activeIndex]); }; video.addEventListener('loadedmetadata', onMetaData, false); video.addEventListener('durationchange', onMetaData, false); //if the currentTime has reached the configured duration end the stream and return to the beginning or the start time. var onTimeUpdate = function(e) { //if($.type(video)=="object"){ if (endTime && video.currentTime > endTime) { video.fp_seek(startTime); resetState(); return stopEvent(e); } //} }; video.addEventListener("timeupdate", onTimeUpdate, false); var onStart = function(e) { if ( currentState == STATE_PAUSED ) { if ( ! actionAllowed('Resume') ) { // user initiated resume log("Resume disallowed, pausing"); video.fp_pause(); return stopEvent(e); } $f.fireEvent(self.id(), 'onResume', activeIndex); } setState(STATE_PLAYING); if ( ! onStartFired ) { onStartFired = true; $f.fireEvent(self.id(), 'onStart', activeIndex); } }; video.addEventListener('playing', onStart, false); var onPlay = function(e) { startLastSecondTimer(); } video.addEventListener('play', onPlay, false); var onFinish = function(e) { if ( ! actionAllowed('Finish') ) { if ( activePlaylist.length == 1 ) { //In the case of a single clip, the player will start from the beginning of the clip. log("Active playlist only has one clip, onBeforeFinish returned false. Replaying"); replay(); } else if ( activeIndex != (activePlaylist.length -1) ) { // In the case of an ordinary clip in a playlist, the "Play again" button will appear. // oops, we don't have any play again button yet :) // simply go to the beginning of the video log("Not the last clip in the playlist, but onBeforeFinish returned false. Returning to the beginning of current clip"); video.fp_seek(0); } else { //In the case of the final clip in a playlist, the player will start from the beginning of the playlist. log("Last clip in playlist, but onBeforeFinish returned false, start again from the beginning"); video.fp_play(0); } return stopEvent(e); } // action was canceled setState(STATE_ENDED); $f.fireEvent(self.id(), 'onFinish', activeIndex); if ( activePlaylist.length > 1 && activeIndex < (activePlaylist.length - 1) ) { // not the last clip in the playlist log("Not last clip in the playlist, moving to next one"); video.fp_play(++activeIndex, false, true); } }; video.addEventListener('ended', onFinish, false); var onError = function(e) { setState(STATE_LOADED, true); $f.fireEvent(self.id(), 'onError', activeIndex, 201); if ( opts.onFail && opts.onFail instanceof Function ) opts.onFail.apply(self, []); }; video.addEventListener('error', onError, false); var onPause = function(e) { log("got pause event from player" + self.id()); if ( stopping ) return; if ( currentState == STATE_BUFFERING && previousState == STATE_UNSTARTED ) { log("forcing play"); setTimeout(function() { video.play(); }, 0); return;// stopEvent(e); } if ( ! actionAllowed('Pause') ) { // user initiated pause video.fp_resume(); return stopEvent(e); } stopLastSecondTimer(); setState(STATE_PAUSED); $f.fireEvent(self.id(), 'onPause', activeIndex); } video.addEventListener('pause', onPause, false); var onSeek = function(e) { $f.fireEvent(self.id(), 'onBeforeSeek', activeIndex); }; video.addEventListener('seeking', onSeek, false); var onSeekDone = function(e) { if ( stopping ) { stopping = false; $f.fireEvent(self.id(), 'onStop', activeIndex); } else $f.fireEvent(self.id(), 'onSeek', activeIndex); log("seek done, currentState", stateDescription(currentState)); if ( playAfterSeek ) { playAfterSeek = false; video.fp_play(); } else if ( currentState != STATE_PLAYING ) video.fp_pause(); }; video.addEventListener('seeked', onSeekDone, false); /* PLAYER EVENTS MAPPING */ var onVolumeChange = function(e) { // add onBeforeQwe here $f.fireEvent(self.id(), 'onVolume', video.fp_getVolume()); }; video.addEventListener('volumechange', onVolumeChange, false); } function startLastSecondTimer() { lastSecondTimer = setInterval(function() { if(video.fp_getTime() >= video.duration - 1) { $f.fireEvent(self.id(), 'onLastSecond', activeIndex); stopLastSecondTimer(); } }, 100); } function stopLastSecondTimer() { clearInterval(lastSecondTimer); } // this is called only on iDevices function onPlayerLoaded() { video.fp_play(0); //installControlbar(); } function installControlbar() { // if we're on an iDevice, try to load the js controlbar if needed /* if ( self['controls'] == undefined ) return; // js controlbar not loaded var controlsConf = {}; if ( self.getConfig() && self.getConfig()['plugins'] && self.getConfig()['plugins']['controls'] ) controlsConf = self.getConfig()['plugins']['controls']; var controlsRoot = document.createElement('div'); // dynamically load js, css file according to swf url ? // something more smart here controlsRoot.style.position = "absolute"; controlsRoot.style.bottom = 0; self.getParent().children[0].appendChild(controlsRoot); self.controls(controlsRoot, {heightRatio: opts.controlsSizeRatio }, controlsConf); */ } // Here we are getting serious. If we're on an iDevice, we don't care about Flash embed. // replace it by ours so we can install a video html5 tag instead when FP's init will be called. if ( isiDevice || opts.simulateiDevice ) { if ( ! window.flashembed.__replaced ) { var realFlashembed = window.flashembed; window.flashembed = function(root, opts, conf) { // DON'T, I mean, DON'T use self here as we are in a global func if (typeof root == 'string') { root = document.getElementById(root.replace("#", "")); } // not found if (!root) { return; } var style = window.getComputedStyle(root, null); var width = parseInt(style.width); var height= parseInt(style.height); // clearing root while(root.firstChild) root.removeChild(root.firstChild); var container = document.createElement('div'); var api = document.createElement('video'); container.appendChild(api); root.appendChild(container); //var hasBuiltinControls = conf.config['plugins'] == undefined || (conf.config['plugins'] && conf.config['plugins']['controls'] && conf.config['plugins']['controls'] != null // && self['controls'] == undefined); // we make a careful use of "self", as we're looking in the prototype // styling container container.style.height = height+'px'; container.style.width = width+'px'; container.style.display= 'block'; container.style.position = 'relative'; container.style.background = '-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.7)))'; container.style.cursor = 'default'; container.style.webkitUserDrag = 'none'; // styling video tag api.style.height = '100%'; api.style.width = '100%'; api.style.display= 'block'; api.id = opts.id; api.name = opts.id; api.style.cursor = 'pointer'; api.style.webkitUserDrag = 'none'; api.type="video/mp4"; // if ( hasBuiltinControls ) // api.controls="controls"; api.playerConfig = conf.config; // tell the player we are ready and go back to player's closure $f.fireEvent(conf.config.playerId, 'onLoad', 'player'); //api.fp_play(conf.config.playlist); }; flashembed.getVersion = realFlashembed.getVersion; flashembed.asString = realFlashembed.asString; flashembed.isSupported = function() {return true;} flashembed.__replaced = true; } // hack so we get the onload event before everybody and we can set the api var __fireEvent = self._fireEvent; // only on iDevice, of course self._fireEvent = function(a) { if ( a[0] == 'onLoad' && a[1] == 'player' ) { video = self.getParent().querySelector('video'); if ( opts.controls ) video.controls="controls"; addAPI(); addListeners(); setState(STATE_LOADED, true); // set up first clip video.fp_setPlaylist(video.playerConfig.playlist); // we are loaded onPlayerLoaded(); __fireEvent.apply(self, [a]); } var shouldFireEvent = currentState != STATE_UNLOADED; if ( currentState == STATE_UNLOADED && typeof a == 'string' ) shouldFireEvent = true; if ( shouldFireEvent ) return __fireEvent.apply(self, [a]); } // please, don't ask me why, but if you call video.clientHeight while the video is buffering // it will be stuck buffering self._swfHeight = function() { return parseInt(video.style.height); } self.hasiPadSupport = function() { return true; } } // end of iDevice test // some chaining return self; }); function handler(e){ var player = "Lorenz-IT HTML5 Player"; var duration = 0; var vid = e.target; var vidsrc = rem_sid(vid.src); var vidcurrent = parseInt(vid.currentTime); switch(e.type){ case "pause":{ DEBUG.addDebug("Clipconfig: Clip - onPause"); if(!abnahme){ if(clipName != ""){ omniMediaTrackingStop(clipName,vidcurrent); }else omniMediaTrackingStop(vidsrc,vidcurrent); }//else //console.log("pause event, tracking stop: " + clipName + ":"+vidsrc+", " + vidcurrent); } break; case "loadedmetadata":{ if(!abnahme){ if(clipName != ""){ DEBUG.addDebug("Tracking mit clipname "+clipName); omniInitMediaTracking(clipName,duration,player); }else{ DEBUG.addDebug("Tracking mit url"); omniInitMediaTracking(vidsrc,duration,player); } }//else //console.log("load/start event, tracking init: " + clipName + ":"+vidsrc+", " + vidcurrent+", "+player); } break; case "ended":{ if(!abnahme){ if(clipName != ""){ omniMediaTrackingDone(clipName,vidcurrent); }else omniMediaTrackingDone(vidsrc,vidcurrent); }//else //console.log("ende event, tracking done: " + clipName + ":"+vidsrc+", " + vidcurrent); } break; case "play":{ if(!abnahme){ if(!vid.paused){ if(clipName != ""){ omniMediaTrackingResume(clipName,vidcurrent); }else omniMediaTrackingResume(vidsrc,vidcurrent); } } //console.log("resume event, tracking done: " + clipName + ":"+vidsrc+", " + vidcurrent); } break; default: return true; break; } } if(!!document.createElement('video').canPlayType) { $(document).bind("play pause ended loadedmetadata", handler); } var playerName = "Lorenz-IT Video Player"; var playerSWF = "/swf/flowplayer.swf"; var pluginsConf = { controls:{ url:'/swf/flowplayer.controls.swf', stop:true }, lighttpd: { url: '/swf/flowplayer.pseudostreaming.swf', queryString: escape('&start=${start}') } }; var clipConf = { autoPlay:true, urlEncoding:true, provider: 'lighttpd', onStart: function (clip){ DEBUG.addDebug("Clipconfig: Clip - onStart"); DEBUG.addDebug("Clip, ",clip); if(!abnahme){ if(clipName != ""){ DEBUG.addDebug("Tracking mit clipname "+clipName); omniInitMediaTracking(clipName,clip.fullDuration,playerName); }else{ DEBUG.addDebug("Tracking mit url"); omniInitMediaTracking(clip.url,clip.fullDuration,playerName); } } }, onPause: function(clip) { DEBUG.addDebug("Clipconfig: Clip - onPause"); if(!abnahme){ if(clipName != ""){ omniMediaTrackingStop(clipName,parseInt(this.getTime())); }else omniMediaTrackingStop(clip.url,parseInt(this.getTime())); } }, onResume: function(clip) { DEBUG.addDebug("Clipconfig: Clip - onResume"); if(!abnahme){ if(clipName != ""){ omniMediaTrackingResume(clipName,parseInt(this.getTime())); }else omniMediaTrackingResume(clip.url,parseInt(this.getTime())); } }, onStop: function(clip) { DEBUG.addDebug("Clipconfig: Clip - onStop"); if(!abnahme){ if(clipName != ""){ omniMediaTrackingStop(clipName,parseInt(this.getTime())); }else omniMediaTrackingStop(clip.url,parseInt(this.getTime())); } }, onFinish: function(clip) { DEBUG.addDebug("Clipconfig: Clip - onFinish"); if(!abnahme){ if(clipName != ""){ omniMediaTrackingDone(clipName,parseInt(this.getTime())); }else omniMediaTrackingDone(clip.url,parseInt(this.getTime())); } }, onSeek: function(clip) { DEBUG.addDebug("Clipconfig: Clip - onSeek"); if(!abnahme){ if(clipName != ""){ omniMediaTrackingResume(clipName,parseInt(this.getTime())); }else omniMediaTrackingResume(clip.url,parseInt(this.getTime())); } }, onLoad: function(clip){ DEBUG.addDebug("Clipconfig: Clip - onLoad"); if(!abnahme){ if(clipName != ""){ omniInitMediaTracking(clipName,clip.fullDuration,playerName); }else omniInitMediaTracking(clip.url,clip.fullDuration,playerName); } } } var playerConf = { buffering:false, onError:function(error, msg){ DEBUG.addDebug("Playerconfig: ERROR - "+error+" - "+ msg ); if(error == 200) window.location.href = "/error/404.htm"; }, onBeforeLoad:function(){ if($(this.getParent()).attr("title") != ""){ clipName = $(this.getParent()).attr("title"); } }, key: '#$c4b65579c664bc104c8', clip: clipConf, plugins:pluginsConf } var overlayConfError = { expose: '#cccccc', closeOnClick: false, onBeforeLoad: function() { DEBUG.addDebug("OverlayconfigError: Overlay Error - onBeforeLoad"); var wrap = this.getOverlay().find(".contentWrap"); wrap.html(""); var href = this.getTrigger().attr("href"); var filmId = fetch_urlparam("filmid",href); $(".litd_overlay").css({ width:"450px", height:"300px", textAlign:"left", padding:'15px' }); $.cookie("test", "test"); if($.cookie("test")){ wrap.load("/service/ajaxLogin/login.html"+sidaddq,{ "g2_itemId":fetch_urlparam("g2_itemId",href), "g2_view":fetch_urlparam("g2_view",href), "g2_keyword":fetch_urlparam("g2_keyword",href), "value_url":window.location.pathname+sidaddq, "value_action":href, "filmid":filmId }); }else{ wrap.html("

Fehler

Der geschützte Film konnte nicht geladen werden. Bitte erlauben Sie die Cookies für die Domäne www.roche.de.

Nochmal versuchen

"); } var date = new Date(); $.cookie("test","",{expires: date}); } }; var overlayConf = { expose: '#cccccc', closeOnClick: false, onBeforeLoad: function() { if(this.getTrigger().hasClass("fpembed")){ DEBUG.addDebug("Das klick Objekt ist Embed mache nichts."); return false; } DEBUG.addDebug("Das klick Objekt ist kein Embed prüfe auf Zugang."); DEBUG.addDebug("triggerObjekt: ",this.getTrigger()); DEBUG.addDebug("Overlayconfig: Overlay - onBeforeLoad"); var wrap = this.getOverlay().find(".contentWrap"); wrap.html(""); var trigClone = this.getTrigger().clone(); var href = this.getTrigger().attr("href"); var headData = new Object(); headData.action = "getHead"; headData.url = decodeURIComponent(href); headData.location = window.location.href; headData.protokoll = window.location.protocol; headData.host = window.location.host; DEBUG.addDebug("Overlayconfig: HEAD Request mit dem Object",headData); switch($.head(headData).responseText){ case "200": case "302": DEBUG.addDebug("Overlayconfig: HEADER - Response - 200, 302"); trigClone.attr("id","fplayer"); trigClone.html(""); var cssclass = trigClone.attr("class"); if(cssclass.indexOf("fplayer-") != -1){ var format = "169"; var height = 0; var width = cssclass.split(" "); $(width).each(function(i,ele){ if(ele.indexOf("fplayer-") != -1){ var tmp = ele.split("-"); width = tmp[1]; if(tmp[2]) { format = "43" } } }); if(format == "43") height = (width / 4) * 3; else height = (width / 16) * 9; $(".litd_overlay").css({ width:width, height:parseInt(height), padding:0 }); $(trigClone).css({ width:width, height:parseInt(height) }); } DEBUG.addDebug("Overlayconfig: Before Flowplayer.init"); if($(trigClone).attr("href").indexOf("?") == -1){ pluginsConf.lighttpd.queryString = escape('?start=${start}'); } $(trigClone).flowplayer(playerSWF, playerConf); DEBUG.addDebug("Overlayconfig: Flowplayer ist ready"); $f().ipad(); wrap.html(trigClone); break; case "401": DEBUG.addDebug("Overlayconfig: HEADER - Response - 401"); var filmId = this.getTrigger().attr("id"); filmId = filmId.substring(filmId.indexOf("-")+1, filmId.length); $(".litd_overlay").css({ width:"450px", height:"300px", textAlign:"left", padding:'15px' }); wrap.load("/service/ajaxLogin/login.html"+sidaddq,{ "value_url":window.location.pathname+sidaddq, "value_action":href, "filmid":filmId }); DEBUG.addDebug("Overlayconfig: Load Loginformular"); break; case "404": window.location.href = "/error/404.htm"; break; default: DEBUG.addDebug("Overlayconfig: Default"); } }, onClose: function() { DEBUG.addDebug("Overlayconfig: Overlay - onClose"); if($f()){ $f().stop().unload(); } } } $(function() { var clipName = ""; if($('.fpembed').size() > 0){ $.extend(clipConf, {autoPlay:false}); DEBUG.addDebug("Clipconfig neu :" ,clipConf ); $('.fpembed').flowplayer(playerSWF, playerConf); $f().ipad(); } DEBUG.addDebug("Dokument ist ready!"); DEBUG.addDebug("Clipname: leer gesetzt"); var overlay = $("a[rel='div.litd_overlay']").overlay(overlayConf); DEBUG.addDebug("Overlay builded", overlay); $("a[rel='div.litd_overlay']").each(function(index, element){ if($(this).attr("id") == ""){ $(this).attr("id","filmid-"+(index+1)); } }); DEBUG.addDebug("Dynamische ID's vergeben"); var filmid = fetch_urlparam('filmid', window.location.href); if(filmid.indexOf("?") != -1) filmid = filmid.substring(0,filmid.indexOf("?")); DEBUG.addDebug("filmid: "+filmid); if($.type(parseInt(filmid)) === "number" && filmid > 0){ var headData = new Object(); headData.action = "getHead"; headData.url = "http://www.roche.de/pharma/products"+sidaddq; headData.location = window.location.href; headData.protokoll = window.location.protocol; headData.host = window.location.host; DEBUG.addDebug("ich komme hier rein"); DEBUG.addDebug("Overlayconfig: HEAD Request mit dem Object",headData); if($("#filmid-"+filmid).size() == 0){ var statusCode = $.head(headData).responseText; DEBUG.addDebug("Element nicht auf Seite vorhanden"); if(statusCode == "200" || statusCode == "302"){ DEBUG.addDebug("Angemeldet und Film nicht vorhanden"); window.location.href="/error/404.htm"+sidaddq; }else{ DEBUG.addDebug("Nicht Angemeldet und nicht geprüft"); if($('.fpembed').size() == 0){ var aTmp = $(""); aTmp.appendTo("body"); $(aTmp).overlay(overlayConfError); DEBUG.addDebug("Rufe Overlay auf da Film geschützt.", aTmp); } } }else{ if($('.fpembed').size() > 0){ DEBUG.addDebug("Embed Film vorhanden und abspielen."); $f("filmid-"+filmid).play(); }else{ DEBUG.addDebug("Simuliere Klick auf Film mit der ID: "+filmid+", wenn URL Parameter gesetzt."); $("#filmid-"+filmid).click(); } } }else{ DEBUG.addDebug("false"); } if($("#atmp").size()!= 0){ DEBUG.addDebug("Ich bin Element"); $("#atmp").click(); DEBUG.addDebug("After Click"); } });