if (!videostrip) {
var videostrip = {};
}
// we don't want to be in an iframe, because the companions are in the parent
videostrip.bInIframe = false;
videostrip.window = self;
videostrip.document = videostrip.window.document;
try {
videostrip.bInIframe = (self.frameElement.src == "about:blank");
if (videostrip.bInIframe) {
videostrip.window = parent;
videostrip.original_window = self;
videostrip.document = videostrip.window.document;
} else {
videostrip.window = self;
videostrip.original_window = self;
videostrip.document = videostrip.window.document;
}
} catch(e) {
videostrip.bInIframe = false;
videostrip.window = self;
videostrip.original_window = self;
videostrip.document = videostrip.window.document;
}
if (!videostrip.window.videostrip) {
videostrip.window.videostrip = {};
}
// player size
if ("0" == '1') {
var e = videostrip.window;
var a = 'inner';
if (!('innerWidth' in videostrip.window)) {
e = videostrip.document.documentElement || videostrip.document.body;
a = 'client';
}
videostrip.window.videostrip.playerWidth = e[a + 'Width'];
videostrip.window.videostrip.playerHeight = e[a + 'Height'];
} else {
videostrip.window.videostrip.playerWidth = '468';
videostrip.window.videostrip.playerHeight = '352';
}
videostrip.window.videostrip.PreloaderCallbackOnStart = null;
try {
if (typeof videostrip.original_window.PreloaderCallbackOnStart == "function") {
videostrip.window.videostrip.PreloaderCallbackOnStart = videostrip.original_window.PreloaderCallbackOnStart;
} else if (typeof videostrip.window.PreloaderCallbackOnStart == "function") {
videostrip.window.videostrip.PreloaderCallbackOnStart = videostrip.window.PreloaderCallbackOnStart;
} else if (typeof videostrip.window.parent.PreloaderCallbackOnStart == "function") {
videostrip.window.videostrip.PreloaderCallbackOnStart = videostrip.window.parent.PreloaderCallbackOnStart;
}
} catch (e) {
}
videostrip.window.videostrip.PreloaderCallbackAfter = null;
try {
if (typeof videostrip.original_window.PreloaderCallbackAfter == "function") {
videostrip.window.videostrip.PreloaderCallbackAfter = videostrip.original_window.PreloaderCallbackAfter;
} else if (typeof videostrip.window.PreloaderCallbackAfter == "function") {
videostrip.window.videostrip.PreloaderCallbackAfter = videostrip.window.PreloaderCallbackAfter;
} else if (typeof videostrip.window.parent.PreloaderCallbackAfter == "function") {
videostrip.window.videostrip.PreloaderCallbackAfter = videostrip.window.parent.PreloaderCallbackAfter;
} else if ("15439688" == "15439698") {
videostrip.window.videostrip.PreloaderCallbackAfter = function() {
try {
$.spiPreloaderNeoEdge(-1)('AD_COMPLETED');
} catch (e) {
}
}
}
} catch (e) {
}
// we're here, let our initiator know so they won't cancel the player load
try {
if (videostrip.window.videostrip.PreloaderCallbackOnStart) {
videostrip.window.videostrip.PreloaderCallbackOnStart();
}
}
catch (e) {
}
// create or show the div holding the player
if (videostrip.document.getElementById("player_1092396297") !== null) {
videostrip.document.getElementById("player_1092396297").style.display = "block";
} else {
if (videostrip.bInIframe) {
videostrip.playerElement = videostrip.document.createElement('div');
videostrip.playerElement.id = "player_1092396297";
videostrip.playerElement.style.width = videostrip.window.videostrip.playerWidth + "px";
videostrip.playerElement.style.height = videostrip.window.videostrip.playerHeight + "px";
videostrip.playerElement.style.position = "relative";
self.frameElement.parentNode.insertBefore(videostrip.playerElement, self.frameElement);
self.frameElement.style.display = "none";
} else {
var playerdiv = '[[@@wrappee@@]]'.replace('[[@@wrappee@@]]', '
');
try {
videostrip.document.write(playerdiv);
} catch (e) {
var currentScript = null;
var scripts = videostrip.document.getElementsByTagName('script');
for (var p in scripts) {
if (scripts[p].src == "http://load01.videostrip.com/serve_cad.php?play_key=23940218&url=http://cdn1.filmpjes.nl/vf/filmpjes/X_WCjKRqK9f/1.flv&categories=dieren") {
currentScript = scripts[p];
break;
}
}
if (currentScript) {
var scriptParent = currentScript.parentElement;
if (scriptParent) {
var containerDiv = videostrip.document.createElement("div");
containerDiv.style.backgroundColor = "transparent";
containerDiv.id = "vs_preroll_holder";
var playerDiv = videostrip.document.createElement("div");
playerDiv.id = "player_1092396297";
playerDiv.style.width = videostrip.window.videostrip.playerWidth + "px";
playerDiv.style.height = videostrip.window.videostrip.playerHeight + "px";
playerDiv.style.position = "relative";
playerDiv.style.clear = "both";
containerDiv.appendChild(playerDiv);
scriptParent.appendChild(containerDiv);
}
}
}
}
}
if (videostrip.window.videostrip.PreloaderCallbackAfter) {
videostrip.window.onLinearAdFinish = function(ad) {
if (videostrip.window.onLinearAdFinishDone) {
return;
}
videostrip.window.onLinearAdFinishDone = true;
setTimeout(function() {
try {
if (videostrip.document.getElementById("player_1092396297") !== null) {
videostrip.document.getElementById("player_1092396297").style.display = "none";
}
videostrip.window.videostrip.PreloaderCallbackAfter('AD');
} catch (e) {
}
}, 2000);
};
videostrip.window.onVPAIDAdComplete = videostrip.window.onLinearAdFinish;
videostrip.window.onVPAIDAdUserClose = videostrip.window.onLinearAdFinish;
}
videostrip.window.onVASTLoadSuccess = function(templateData) {
if (/^]*>\s*<\/vast>$/im.test(templateData) || templateData == '' || templateData.indexOf('') >= 0) {
if ("false" == "true") {
// get the element that holds the player
var bannerElement = videostrip.document.getElementById("player_1092396297");
if (!bannerElement) {
return;
}
if (bannerElement.hasChildNodes()) {
while (bannerElement.childNodes.length >= 1) {
bannerElement.removeChild(bannerElement.firstChild);
}
}
// add an iframe element to it
var iframeElement = videostrip.document.createElement('iframe');
iframeElement.setAttribute('frameBorder', 0);
iframeElement.setAttribute('scrolling', 'no');
iframeElement.setAttribute('allowTransparency', true);
iframeElement.setAttribute('width', videostrip.window.videostrip.playerWidth);
iframeElement.setAttribute('height', videostrip.window.videostrip.playerHeight);
bannerElement.appendChild(iframeElement);
// put the backup tag in the iframe
var html = '';
html += '';
html += '';
html += '';
html += '';
iframeElement.contentWindow.document.open('text/html', 'replace');
iframeElement.contentWindow.document.write(html);
setTimeout(function() { iframeElement.contentWindow.document.close(); }, 2000);
} else if (videostrip.window.videostrip.PreloaderCallbackAfter) {
try {
if (videostrip.document.getElementById("player_1092396297") !== null) {
videostrip.document.getElementById("player_1092396297").style.display = "none";
}
videostrip.window.videostrip.PreloaderCallbackAfter('NOAD');
} catch (e) {
}
}
}
};
videostrip.window.onVASTLoadFailure = videostrip.window.onVASTLoadSuccess;
videostrip.window.onVASTLoadTimeout = videostrip.window.onVASTLoadSuccess;
// new names :(
videostrip.window.onTemplateLoadSuccess = videostrip.window.onVASTLoadSuccess;
videostrip.window.onTemplateLoadFailure = videostrip.window.onVASTLoadFailure;
videostrip.window.onTemplateLoadTimeout = videostrip.window.onVASTLoadTimeout;
videostrip.window.ova = {};
videostrip.window.ova.writeCompanion = function(id, content) {
// unfortunately, the OVA plugin did not send us clickthrough url and content separately. no problem, though.
var clickthrough = null;
var realContent = null;
var matches = content.match(/^(.+)<\/a>$/i);
if (matches != null) {
clickthrough = matches[1];
realContent = matches[2];
} else {
clickthrough = "";
realContent = content;
}
// make sure the element to place the companion in exists
var bannerElement = videostrip.document.getElementById(id);
if (!bannerElement) {
return;
}
// find the size of the companion banner
var companion = null;
for (var i=0; i= 1) {
bannerElement.removeChild(bannerElement.firstChild);
}
}
// create the iframe that will hold the companion
var iframeElement = videostrip.document.createElement("iframe");
iframeElement.setAttribute("frameBorder", 0);
iframeElement.setAttribute("scrolling", "no");
iframeElement.setAttribute("allowTransparency", true);
iframeElement.setAttribute("width", companion.width);
iframeElement.setAttribute("height", companion.height);
bannerElement.appendChild(iframeElement);
// now add the companion banner to the iframe
var html = '';
html += '';
html += '';
html += '';
// add the click handler
if (clickthrough != "") {
var clickHandler = function(e) {
e.preventDefault();
videostrip.window.open(clickthrough);
};
if (videostrip.document.addEventListener) {
iframeElement.addEventListener('click', clickHandler, true);
} else if (videostrip.document.attachEvent) {
iframeElement.attachEvent('onclick', clickHandler);
} else {
iframeElement.onclick = clickHandler;
}
html += '';
}
html += realContent;
html += '';
html += '';
iframeElement.contentWindow.document.open("text/html", "replace");
iframeElement.contentWindow.document.write(html);
// close the document, but not immediately
setTimeout(function() { iframeElement.contentWindow.document.close(); }, 2000);
};
videostrip.window.videostrip.onFlowPlayerLoad = function() {
videostrip.window.videostrip.playerSrc = {
"src": "http://assets.videostrip.com/player/foreign/videostrip_flow/flowplayer.unlimited-3.2.7.swf",
"wmode": 'opaque'
};
videostrip.window.videostrip.companions = [
{
"id": "vs_a2s_tag_fullsize",
"width": "468",
"height": "60"
},
{
"id": "vs_a2s_tag_rectangle",
"width": "300",
"height": "250"
},
{
"id": "vs_a2s_tag_skyradio",
"width": "320",
"height": "60"
},
{
"id": "vs_a2s_tag_skyradiowide",
"width": "380",
"height": "60"
},
{
"id": "vs_a2s_tag_skyradiosmall",
"width": "160",
"height": "60"
}
];
videostrip.window.videostrip.playerConfig = {
"key": "",
"clip": {
"ipadUrl": "http://cdn1.filmpjes.nl/vf/filmpjes/X_WCjKRqK9f/1.flv",
"onBegin": function(){
this.setVolume('100');
},
"autoBuffering": false,
"bufferLength": 0
},
"canvas": {
"backgroundColor": '#000000',
"backgroundGradient": 'none'
},
"play": { "opacity": '1' },
"plugins": {
"rtmp": {
"url": "http://assets.videostrip.com/player/foreign/videostrip_flow/flowplayer.rtmp-3.2.3.swf"
},
"rtmpInstream": {
"url": "http://assets.videostrip.com/player/foreign/videostrip_flow/flowplayer.rtmp-3.2.3.swf"
},
"controls": { "url": "http://assets.videostrip.com/player/foreign/videostrip_flow/flowplayer.controls-3.2.5.swf" },
"openAdStreamer": {
"shows": {
"streams": [
{
"file": "http://cdn1.filmpjes.nl/vf/filmpjes/X_WCjKRqK9f/1.flv",
"player": {
"scaling": "fit"
}
}
]
},
"url": "http://assets.videostrip.com/player/foreign/videostrip_flow/ova060_20111111_vs/ova.swf",
"delayAdRequestUntilPlay": true,
"autoPlay": true,
"overlays": {
"regions": [{
"id": "bottom",
"verticalAlign": "bottom",
"horizontalAlign": "center",
"backgroundColor": "transparent",
"showCloseButton": "false",
"opacity": "1.0",
"width": videostrip.window.videostrip.playerWidth,
"height": videostrip.window.videostrip.playerHeight
}]
},
"ads": {
"vpaid": {
"controls": {
"hideOnLinearPlayback": "true"
}
},
"disableControls": true,
"pauseOnClickThrough": "true",
"notice": { "type": "countdown" },
"setDurationFromMetaData": true,
"enforceLinearInteractiveAdScaling": true,
"enforceLinearVideoAdScaling": true,
"servers": [{
"type": "direct",
"apiAddress": "http://admatcher.videostrip.com/",
"requestTemplate": "__api-address__?__params__",
"customProperties": {
"params": ["format=mp4,vpaidswf", "fmt=vast20", "puid=23940218", "categories=dieren", "host=" + escape(self.location.href), "tzd=" + (new Date).getTimezoneOffset()]
},
"oneAdPerRequest": "false"
}],
"restoreCompanions": "false",
"companions": videostrip.window.videostrip.companions,
"processCompanionsExternally": true,
"schedule": [
{ "position": "pre-roll" }
]
},
"debug": {
"debugger": "firebug",
"levels": "none"
}
}
}
};
videostrip.window.onLinearAdFinishDone = false;
if ("true" == "false") {
videostrip.window.videostrip.showSplash();
} else {
videostrip.window.videostrip.showFlowPlayer();
}
};
videostrip.window.videostrip.showFlowPlayer = function(){
videostrip.window.videostrip.playerConfig.onFinish = function(video) {
if ("true" == "false") {
if (!video.ovaAd) {
videostrip.window.videostrip.showSplash();
}
}
}
if (videostrip.window.videostrip.currentFlowPlayer) {
delete videostrip.window.videostrip.currentFlowPlayer;
videostrip.window.videostrip.currentFlowPlayer = null;
var container = videostrip.document.getElementById("player_1092396297");
container.innerHTML = '';
}
videostrip.window.videostrip.currentFlowPlayer = videostrip.window.flowplayer("player_1092396297", videostrip.window.videostrip.playerSrc, videostrip.window.videostrip.playerConfig).ipad();
}
videostrip.window.videostrip.showSplash = function() {
var container = videostrip.document.getElementById("player_1092396297");
container.innerHTML = '';
var image_splash = videostrip.document.createElement("img");
image_splash.src = "[[@@still_url@@]]".replace(/dynamicplayerwidth/, videostrip.window.videostrip.playerWidth).replace(/dynamicplayerheight/, videostrip.window.videostrip.playerHeight);
var image_play = videostrip.document.createElement("img");
image_play.style.position = "absolute";
image_play.style.left = "0px";
image_play.style.top = "0px";
image_play.style.marginLeft = Math.floor(((videostrip.window.videostrip.playerWidth - 82) / 2)) + "px";
image_play.style.marginTop = Math.floor(((videostrip.window.videostrip.playerHeight - 83) / 2)) + "px";
image_play.src = "http://assets.videostrip.com/player/foreign/videostrip_flow/play.png";
// image_play.onmouseover = function () {
//
// image_play.src = "http://assets.videostrip.com/player/foreign/videostrip_flow/play_hover.png";
// }
// image_play.onmouseout = function () {
//
// image_play.src = "http://assets.videostrip.com/player/foreign/videostrip_flow/play.png";
// }
clicker = function(){
container.innerHTML = '';
videostrip.window.videostrip.showFlowPlayer();
};
image_splash.onclick = clicker;
image_play.onclick = clicker;
container.appendChild(image_splash);
container.appendChild(image_play);
};
// add the flowplayer script to the page
if (!videostrip.window.flowplayer) {
videostrip.head = videostrip.document.getElementsByTagName('head')[0];
videostrip.scriptElement = videostrip.document.createElement('script');
videostrip.scriptElement.type = "text/javascript";
videostrip.scriptElement.src = "http://assets.videostrip.com/player/foreign/videostrip_flow/flowplayer-3.2.6.min.js";
videostrip.head.appendChild(videostrip.scriptElement);
} else {
videostrip.window.videostrip.onFlowPlayerLoad()
}