var loadAds = function(parentElement) {
var options = document.createElement(‘script’);
options.innerHTML = “var exoOpts = { ” +
” cat: ‘2’, ” +
” idzone_300x250: ”, ” +
” preroll: {}, ” +
” pause: {}, ” +
” postroll: {}, ” +
” show_thumb: ‘1’ ” +
“}; ” ; //Quotes, and semi-colon is not necessary here ***
var script = document.createElement(‘script’);
script.setAttribute(‘type’, ‘text/javascript’);
script.setAttribute(‘src’, ‘https://a.exosrv.com/invideo.js’);
parentElement.appendChild(options);
parentElement.appendChild(script);
};
function skipad() {
fluidPlayerClass.getInstanceById(‘fp-core-video-2’).pressSkipButton();
}
function skiplater() {
}
var fluidPlayerPlugin2 = function() {
var fpVideo2 = fluidPlayer(‘fp-core-video-2’ , {
vastOptions: {
“adList”: [
{
“vAlign” : “bottom”,
“roll” : “preRoll”,
“vastTag” : “https://s.magsrv.com/splash.php?idzone=4768896”
},
{
“roll”: “preRoll”,
“vastTag”: “”
},
{
“roll”: “midRoll”,
“vastTag”: “”,
“timer”: 8
},
{
“roll”: “midRoll”,
“vastTag”: “”,
“timer”: 10
},
{
“roll”: “postRoll”,
“vastTag”: “”
}
],
adText: ‘Skipping ad in 5 seconds’,
adTextPosition: ‘top left’,
adCTAText: false,
adCTATextPosition: ‘bottom right’,
maxAllowedVastTagRedirects: 1,
adClickable: false, // Default true
skipButtonCaption: ‘Wait [seconds] more second(s)’,
skipButtonClickCaption: ‘Skip Ad‘,
vastAdvanced: {
vastLoadedCallback: (function() { skiplater(); }),
noVastVideoCallback: (function() { console.log(“no vast”) }),
vastVideoSkippedCallback: (function() { console.log(“skipped ad”) }),
vastVideoEndedCallback: (function() { console.log(“vast ended”) })
},
},
layoutControls: {
logo: {
imageUrl: ”, // Default null
position: ”, // Default ‘top left’
clickUrl: null,
opacity: ”, // Default 1
mouseOverImageUrl: null, // Default null
imageMargin: ’10px’, // Default ‘2px’
hideWithControls: true, // Default false
showOverAds: ‘false’, // Default false
},
},
}
);
};
(function defer() {
var should_load_fluidplayer = true;
if (typeof(fluidPlayer) != ‘undefined’ && should_load_fluidplayer) {
fluidPlayerPlugin2();
loadAds(document.getElementById(‘fp-core-div-2’));
} else {
setTimeout(defer, 50);
}
})();