/home/techb158/ileadtechnology.com/public/content/java
NameSizeModeActions
dash.all.min.js5906510644editdlrm
FWDUVPATB.js195330644editdlrm
FWDUVPCC.js192480644editdlrm
FWDUVPFPS.js21920644editdlrm
FWDUVPIMA.js121320644editdlrm
FWDUVPThumbnailsPreview.js122340644editdlrm
FWDUVPVast.js214510644editdlrm
hls.js2175430644editdlrm
three.js5081640644editdlrm
threeControled.js151810644editdlrm
Edit: /home/techb158/ileadtechnology.com/public/content/java/FWDUVPVast.js (21451B)
/* FWDUVPVast */ (function (window){ var FWDUVPVast = function( data ){ var _s = this; var prototype = FWDUVPVast.prototype; _s.id = -1; //##########################################// /* initialize */ //##########################################// _s.init = function(){}; //####################################// /* load vast */ //####################################// _s.setSource = function(source){ _s.closeVast(); _s.isVmapTimesFixed = false; data.adsSource_ar = []; _s.vastData_ar = []; _s.parsedLienarVastAds_ar = []; _s.parsedNonLienarVastAds_ar = []; _s.countVastDataLoaded = 0; _s.totalDataVastToLoad = 1; _s.load(source); data.dispatchEvent(FWDUVPData.VAST_LOADING); } _s.closeVast = function(){ if(_s.vastXHR){ _s.vastXHR.onreadystatechange = null; _s.vastXHR.onerror = null; _s.vastXHR.abort(); _s.vastXHR = null; } } _s.load = function(source){ var tempObj; _s.vastXHR = new XMLHttpRequest(); _s.vastXHR.onreadystatechange = function(e){ if(_s.vastXHR.readyState == 4){ if(_s.vastXHR.status == 200){ var respObj = FWDUVPUtils.xmlToJson(_s.vastXHR.responseXML); // Wrapper. try{ var url = respObj['VAST']['Ad']['Wrapper']['VASTAdTagURI']['#cdata-section']; if(!url){ url = respObj['VAST']['Ad']['Wrapper']['VASTAdTagURI']['#text']; } _s.load(url); return; }catch(e){} // VMAP. if(respObj['vmap:VMAP']){ if(!respObj['vmap:VMAP']['vmap:AdBreak'].length){ var obj = {}; obj.timeOffset = respObj['vmap:VMAP']['vmap:AdBreak']['@attributes']['timeOffset']; obj.breakType = respObj['vmap:VMAP']['vmap:AdBreak']['@attributes']['breakType']; obj.breakId = respObj['vmap:VMAP']['vmap:AdBreak']['@attributes']['breakId']; obj.source = respObj['vmap:VMAP']['vmap:AdBreak']['vmap:AdSource']['vmap:AdTagURI']['#cdata-section']; _s.vastData_ar.push(obj); }else{ for(var i=0; i <ad> tag was found in the VAST file. Invalid VAST file."}); return; }else{ if(!respObj["Ad"].length) respObj["Ad"] = [respObj["Ad"]]; for(var i=0; i< respObj["Ad"].length; i++){ tempObj = {}; tempObj.id = respObj["Ad"][i]["@attributes"]["id"]; tempObj.sequence = respObj["Ad"][i]["@attributes"]["sequence"]; tempObj.startTime = respObj["Ad"][i]["@attributes"]["startTime"]; if(!tempObj.sequence) tempObj.sequence = i; if(!respObj["Ad"][i]["InLine"]){ data.dispatchEvent(FWDUVPData.LOAD_ERROR, {text:"No <InLine> tag was found in the VAST xml file."}); return; } tempObj["InLine"] = {}; //impression tempObj["InLine"]["Impression"] = undefined; if(respObj["Ad"][i]["InLine"]["Impression"]){ if(respObj["Ad"][i]["InLine"]["Impression"]["#cdata-section"]){ tempObj["InLine"]["Impression"] = respObj["Ad"][i]["InLine"]["Impression"]["#cdata-section"]; }else{ tempObj["InLine"]["Impression"] = respObj["Ad"][i]["InLine"]["Impression"]["#text"]; } } if(!respObj["Ad"][i]["InLine"]["Creatives"]["Creative"].length){ respObj["Ad"][i]["InLine"]["Creatives"]["Creative"] = [respObj["Ad"][i]["InLine"]["Creatives"]["Creative"]] } if(respObj["Ad"][i]["InLine"]["Creatives"]["Creative"].length){ for(var j=0; j= allVideosObj[m]["@attributes"]["width"]){ correctIndex = m; break prop; } } if(allVideosObj[correctIndex]["#cdata-section"]){ tempObj["InLine"]["Linear"]["videoSource"] = allVideosObj[correctIndex]["#cdata-section"]; }else{ tempObj["InLine"]["Linear"]["videoSource"] = allVideosObj[correctIndex]["#text"]; } //duration if(respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["Duration"]){ if(respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["Duration"]["#cdata-section"]){ tempObj["InLine"]["Linear"]["Duration"] = respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["Duration"]["#cdata-section"]; }else if(respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["Duration"]["#text"]){ tempObj["InLine"]["Linear"]["Duration"] = respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["Duration"]["#text"]; } } //skip offset tempObj["InLine"]["Linear"]["skipoffset"] = undefined; if(respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["@attributes"] && respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["@attributes"]["skipoffset"] ){ tempObj["InLine"]["Linear"]["skipoffset"] = respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["@attributes"]["skipoffset"]; } if(tempObj["InLine"]["Linear"]["skipoffset"]){ tempObj["InLine"]["Linear"]["skipoffset"] = tempObj["InLine"]["Linear"]["skipoffset"].substr(0, 8); if(tempObj["InLine"]["Linear"]["Duration"] && tempObj["InLine"]["Linear"]["skipoffset"].indexOf("%") != -1){ var tempSkipOffset = Math.round(FWDUVPUtils.getSecondsFromString(tempObj["InLine"]["Linear"]["Duration"]) * (tempObj["InLine"]["Linear"]["skipoffset"].substr(0, tempObj["InLine"]["Linear"]["skipoffset"].length -1)/100)); tempObj["InLine"]["Linear"]["skipoffset"] = FWDUVPUtils.formatTime(tempSkipOffset, true); } } if(tempObj["InLine"]["Linear"]["skipoffset"]){ tempObj["InLine"]["Linear"]["skipoffset"] = FWDUVPUtils.getSecondsFromString(tempObj["InLine"]["Linear"]["skipoffset"]); if(tempObj["InLine"]["Linear"]["Duration"] && FWDUVPUtils.getSecondsFromString(tempObj["InLine"]["Linear"]["Duration"]) <= tempObj["InLine"]["Linear"]["skipoffset"]){ tempObj["InLine"]["Linear"]["skipoffset"] = undefined; } } //tracking events tempObj["InLine"]["Linear"]["TrackingEvents"] = undefined; if(respObj["Ad"][i]["InLine"]["Creatives"]["Creative"][j]["Linear"]["TrackingEvents"]["Tracking"]){ tempObj["InLine"]["Linear"]["TrackingEvents"] = []; for(var p=0; p 0){ if(curPopupAdsData[i - 1]['timeStart'] == curPopupAdsData['timeStart']){ curPopupAdsData[i]['timeStart'] = Number(curPopupAdsData[i - 1]['timeEnd']) + 1; curPopupAdsData[i]['timeEnd'] = curPopupAdsData[i]['timeStart'] + (curPopupAdsData[0]['timeEnd'] - data.popupAds_ar[0]['timeStart']) } } } } if(curAddData){ for(var i=0; i