/* krpano 1.16.4 videoplayer plugin (build 2013-06-05) */ var krpanoplugin = function(){ /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function n() { //alert("DEBUG: Entered n function."); b&&( k ? (b.airplay="allow",b["x-webkit-airplay"]="allow") : (b.airplay="deny",b["x-webkit-airplay"]="deny",b.airplay="disallow",b["x-webkit-airplay"]="disallow") ) } /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function p(c){ //alert("DEBUG: Entered p function."); if( !(void 0 == c || null == c || "" == c || "null" == String(c).toLowerCase() ) ) { var f=c.split("|"); if( 1 < f.length ){ if( null==h ) { h=""; var g=document.createElement("video"); if(!(null===g||void 0===g)) if(void 0!==g.canPlayType){ var e=g.canPlayType("video/ogg"); e.match(/maybe|probably/i)&&(h+="ogg"); e=g.canPlayType("video/webm"); e.match(/maybe|probably/i)&&(h+="webm"); e=g.canPlayType("video/mp4"); e.match(/maybe|probably/i)&&(h+="mp4") } else h+="mp4" } g=f.length; if( 0<=h.indexOf("mp4") ) for( e=0; ed.iosversion?a._simulateloop=!0:b.loop="loop"); a.html5controls&&(b.controls="controls"); b.controls=true; b.load() //alert("DEBUG: Exiting bottom block of p function."); } } } /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function q() { //alert("DEBUG: Entered q function."); if( a&&b ) { if( a.iscomplete ) try{ b.currentTime=0 } catch(c){}b.play(); a.ispaused=!1 } } /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function r() { //alert("DEBUG: Entered r function."); a&&b&&( b.pause(), a.ispaused=!0) } /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function s() { //alert("DEBUG: Entered s function."); if( a && b ){ try{ b.currentTime=0, b.pause() } catch(c){}a.ispaused=!0 } } /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function t(){ //alert("DEBUG: Entered t function."); if( a&&b ) { a.havevideosize =!1; a.isvideoready =!1; a.iscomplete =!1; a.ispaused= !0; try{ a.videourl=null,a.parsedurl=null,b.src=null } catch(c){} } } /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function u() { //alert("DEBUG: Entered u function."); a&&b&&( !0 == b.playing || void 0===b.playing && !1==a.ispaused ? (b.pause(),a.ispaused=!0) : (b.play(),a.ispaused=!1) ) } /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function v(c) { //alert("DEBUG: Entered v function."); if(a&&b) try{b.currentTime=c} catch(d){} } /************************************************************************************************************ ************************************************************************************************************* *************************************************************************************************************/ function w() { //alert("DEBUG: Entered w function."); b&&0 d.version || "2011-07-25" > d.build ? d.trace(3,"videoplayer plugin - too old krpano version (min. 1.0.8.14)") : ( a.registerattribute( "videourl", null ), a.registerattribute( "altvideourl", null ), a.registerattribute( "posterurl", null ), a.registerattribute( "pausedonstart", !1 ), a.registerattribute( "loop", !1 ), a.registerattribute( "html5controls", !1 ), a.registerattribute( "volume", 1 ), a.registerattribute( "airplay", k, function(a){ k="boolean"==typeof a ? a : 0<="yesontrue1".indexOf(String(a).toLowerCase()); n()}, function(){ return k } ), a.registerattribute( "ispaused", !1 ), a.registerattribute( "iscomplete", !1 ), a.registerattribute( "isvideoready", !1 ), a.registerattribute( "havevideosize", !1 ), a.registerattribute( "time", 0 ), a.registerattribute( "totaltime", 0 ), a.registerattribute( "loadedbytes", 0 ), a.registerattribute( "totalbytes", 0 ), a.registerattribute( "onvideoready", null ), a.registerattribute( "onvideocomplete", null ), a.registerattribute( "onvideopaused", null), a.registerattribute( "onunsupported", null), a.registerattribute( "playvideo", p ), a.registerattribute( "closevideo", t ), a.registerattribute( "stop", s ), a.registerattribute( "pause", r ), a.registerattribute( "play", q ), a.registerattribute( "resume", q ), a.registerattribute( "togglepause", u ), a.registerattribute( "seek", v ), b=document.createElement("video"), n(), b.playsInline = "playsInline", b.webKitPlaysInline = "webKitPlaysInline", b.WebKitPlaysInline = "WebKitPlaysInline", b["webkit-playsinline"] = "webkit-playsinline", !b || !b.play || !b.pause ? ( b=null, c=a.onunsupported, null == c || "" == c || "null" == String(c).toLowerCase() ? d.trace( 2, "videoplayer plugin - HTML5 video is not supported by this browser!") : d.call( c, a ) ) : ( b.style.backgroundColor="#000000", b.style.width = "100%", b.style.height = "100%", b.onselectstart = function(){ return!1 }, b.addEventListener( "loadedmetadata", w, !1 ), b.addEventListener( "loadeddata",x, !1 ), b.addEventListener( "timeupdate", A, !1 ), b.addEventListener( "play", y, !1 ), b.addEventListener( "pause", z, !1 ), b.addEventListener( "ended", B, !1 ), b.addEventListener( "error", C, !1 ), b.addEventListener( "touchstart", function( a ){ a.preventDefault() }, !0 ), p( a.altvideourl ? a.altvideourl : a.videourl ), a.sprite.appendChild( b ) ) ) }; this.unloadplugin = function() { try{ a&&(a.sprite&&b)&&a.sprite.removeChild(b)} catch(c){}d=a=b=null }; var h=null };