[ad_1]
Some of the links in this article may be affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. Thank you.
After coming in second at the Spartan World Championship, finishing at the top of the pack at the Spartan Trifecta World Championships, he now plans to run over 100 miles to win $1 million at the Spartan Ultra World Championship in Sweden.
function videoLoadCallback () {
var playerInstance = jwplayer(“botr_tbqY9jIl_c3hsSMRd_div”);
setTimeout(function(){
playerInstance.setup({
playlist: “//content.jwplatform.com/feeds/tbqY9jIl.json”,
image: “//content.jwplatform.com/thumbs/tbqY9jIl-720.jpg”,
ph: 2,
advertising: {
“admessage”: “This video will resume in xx seconds”,
“client”: “googima”,
“cuetext”: “Advertisement”,
“skipmessage”: “Skip ad in xx seconds”,
“vpaidmode”: “insecure”
},
plugins: {
“https://ovp.iris.tv/plugins/jwplayer/v2/iris-jwplayer8.adaptive.min.js”: {
settings: {
player_id: “botr_tbqY9jIl_c3hsSMRd_div”,
client_token: ‘ER0ZY06XV3YJHK0’,
platform_id: “tbqY9jIl”,
player_version: ‘jwplayer8’,
ssl: true,
end_up_next: true,
disable_mobile_upnext: false,
campaign_tracking: true
},
global: “iris”,
jwCMS: true,
iris_buttons: {
‘thumbs_up’: false,
‘thumbs_down’: false,
‘skip_forward’: false,
‘skip_back’: false,
‘skip_on_thumbs_down’: false
}
}
}
}).once(“play”, function(){
var playerInstance = jwplayer(“botr_tbqY9jIl_c3hsSMRd_div”);
loadIrisPlugin(playerInstance, playerInstance.getConfig().plugins[“https://ovp.iris.tv/plugins/jwplayer/v2/iris-jwplayer8.adaptive.min.js”])
}).on(‘adsManager’, function (e) {
let chanIdVal = ”;
let jwpDef = jwplayer.defaults || {};
if (jwpDef.advertising) {
if (jwpDef.advertising.schedule) {
for (let j in jwpDef.advertising.schedule) {
if (jwpDef.advertising.schedule[j].tag) {
let parts = jwpDef.advertising.schedule[j].tag.split(‘iu=’);
if (2 == parts.length) {
chanIdVal = parts[1];
chanIdVal = chanIdVal.split(‘&’);
chanIdVal = chanIdVal[0];
break;
}
}
}
}
}
const {adsManager, videoElement} = e;
const iasConfig = {
anId: ‘928572’,
campId: `${jwplayer().getWidth()}x${jwplayer().getHeight()}`, // This is dynamic based on player dimensions, but can be hard coded
chanId: chanIdVal,
placementId: ‘Open Auction’,
pubOrder: ‘Video’,
pubId: ‘Direct’
};
if (googleImaVansAdapter) {
googleImaVansAdapter.init(window.google, adsManager, videoElement, iasConfig);
}
}).on(‘beforePlay’, function (e) {
var videoItem = this.getPlaylistItem();
if (typeof window.jwPlayedVideos[videoItem.mediaid] === ‘undefined’) {
window.jwPlayedVideos[videoItem.mediaid] = true;
try {
if (jwDefaults.advertising && jwDefaults.advertising.schedule[0].tag) {
window.jwVastTag = jwDefaults.advertising.schedule[0].tag;
}
} catch ( e ) {}
apstag.fetchBids({
slots: [{
slotID: ‘56226737’,
mediaType: ‘video’
}]
}, function (bids) {
if (bids.length > 0) { //If we have received any bids back
try {
jwplayer(“botr_tbqY9jIl_c3hsSMRd_div”).playAd(window.jwVastTag + “&scp=” + bids[0].encodedQsParams);
} catch (e) {
console.log(e);
}
} else {
jwplayer(“botr_tbqY9jIl_c3hsSMRd_div”).playAd(window.jwVastTag);
}
});
}
});
}, 1000);
}
var script = document.createElement(“script”);
script.type = “text/javascript”;
script.onload = videoLoadCallback;
script.async = true;
script.src = “http://content.jwplatform.com/libraries/c3hsSMRd.js”;
document.getElementsByTagName(“head”)[0].appendChild(script);
[ad_2]
Source link