<html>
<head>
<title>vInterstitialPlus</title>
<meta name="viewport" content="viewport-fit=cover, width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script type="text/javascript">
var crt_id = '170154';
if(crt_id == 170154) {
console.log(JSON.parse('{"videoAreas":[{"id":"881052","name":"Learn more","coordonates":"0, 50, 140, 20","link":"link:https:\/\/bs.serving-sys.com\/Serving\/adServer.bs?cn=trd&pli=1079448671&gdpr=&gdpr_consent=${GDPR}&us_privacy=&adid=1091022190&ord=1691488677246"}],"interstitialAreas":[{"id":"881046","name":"CTA Interstitial","coordonates":"13, 255, 542, 50","link":"link:https:\/\/bs.serving-sys.com\/Serving\/adServer.bs?cn=trd&pli=1079448671&gdpr=&gdpr_consent=${GDPR}&us_privacy=&adid=1091022190&ord=1691488677246"},{"id":"881044","name":"VI+ Video","coordonates":"212, 55, 60, 60","link":""}],"endscreenAreas":[{"id":"881056","name":"CTA Endscreen","coordonates":"16, 72, 533, 221","link":"link:https:\/\/bs.serving-sys.com\/Serving\/adServer.bs?cn=trd&pli=1079448671&gdpr=&gdpr_consent=${GDPR}&us_privacy=&adid=1091022190&ord=1691488677246"}]}'));
}
</script>
<script src="mraid.js"></script>
<script type="text/javascript">
var mapping_code = '2';
var campaign_id = '175106';
var creative_id = '170154';
var creative_type_id = parseInt('56');
var location_id = '22770';
var ad_type = 'video';
var mraid_ad_id = '100';
var strStatsUrl = 'https://ingameads.gameloft.com/un/track.php?holistic_instance=loc_video%3Apremium_middle&rew_cap_reached=0&game=ASP8&os=ios&device_country=RO&device_lang=en&game_lang=en&game_ver=7.2.1a&device_model=iPhone13%2C2&firmware=14.1.0&anonymous=iphone%3AJlqkCr5F5gOEvs2HHJkTSA%3D%3D&gcid=U%3A61bf3be76c79fa8c05bf48377c21bca7&clientid=1574%3A52108%3A7.2.1a%3Aios%3Aappstore&data_center=mdc&width=844&height=390&device_date=2023-08-04_11%3A50%3A02&adult_content=1&nt=wifi&gdid=8180630546&ggi=52108&hdidfv=FC8A0353-46BE-45FE-AF71-E2ED3CC475AB&user_age=32&gender=1&fedid=9f28033e-cc23-11eb-a7da-b8ca3a603534&op_country=RO&tablet=0&hd=1&igb=1&mraid=1&vast=1&support_video_complete=1&support_glads_command=1&redirect_with_reward=1&can_pause_music=1&glads_version=17.3.1&config_hestia=1&holistic_mode=1&ucd=gi%7C121%7Cgsi%7C0%7Cbkip%7C0&sound_vol=0&iab_consent_string=CPvkQMAPvkQMAAHABAENDPCsAP_AAH_AAAqIJkNf_X__b2_r-_7_f_t0eY1P9_7__-0zjhfdl-8N3f_X_L8X52M5vF36tqoKuR4ku3bBIUdlHPHcTVmw6okVryPsbk2cr7NKJ7PEmlMbM2dYGH9_n9_z-ZKY7___f__z_v-v___9____7-3f3__5__--__e_V_-9zfn9_____9vP___9v-_9_3________3_79_7_D9-f_87_XQTFAJMNS4gC7AkZCbaMIoUQIwrCQqgUAFEAkLRAYQurgp2VwE-sBkAKEUARwQAhgBRkACAAACAJCIAJAjwQCAQCAQAAgAVCAQAEbAAKACwEAgAFAdCxTigCUCwgyICIhTAhKkSCgnsqEEoP9BXCEOssAKDR_xUICJQAxWBEJCxchwRICXCSQLdUb4ACEAKAUSoViCT00ACgkbLUAA&jb=0&omsdk_partner_version=1.2.19&idfv=EB8A21F0-70AE-4257-A8F4-2C9C7BD3F935&idfa=1C832E39-2064-4E80-8528-B71C659065CC&idfa_optout=0&user_agent=Mozilla%252F5.0%2520%28iPhone%253B%2520CPU%2520iPhone%2520OS%252014_1%2520like%2520Mac%2520OS%2520X%29%2520AppleWebKit%252F605.1.15%2520%28KHTML%2C%2520like%2520Gecko%29%2520Mobile%252F15E148&timeoutvalue=10&ad=fullscreen&location=loc_video¬ifyrd=1&debug=&checkInput=&sid=f2814272cf25a8e2c803aedd1663891a&user_id=4573778368&device_id=4573778368&holistic_instance_match=loc_video%3Aloc_video%3Apremium_middle&ip=3.127.95.157&ip_country_id=81&ip_country_code=DE&ip_city_id=25591&ip_country_state_id=393&ip_country_state_code=&server=8&operator_id=0&device_type_id=1&from=ASP8&country=RO&lg=EN&d=iPhone13%2C2&f=14.1.0&click_id=a17fa704c206078bb1f6762945c61637d51c5e6e&campaign_id=175106&creative_type_id=56&ranking=19000&hash_settings=64ccc5cec5718&cashdeal=1&type=0&target_installed_game=0&target_installed_game_mode=0&matching_target_groups=&creative_base_type_id=56&game_id=121&location_id=22770&campaign_game_location_id=77522622';
var pixel_trackers = '<img src="https://bs.serving-sys.com/Serving/adServer.bs?cn=display&c=19&pli=1079448671&gdpr=${GDPR}&gdpr_consent=${GDPR_CONSENT_68}&us_privacy=${US_PRIVACY}&adid=1091022190&ord={[bannerTimestamp]}" style="display:none">';
var os = 'ios';
var is_tablet = '0';
var protocol = 'https';
var domain = 'ingameads.gameloft.com';
var imgDefault = mapping_code == '0' ? '415' : '568'; /* larger GLADS dimension in mapping area */
var advertisement = 'Advertisement';
var interstitialSrc = 'https://novac.gameloft.com/igp/ng_viplus/aa/11644-morgan2_interstitial_en_1920x1080.jpg';
var videoSrc = 'https://novac.gameloft.com/igp/ng_viplus/aa/11644-morgan2_video_en.mp4';
var endscreenSrc = 'https://novac.gameloft.com/igp/ng_viplus/aa/11644-morgan2_endscreen_en_1920x1080.jpg';
var areas = JSON.parse('{"videoAreas":[{"id":"881052","name":"Learn more","coordonates":"0, 50, 140, 20","link":"link:https:\/\/bs.serving-sys.com\/Serving\/adServer.bs?cn=trd&pli=1079448671&gdpr=&gdpr_consent=${GDPR}&us_privacy=&adid=1091022190&ord=1691488677246"}],"interstitialAreas":[{"id":"881046","name":"CTA Interstitial","coordonates":"13, 255, 542, 50","link":"link:https:\/\/bs.serving-sys.com\/Serving\/adServer.bs?cn=trd&pli=1079448671&gdpr=&gdpr_consent=${GDPR}&us_privacy=&adid=1091022190&ord=1691488677246"},{"id":"881044","name":"VI+ Video","coordonates":"212, 55, 60, 60","link":""}],"endscreenAreas":[{"id":"881056","name":"CTA Endscreen","coordonates":"16, 72, 533, 221","link":"link:https:\/\/bs.serving-sys.com\/Serving\/adServer.bs?cn=trd&pli=1079448671&gdpr=&gdpr_consent=${GDPR}&us_privacy=&adid=1091022190&ord=1691488677246"}]}');
var clickURLTracking = 'https://ingameads.gameloft.com/un/track.php?clkredir=8826clk782d759d49f83a741a76ec935d13e0cc&redir=';
var learnMoreLabel = 'Learn More';
var game_id = '121';
var client_id = '{[client_id]}';
var advSetup = JSON.parse('{"interstitial":{"advPos":"3","advColor":"#ffffff","advShadow":"#000000"},"video":{"advPos":"5","advColor":"#FFFFFF","advShadow":"#000000"}}');
var can_pause_music = '1';
var targetingInfoUrl = 'https://ingameads.gameloft.com/ads/adserver/ad_targeting_info.php?lang=en&data=eyJnYW1lIjoiQVNQOCJ9';
var gl_lib_enabled = '1';
var creativeOrientation= parseInt('1');
var game_fullname = 'Asphalt_8';
var campaign_game_location_id = '77522622';
var vInterstitialPlusNonIV = 55;
var vInterstitialPlusIV = 56;
var imageDimensions = {};
var deviceSoundVolume = '{[deviceSoundVolume]}';
var deviceVolume = deviceSoundVolume == '' ? 0 : deviceSoundVolume / 100;
/* viewability params */
var isViewabilityMoat = '1';
var isViewabilityAvid = '0';
var isViewabilityOmid = '0';
/* reward */
var rewardCurrency = '1';
var rewardAmount = 'coin';
var rewardUrl = 'https://ingameads.gameloft.com/un/reward.php?rewstr=1724r1691488677rew36259943069f67967f1722d353851d1d&sid=f2814272cf25a8e2c803aedd1663891a';
var rewardDelivered = false;
var rewardSent = false;
var signalRewardToClient = true;
/*AVID vars*/
var avid_ready = 0;
var avid_startTracking = 0;
var htmlVideoAvidAdSessionListener = null;
var avidJavascriptResource = '';
var userCalledPause = false;
// this is for the pinchToZoom feature
var pinchWasInit = false;
var showGlBtnClose = true;
if(gl_lib_enabled == 0 && os == 'android')
showGlBtnClose = false;
var showGlBtnClose
mraid.useCustomClose(true);
function dlog(msg) {
log.innerHTML += msg + '<br/>';
console.log(msg);
}
// HOL alters
if(window.hol_data){
if(window.hol_data.location) {
rewardUrl += '&holistic_loc=' + window.hol_data.location;
strStatsUrl += '&holistic_loc=' + window.hol_data.location;
}
if(window.hol_data.uuid)
rewardUrl += '&holistic_uuid=' + window.hol_data.uuid;
}
/////
</script>
<link rel="stylesheet" type="text/css" href="https://ingameads.gameloft.com/un/web/fullscreen/css/v_interstitial_plus.css?ver=1691488677">
</head>
<body>
<div id="ad-background"></div>
<div id="loader-wrapper">
<div id="loader"></div>
</div>
<div id="ad-container">
<div id="expanded">
<div id="zoomBorder" style="display: none; position: absolute;"></div> <!-- for pinchToZoom -->
<div id="muteButton" onclick="toggleMute();" style="display:none">
<img id="muteButtonImage" draggable="false" src="https://igp06.gameloft.com/layout/fullscreen/images/newIcons/soundOff.png" />
</div>
<img id="interstitial" src="">
<div id="interstitial-overlay">
<div id="video-wrapper">
<div id="zoomStateNotificationContainer" style="display: none; position: absolute;z-index: 9;"></div><!-- for showing pinch to zoom messages when zoom in/zoom out -->
<video id="video" webkit-playsinline playsinline x-webkit-airplay="deny" poster="https://igp06.gameloft.com/layout/fullscreen/images/black.jpg">
<source src="https://novac.gameloft.com/igp/ng_viplus/aa/11644-morgan2_video_en.mp4" type="video/mp4">
</video>
<div id="endscreen-wrapper">
<img id="endscreen" src="">
<div id="endscreen-areas"></div>
</div>
<div id="play-button" style="display: none;"> <img id="play-image" src="https://igp06.gameloft.com/layout/fullscreen/images/newIcons/play_overlay.png"> </div>
<div id="replay-button"> <img id="replay-image" src="https://igp06.gameloft.com/layout/fullscreen/images/newIcons/video_replay.png"> </div>
<div id="expand-button">
<img id="expand-image" src="https://igp06.gameloft.com/layout/fullscreen/images/newIcons/expand_button.png">
<img id="collapse-image" src="https://igp06.gameloft.com/layout/fullscreen/images/newIcons/collapse_button.png" style="display: none;">
</div>
<div id="cancelWrapper">
<div class="title">
<div class="text">
Cancel Video?
</div>
</div>
<div class="body">
<div class="text">
Reward will not be given. Are you sure you want to cancel the video ad?
</div>
</div>
<div class="buttons">
<div id="cancelEndButton" class="end">
End
</div>
<div id="cancelResumeButton" class="resume">
Resume
</div>
</div>
</div>
<div id="video-loader">
<div id="video-loader-inner"></div>
</div>
<div id="counterContainer" style="display: none;">
<div id="counterNumber"></div>
<canvas id="counterCanvas" width="60" height="60"></canvas>
</div>
<div id="learn-more-wrapper"><div id="learn-more"><span>Learn More</span></div></div>
</div>
<div id="interstitial-areas"></div>
</div>
<div id="advertisement" onclick="redirectToInfo()"><img src="https://igp06.gameloft.com/layout/fullscreen/images/newIcons/info_button.png"> Advertisement</div>
<div id="errors"></div>
</div>
</div>
<div id="pixel-trackers" style="visibility:hidden;width:0;height:0;overflow:hidden;"></div>
<div id="log-trigger" style="display: none;">log</div>
<div id="log-clear" style="display: none;">clear</div>
<div id="log" style="display: none;"></div>
<div id="close">
<img src="https://igp06.gameloft.com/layout/fullscreen/images/newIcons/close_button.png">
</div>
<style>
#zoomStateNotificationContainer {
display: none;
position: absolute;
width: auto;
padding: 8px;
left: 50%;
transform: translate(-50%);
text-align: center;
top: 8%;
background-color: #00000061;
border-radius: 5px;
color: #fff;
font-family: sans-serif;
font-size: 2.2em;
z-index: 9;
}
#zoomBorder {
position: absolute;
z-index: 99999999999999;
display: none;
top: 0;
right: 0;
left: 0;
bottom: 0;
border: 2.2em solid #ffffff57;
}
body {
overflow: hidden;
}
@media (min-width:667px) and (orientation:landscape) {
#zoomStateNotificationContainer {
font-size: 1.9em;
}
}
</style>
<script type="text/javascript">
var PinchToZoom = function(video, touchArea, zoomStateNotificationContainer, zoomBorder)
{
var thisEnv = this;
var touchStart = {};
var touchMove = {};
var hypothenuseStart;
var hypothenuseEnd;
var expandibleDistance = 30; // measured in pixels, minimum distance between fingers pinch for expanding/collapsing
var stateMessage = {
zoomed : 'Zoom to fill',
notZoomed : 'Original'
};
this.zoomedIn = false;
this.videoEnded = false;
// set touch listeners
this.setListeners = function()
{
touchArea.addEventListener('touchstart', thisEnv.touchStartHandler);
touchArea.addEventListener('touchmove', thisEnv.touchMoveHandler);
};
this.touchStartHandler = function(event) {
if(event.touches.length != 2) return; //if we dont touch with 2 fingers, return
touchStart = {
fingerA: event.touches[0],
fingerB: event.touches[1]
};
hypothenuseStart = thisEnv.getTriangleHypothenuse(touchStart);
};
this.touchMoveHandler = function(event) {
if(event.touches.length != 2) return;
touchMove = {
fingerA: event.touches[0],
fingerB: event.touches[1]
};
hypothenuseEnd = thisEnv.getTriangleHypothenuse(touchMove);
if(hypothenuseEnd > hypothenuseStart + expandibleDistance) {
thisEnv.zoomIn();
} else if(hypothenuseStart > hypothenuseEnd + expandibleDistance) {
thisEnv.zoomOut();
} else {
}
};
this.touchEnd = function(event) {
};
this.getTriangleHypothenuse = function(touch) {
return Math.sqrt(
Math.pow((touch.fingerA.clientX - touch.fingerB.clientX), 2) + Math.pow((touch.fingerA.clientY - touch.fingerB.clientY), 2)
);
};
// show notification (original/zoomed in)
this.showZoomNotification = function(message) {
zoomStateNotificationContainer.innerHTML = message;
zoomStateNotificationContainer.setAttribute('style','display:block');
setTimeout(function(){
zoomStateNotificationContainer.setAttribute('style','display:none');
},800)
};
// show zoom border (youtube like)
this.showZoomBorder = function(){
zoomBorder.setAttribute('style','display:block');
setTimeout(function(){
zoomBorder.setAttribute('style','display:none');
},500)
}
this.zoomIn = function() {
if (thisEnv.videoEnded === true) return;
if (thisEnv.zoomedIn === false) {
video.setAttribute('style', 'height: auto');
thisEnv.zoomedIn = true;
thisEnv.showZoomNotification(stateMessage.zoomed);
thisEnv.showZoomBorder();
thisEnv.adaptOverlays('zoomIn');
}
};
this.zoomOut = function() {
if (thisEnv.zoomedIn === true) {
video.removeAttribute('style');
thisEnv.zoomedIn = false;
thisEnv.showZoomNotification(stateMessage.notZoomed);
thisEnv.adaptOverlays('zoomOut');
}
};
this.adaptOverlays = function(type) {
if (parseInt(creative_type_id) === 10) return;
switch (type) {
case 'zoomIn':
// set overlays right away (learn more button)
if (([55,56].indexOf(parseInt(creative_type_id)) > -1)) {
document.getElementById('learn-more').style.left = '0%';
// if VPAID
} else if (([49,61].indexOf(parseInt(creative_type_id)) > -1)) {
if (displayingLearnMoreButton && displayingLearnMoreButton == true) {
if (video.currentTime > 5) {
setVideoOverlayDims(getVideoDimensions(), getLearnMorePosition(encodedCTAAreas[0]));
}
}
try {
dlog('_____________________________Pinch ZOOM IN');
} catch (e) {
}
// if not VBAN
} else if (!([43,69].indexOf(parseInt(creative_type_id)) > -1)){
setVideoOverlayDims(getVideoDimensions());
}
break;
case 'zoomOut':
// set overlays right away (learn more button)
if (([55,56].indexOf(parseInt(creative_type_id)) > -1)) {
document.getElementById('learn-more').style.left = '';
// if VPAID
} else if (([49,61].indexOf(parseInt(creative_type_id)) > -1)) {
if (displayingLearnMoreButton && displayingLearnMoreButton == true) {
if (video.currentTime > 5) {
setVideoOverlayDims(getVideoDimensions(), getLearnMorePosition(encodedCTAAreas[0]));
}
}
try {
dlog('_____________________________Pinch ZOOM OUT');
} catch (e) {
}
// if not VBAN
} else if (!([43,69].indexOf(parseInt(creative_type_id)) > -1)) {
setVideoOverlayDims(getVideoDimensions());
}
break;
}
};
this.init = function(){
thisEnv.setListeners();
};
this.init();
}
</script>
<script type="text/javascript" src="https://ingameads.gameloft.com/un/web/fullscreen/js/v_interstitial_plus.js?ver=1691488677"></script>
<script type="text/javascript">
document.body.classList.add('os-' + os);
if(!showGlBtnClose)
document.getElementById('close').style.display = "none";
var log = document.getElementById('log');
function onWebViewFinishLoad(dataHolistic) {
if(window.hol_data){
return;
}
if(dataHolistic.location) {
rewardUrl += '&holistic_loc=' + dataHolistic.location;
strStatsUrl += '&holistic_loc=' + dataHolistic.location;
}
if(dataHolistic.uuid)
rewardUrl += '&holistic_uuid=' + dataHolistic.uuid;
}
function redirectToInfo() {
mraid.open(targetingInfoUrl);
}
function getVideoDimensions() {
return {
width: document.getElementById('video').videoWidth,
height: document.getElementById('video').videoHeight
}
}
function getCurrentTime() {
var date = new Date();
var hour = date.getHours();
var minute = date.getMinutes();
var second = date.getSeconds();
var millisecond = date.getMilliseconds();
return hour + ':' + minute + ':' + second + '.' + millisecond;
}
/* Mute Button */
function toggleMute() {
let videoObject = document.getElementById('video');
let muteButtonImg = document.getElementById('muteButtonImage');
switch (videoObject.muted) {
case true:
videoObject.muted = false;
muteButtonImg.src = 'https://igp06.gameloft.com/layout/fullscreen/images/newIcons/soundOn.png';
break;
case false:
videoObject.muted = true;
muteButtonImg.src = 'https://igp06.gameloft.com/layout/fullscreen/images/newIcons/soundOff.png';
break;
}
try {
if (typeof isViewabilityMoat != 'undefined' && isViewabilityMoat == '1') {
MoatApiReference.dispatchEvent({
'type' : 'AdVolumeChange',
'adVolume' : videoObject.muted ? 0 : 1
});
dlog('V-Interstitial-Plus: send AdVolumeChange to MOAT with adVolume = ' + (videoObject.muted ? 0 : 1));
}
} catch(e) {
}
}
function onPause() {
userCalledPause = true;
dlog(getCurrentTime() + ' -> ' + 'onPause called');
/*
* When user makes an interruption (home button tap, lock screen etc.)
* -- called by library team from client side --
*/
if(rewardSent && creative_type_id == vInterstitialPlusIV && !videoEnded) {
handleClose();
} else {
video.pause();
dispatchMoatEvent('AdPaused');
}
}
function onResume() {
dlog(getCurrentTime() + ' -> ' + 'onResume called');
/*
* When user comes back from an interruption (home button tap, lock screen etc.)
* -- called by library team from client side --
*/
if (!videoEnded) {
if(creative_type_id == vInterstitialPlusIV) {
video.pause();
cancelWrapper.style.display = 'block';
} else {
setTimeout(function(){
video.play();
playbtn.style.display = 'none';
}, 500);
}
}
if(interstitialOverlay.style.width != '100%') {
// adaptOverlay(ADorientation);
}
}
function onBackPressed() {
if(videoEnded || creative_type_id == vInterstitialPlusNonIV) {
handleClose();
} else {
onPause();
onResume();
}
}
function onVolumeChanged(volume) {
// dlog('Volume is ' + volume);
deviceSoundVolume = volume;
deviceVolume = deviceSoundVolume == '' ? 0 : deviceSoundVolume / 100;
}
/* Adding MOAT init function */
function dispatchMoatEvent(type) {
try {
if (isViewabilityMoat == '1') {
MoatApiReference.dispatchEvent({
'type' : type,
'adVolume' : video.muted ? 0 : 1
});
dlog('V-Interstitial-Plus: Video is ' + (video.muted ? "muted" : "not muted"));
dlog('V-Interstitial-Plus: should send ' + type + ' to MOAT! Video volume: ' + (video.muted ? 0 : 1));
}
} catch(e) {
// dlog('MOAT ' + type + ' failed! ' + e);
console.log('MOAT ' + type + ' failed! ' + e);
}
}
function initMOAT() {
try {
function initMoatTracking(a,c,d,h,k){var f=document.createElement("script"),b=[];c={adData:{ids:c,duration:d,url:k},dispatchEvent:function(a){console.log('MOAT dispatch event function is running!');this.sendEvent?(b&&(b.push(a),a=b,b=!1),this.sendEvent(a)):b.push(a)}};d="_moatApi"+Math.floor(1E8*Math.random());var e,g;try{e=a.ownerDocument,g=e.defaultView||e.parentWindow}catch(l){e=document,g=window}g[d]=c;f.type="text/javascript";a&&a.insertBefore(f,a.childNodes[0]||null);f.src="https://z.moatads.com/"+h+"/moatvideo.js#"+d;return c};
var ids = {
'level1': '175106',
'level2': '170154',
'level3': '22770',
'level4': '',
'slicer1': 'Asphalt_8',
'slicer2': ''
}
console.log('MOAT has been initialized');
// dlog('MOAT has been initialized');
window.MoatApiReference = initMoatTracking(video, ids, video.duration, 'gameloftjsvideoint978229678926', videoSrc);
} catch(e) {
console.log('MOAT init failed! ' + e);
// dlog('MOAT init failed! ' + e);
}
}
function addAVID() {
try {
if(avidJavascriptResource != '') {
var avidJsResource = document.createElement('script');
avidJsResource.setAttribute('type','text/javascript');
avidJsResource.setAttribute('onload','dlog(avidJavascriptResource + \': loaded\')');
avidJsResource.setAttribute('src', avidJavascriptResource);
document.body.appendChild(avidJsResource);
}
var fileref = document.createElement('script');
fileref.setAttribute('type','text/javascript');
fileref.setAttribute('src', 'https://pixel.adsafeprotected.com/jload?anId=930925&campId=175106&pubId=Asphalt_8&chanId=ios&placementId=170154');
document.body.appendChild(fileref);
var avidCheckInterval = setInterval(function(){
if(typeof window.avid == 'object' && typeof window.avid.getHtmlVideoAvidAdSessionListener == 'function') {
clearInterval(avidCheckInterval);
function handleAVIDready() {
avid_ready = 1;
// dlog('avid_ready: ' + avid_ready);
}
for(x in window.avid) {
// dlog(x + ':' + window.avid[x]);
}
window.avid.addEventListener('ready', handleAVIDready);
if (avid_ready == 1) {
try {
htmlVideoAvidAdSessionListener = window.avid.getHtmlVideoAvidAdSessionListener();
htmlVideoAvidAdSessionListener.startTrackingVideoPlayer(video);
for(y in htmlVideoAvidAdSessionListener) {
// dlog(y + ':' + typeof htmlVideoAvidAdSessionListener[y]);
}
avid_startTracking = 1;
} catch(e) {
// dlog('275 avid error: ' + e)
}
}
if (avid_ready == 1 && avid_startTracking == 1) {
try {
htmlVideoAvidAdSessionListener.recordAdImpressionEvent();
console.log('AVID impression made');
// dlog('AVID impression made');
} catch(e) {
console.log(e);
// dlog('287 avid error: ' + e);
}
}
}
},200);
} catch(e) {
console.log(e);
// dlog('294 avid error: ' + e);
}
}
</script>
</body>
</html>