/* SWFObject v2.2
is released under the MIT License
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab';
document.write(code);
///Construct a new player after body load
if(window.addEventListener)
{
window.addEventListener('load',function(){ref.constructContainer();},false);
}
else if( window.attachEvent)
{
window.attachEvent('onload',function(){ref.constructContainer();});
}
///only for debug services
if(this.config.externalControl == 'true')this.buildDebugMenu();
}
SekindoPlayer.prototype.segmentUser = function segmentUser(pixelId, isAdd)
{
(function () {
var sNew = document.createElement("script");
sNew.async = true;
var protocol = document.location.protocol;
if (protocol.indexOf('http') != 0) {protocol = 'http:';}
sNew.src = protocol + '//' + 'live.sekindo.com/live/livePixel.php?id=' + pixelId;
if (!isAdd) {sNew.src += '&del=1';}
var s0 = document.getElementsByTagName('script')[0];
s0.parentNode.insertBefore(sNew, s0);
})();
}
SekindoPlayer.prototype.constructContainer = function constructContainer()
{
if (typeof(swfobject) != 'undefined' && !swfobject.hasFlashPlayerVersion("1"))
{
this.segmentUser('811', true);
this.supportFlashPlayerVersion = false;
}
// this code is for avoiding some vpaid js errors on IE
if (!window.console)
{
Window.prototype.console = {};
Window.prototype.console.error = function(msg) {};
Window.prototype.console.info = function(msg) {};
Window.prototype.console.log = function(msg) {};
Window.prototype.console.warn = function(msg) {};
}
this.containerDiv = document.getElementById('SekiNdo-Div-'+this.uniqueID);
this.constructPlayer();
}
///constucting the player from start - happens on first time or on reconstruction after destruction
SekindoPlayer.prototype.constructPlayer = function constructPlayer()
{
var ref = this;
//Create a video player div
this.videoDiv = document.createElement("div");
this.videoDiv.style.width = this.config.width;//"320px";
this.videoDiv.style.height = this.config.height;//"240px";
this.videoDiv.style.background = "white";
this.videoDiv.style.marginLeft = 'auto';//Center div in explorer
this.videoDiv.style.marginRight = 'auto';//Center div in explorer
///generate flash object
var innetHTML = '';
if (navigator.appName == 'Microsoft Internet Explorer')
{
innetHTML = ''
}
else
{
innetHTML = ''
}
///Insert a flash object to the div
this.containerDiv.appendChild(this.videoDiv);
this.videoDiv.innerHTML = innetHTML;
////Set refference ot the object
this.flashObj = document.getElementById("flashObj"+this.uniqueID);
///init comunication with the flash
this.flashInit("start");
}
///killing the beast
SekindoPlayer.prototype.destructPlayer = function destructPlayer()
{
this.videoDiv.removeChild(this.flashObj);
this.containerDiv.removeChild(this.videoDiv);
}
SekindoPlayer.prototype.buildDebugMenu = function buildDebugMenu()
{
var ref = this;
this.jenerateButton = function(name, callBackFunc, width, height )
{
var btn = document.createElement("BUTTON");
btn.id = name;
btn.innerHTML = ''+name+'';//name;//
btn.style.width = width?width:'50px';
btn.style.height = height?height:'20px';
if(callBackFunc)btn.onclick = callBackFunc;
this.containerDiv.appendChild(btn);
}
var title = document.createElement("DIV");
title.innerHTML = "["+this.uniqueID+"]";
this.containerDiv.appendChild(title);
this.onButton = function(event)
{
switch(event.currentTarget.id)
{
case "Play":
ref.requestsToFlash('play');
break;
case "Pause":
ref.requestsToFlash('pause');
break;
case "Mute":
ref.requestsToFlash('mute');
break;
case "UnMute":
ref.requestsToFlash('unmute');
break;
case "SkipAd":
ref.requestsToFlash('skipAd');
break;
case "FS":
ref.requestsToFlash('fullscreen');
break;
case "NS":
ref.requestsToFlash('normalscreen');
break;
}
}
this.jenerateButton("Play", this.onButton);
this.jenerateButton("Pause", this.onButton);
this.jenerateButton("Mute", this.onButton);
this.jenerateButton("UnMute", this.onButton);
this.jenerateButton("SkipAd", this.onButton);
}
////Inishiating the comunication with the flash - looping requests to flash untill we get connection
SekindoPlayer.prototype.flashInit = function flashInit(val)
{
var ref = this;
if(val == "start")
{/// first time request for connection
this.initInterval = setInterval(function()
{
//Debugger("initing player "+ref.uniqueID);
ref.requestsToFlash("init", ref.uniqueID);
}, 100);
///just in case we fail for a long time - stop this proccesssss
this.initTimeOut = setTimeout(function()
{
clearInterval(ref.initInterval);
},60000);
}
else if(val == "complete")
{///We have a connection
clearInterval(this.initInterval);
clearTimeout(this.initTimeOut);
this.requestsToFlash("config", this.configJson);
}
}
SekindoPlayer.prototype.requestsToFlash = function requestsToFlash(type, val)
{
try
{
this.flashObj.callFlash(type, val);
}
catch(e)
{
}
}
////Receiving reports from flash player
SekindoPlayer.prototype.flashReports = function flashReports(type, val)
{
var ref = this;
switch(type)
{
case "onHeartBeat":
if(this.heartBeatTimeout)
{
clearTimeout(this.heartBeatTimeout);
}
this.heartBeatTimeout = setTimeout(function(){ref.onHeartBeatTimeout();}, 30000);
break;
case "onStart":
this.playerWdTimestamp = this.getTimeSeconds();
if(this.playerWdTimer == null)
{
this.playerWdTimer = setInterval(function(){ref.playerWd();}, 1000);
}
if (!this.supportFlashPlayerVersion)
{
this.segmentUser('811', false);
}
break;
case "onPause":
case "onComplete":
if (this.playerWdTimer)
{
clearInterval(this.playerWdTimer);
this.playerWdTimer = null;
}
break;
case "onPlay":
break;
case "onMovieStart":
break;
case "onMovieComplete":
break;
case "onScrab":
break;
case "onMute":
break;
case "onUnmute":
break;
case "onUserUnmute":
this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onUserUnmute");
break;
case "on3SecUnmute":
this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_on3SecUnmute");
break;
case "onVolumeScrab":
break;
case "onFullscreen":
break;
case "onNormalscreen":
break;
case "onAdRequest":
this.playerWdTimestamp = this.getTimeSeconds();
break;
case "onAdStart":
this.strugglePixelFired = false;
this.playerWdTimestamp = this.getTimeSeconds();
break;
case "onAdImpression":
this.playerWdTimestamp = this.getTimeSeconds();
break;
case "onAdComplete":
this.playerWdTimestamp = this.getTimeSeconds();
break;
case "onAdSkip":
this.playerWdTimestamp = this.getTimeSeconds();
break;
case "onError":
break;
case "onAdError":
this.playerWdTimestamp = this.getTimeSeconds();
break;
case "onBuffer":
break;
case "onBufferComplete":
break;
case "onSoundMixerUndefined":
this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onSoundMixerUndefined");
this.destructPlayer();
this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"');
this.constructPlayer();
break;
case "onMemoryOverload":
break;
case "onVolumeStruggle":
this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onVolumeStruggle");
this.destructPlayer();
this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"');
this.constructPlayer();
break;
case "onVolumeStruggleNoImpression":
if (!this.strugglePixelFired)
{
this.strugglePixelFired = true;
this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onVolumeStruggleNoImpression");
}
break;
default:
}
}
SekindoPlayer.prototype.onHeartBeatTimeout = function onHeartBeatTimeout()
{
this.heartBeatTimeout = null;
// player is stuck. release it
this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onHeartBeatTimeout");
this.destructPlayer();
this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"');
this.constructPlayer();
}
SekindoPlayer.prototype.playerWd = function playerWd()
{
var diff = this.getTimeSeconds() - this.playerWdTimestamp;
if (diff > 3*60) // 3min
{
// player is stuck. release it
clearInterval(this.playerWdTimer);
this.playerWdTimer = null;
this.firePixel("http://live.sekindo.com/live/liveView.php?s=48149&sta=4829201&njs=1&ito=1&subId=VRE1_onPlayerWd");
this.destructPlayer();
this.configJson = this.configJson.replace('"isAutoPlay":"false"','"isAutoPlay":"true"');
this.constructPlayer();
}
}
SekindoPlayer.prototype.firePixel = function firePixel(url)
{
if (!url || url == '')
return;
url += '&cbuster=' + (new Date().getTime().toString());
var oImg = document.createElement("img");
oImg.setAttribute('src', url);
oImg.setAttribute('height', '0px');
oImg.setAttribute('width', '0px');
oImg.style.display = "none";
document.body.appendChild(oImg);
}
SekindoPlayer.prototype.getTimeSeconds = function getTimeSeconds()
{
return new Date().getTime() / 1000;
}
var configPlayer = new Object();
configPlayer.width = 300;
configPlayer.height = 250;
configPlayer.videoPlayerURL = 'http://live.sekindo.com/content/video/vplayer/vPlayer_v1.0.3.swf';
configPlayer.externalControl = 'false';
var randName = ("SekindoVPlayer"+Math.floor( Math.random()*100000)).toString();
window[randName] = new SekindoPlayer('{"width":300,"height":250,"logoClickUrl":"http:\/\/www.sekindo.com","logoType":"sekindo","showLogo":"false","isAutoPlay":"true","volume":".5","mute":"true","isMuteLogicActive":"true","adsTimeGap":5,"adVast":"http:\/\/live.sekindo.com\/live\/liveVastWrapper.php?platform=ova&contentNum=1&ri=6C69766553746174737C327C323031352D30342D32335F32327C31353433327C353134343932307C55537C7C4D546B774E4459344D6A5666643364334C6D68315A6D5A70626D64306232357762334E304C6D4E7662513D3D7E317E31FEFE&debugInfo=5144920_19046825_www.huffingtonpost.com&scr=1&ap=1&showLogo=0&am=auto&plMult=25&erc=0&sta=5144920&pubUrl=http%3A%2F%2Fwww.huffingtonpost.com&schedule=auto&content=auto&ad=http%3A%2F%2Fu-ads.adap.tv%2Fa%2Fh%2F_TUDADrgfgTipQdboQY4cwN6BXBqGGDI%3Fcb%3D%24%7BVIDEO_PLAYER_CACHE_BUSTER%7D%26pageUrl%3D%24%7BVIDEO_PLAYER_REFERER_URL_ENC%7D%26description%3DVIDEO_DESCRIPTION%26duration%3DVIDEO_DURATION%26id%3DVIDEO_ID%26keywords%3DVIDEO_KEYWORDS%26title%3DVIDEO_TITLE%26url%3DVIDEO_URL%26eov%3Deov&ad1=http%3A%2F%2Fsearch.spotxchange.com%2Fvast%2F2.00%2F86811%3FVPAID%3D1%26content_id%3D%24%7BVIDEO_PLAYER_DEBUG_INFO%7D%26content_page_url%3D%24%7BVIDEO_PLAYER_REFERER_URL_ENC%7D%26player_width%3D%24%7BVIDEO_PLAYER_WIDTH%7D%26player_height%3D%24%7BVIDEO_PLAYER_HEIGHT%7D%26cb%3D%24%7BVIDEO_PLAYER_CACHE_BUSTER%7D%26vid_id%3D%24%7BVIDEO_PLAYER_DEBUG_INFO%7D&ad2=http%3A%2F%2Fvast.bp3854818.btrll.com%2Fvast%2F3854818%3Fn%3D%24%7BVIDEO_PLAYER_CACHE_BUSTER%7D%26br_w%3D%24%7BVIDEO_PLAYER_WIDTH%7D%26br_h%3D%24%7BVIDEO_PLAYER_HEIGHT%7D%26br_pageurl%3D%24%7BVIDEO_PLAYER_REFERER_URL_ENC%7D%26br_conurl%3D%24%7BVIDEO_PLAYER_CONTENT_URL_ENC%7D&ad3=http%3A%2F%2Fad4.liverail.com%2F%3FLR_PUBLISHER_ID%3D55930%26LR_SCHEMA%3Dvast2-vpaid%26LR_URL%3D%24%7BVIDEO_PLAYER_REFERER_URL_ENC%7D%26LR_AUTOPLAY%3D1%26LR_MUTED%3D0%26LR_TITLE%3D%24%7BVIDEO_PLAYER_CONTENT_ID%7D%26LR_VIDEO_ID%3D%24%7BVIDEO_PLAYER_CONTENT_ID%7D%26LR_CONTENT%3D1%26LR_VIDEO_URL%3D%24%7BVIDEO_PLAYER_CONTENT_URL_ENC%7D%26LR_DESCRIPTION%3D%24%7BVIDEO_PLAYER_CONTENT_DESC%7D%26LR_VIDEO_DURATION%3D%24%7BVIDEO_PLAYER_CONTENT_DURATION%7D&ad4=http%3A%2F%2Fu-ads.adap.tv%2Fa%2Fh%2F3lK6VqTTZo6asWilsCuxPF3Enx4Ktnz5EUti6lPUIdE%3D%3Fcb%3D%24%7BVIDEO_PLAYER_CACHE_BUSTER%7D%26pageUrl%3D%24%7BVIDEO_PLAYER_REFERER_URL_ENC%7D%26context%3Dpubid%3Dunius350%26eov%3Deov&ad5=http%3A%2F%2Fvast.bp3859804.btrll.com%2Fvast%2F3859804%3Fn%3D%24%7BVIDEO_PLAYER_CACHE_BUSTER%7D%26br_w%3D%24%7BVIDEO_PLAYER_WIDTH%7D%26br_h%3D%24%7BVIDEO_PLAYER_HEIGHT%7D%26br_source%3Di%26br_adtype%3Dp%26br_adpos%3Da%26br_autopl%3Da%26br_sound%3Do%26br_comp%3D0%26br_comptype%3Dn%26br_pageurl%3D%24%7BVIDEO_PLAYER_REFERER_URL_ENC%7D%26br_conurl%3D%24%7BVIDEO_PLAYER_CONTENT_URL_ENC%7D&cbuster=${CBUSTER}","playlistMultiplier":"25","contentClickUrl":null,"contentCash":"true","contentPlayList":[{"url":"http:\/\/video.sekindo.com\/uploads\/video\/chloe_01.mp4","title":"Fashion - Paris Fashion Week: Chloe"}],"videoPlayerURL":"http:\/\/live.sekindo.com\/content\/video\/vplayer\/vPlayer_v1.0.3.swf","debug":"false"}', configPlayer, randName);