Skip to content

Instantly share code, notes, and snippets.

@ramazansancar
Last active July 7, 2024 14:13
Show Gist options
  • Save ramazansancar/6c4f57c8a1285a5a98ef89164665cbd4 to your computer and use it in GitHub Desktop.
Save ramazansancar/6c4f57c8a1285a5a98ef89164665cbd4 to your computer and use it in GitHub Desktop.
http://oxax.tv/ JS Cripted Algoritm Decode (JS Wise) (Encryted here: http://oxax.tv/p_n_old.js) UnPacker: https://matthewfl.com/unPacker.html
var o = {
y = "xx???x=xx?xx?="
}
var abc = String.fromCharCode(65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122);
var dechar = function (x) {
return String.fromCharCode(x)
};
var salt = {
_keyStr: abc + "0123456789+/=",
e: function (e) {
var t = "";
var n, r, i, s, o, u, a;
var f = 0;
e = salt._ue(e);
while (f < e.length) {
n = e.charCodeAt(f++);
r = e.charCodeAt(f++);
i = e.charCodeAt(f++);
s = n >> 2;
o = (n & 3) << 4 | r >> 4;
u = (r & 15) << 2 | i >> 6;
a = i & 63;
if (isNaN(r)) {
u = a = 64
} else if (isNaN(i)) {
a = 64
}
t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a)
}
return t
},
d: function (e) {
var t = "";
var n, r, i;
var s, o, u, a;
var f = 0;
e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (f < e.length) {
s = this._keyStr.indexOf(e.charAt(f++));
o = this._keyStr.indexOf(e.charAt(f++));
u = this._keyStr.indexOf(e.charAt(f++));
a = this._keyStr.indexOf(e.charAt(f++));
n = s << 2 | o >> 4;
r = (o & 15) << 4 | u >> 2;
i = (u & 3) << 6 | a;
t = t + dechar(n);
if (u != 64) {
t = t + dechar(r)
}
if (a != 64) {
t = t + dechar(i)
}
}
t = salt._ud(t);
return t
},
_ue: function (e) {
e = e.replace(/\r\n/g, "\n");
var t = "";
for (var n = 0; n < e.length; n++) {
var r = e.charCodeAt(n);
if (r < 128) {
t += dechar(r)
} else if (r > 127 && r < 2048) {
t += dechar(r >> 6 | 192);
t += dechar(r & 63 | 128)
} else {
t += dechar(r >> 12 | 224);
t += dechar(r >> 6 & 63 | 128);
t += dechar(r & 63 | 128)
}
}
return t
},
_ud: function (e) {
var t = "";
var n = 0;
var r = 0;
var c1 = 0;
var c2 = 0;
while (n < e.length) {
r = e.charCodeAt(n);
if (r < 128) {
t += dechar(r);
n++
} else if (r > 191 && r < 224) {
c2 = e.charCodeAt(n + 1);
t += dechar((r & 31) << 6 | c2 & 63);
n += 2
} else {
c2 = e.charCodeAt(n + 1);
c3 = e.charCodeAt(n + 2);
t += dechar((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
n += 3
}
}
return t
}
};
var sugar = function (x) {
x = x.split(dechar(61));
var result = '';
var c1 = dechar(120);
var chr;
for (var i in x) {
if (x.hasOwnProperty(i)) {
var encoded = '';
for (var j in x[i]) {
if (x[i].hasOwnProperty(j)) {
encoded += (x[i][j] == c1) ? dechar(49) : dechar(48)
}
}
chr = parseInt(encoded, 2);
result += dechar(chr.toString(10))
}
}
return result.substr(0, result.length - 1)
};
var pepper = function (s, n) {
s = s.replace(/\+/g, "#");
s = s.replace(/#/g, "+");
var a = sugar(o.y) * n;
if (n < 0) a += abc.length / 2;
var r = abc.substr(a * 2) + abc.substr(0, a * 2);
return s.replace(/[A-Za-z]/g, function (c) {
return r.charAt(abc.indexOf(c))
})
};
var decode = function (x) {
if (x.substr(0, 2) == "#1") {
return salt.d(pepper(x.substr(2), -1))
} else if (x.substr(0, 2) == "#0") {
return salt.d(x.substr(2))
} else {
return x
}
};
var w = '8302f3x3b3q1v3s241d391g2734133x29162u2y251b3x293u0x3u1f1g1g1e1o293u1q25292u1q251g1d3q292u2y2514293t133o282e2q1b393u331f3q0f152e3z1s391b3x3q182y14163q0w2q3u3b30372o3b372s1v3s241t3y1t232d25241t1d1r1g27292b3r371e1o2729133x291t1b2922163q0t3q2c1q251w3d3u1o253f293h1t0q1g1t3a391d2b3t38141829141o212g3w1u3y2t1o14353u1i142q3s3y3b383q2o251y2u2v1b16163b1y2u2v2b3r37191y2u2v1b161a1t3b141i252b3t3814161h2q112q2434133u0b2y3514192419393b1h3b3t38142u2r2z161d1g193u3u371i1o1y2u2v15341q1w372n1o1w251o251q163u373o251q341g1q3y382q37391o29331y1d232d252t161d3b3x37142v3b3t38141616361d3a391d232d25241o1d3a391d3b3t3814161i1d3a391g1y1y3y3f3b163b29331f392d163u373b3x3q2815381t2425151o373q01233b3y181x38393539111g253y353k2b263y1d18211y1g3k2b3u311w253k2b3u3118363q37182d393b3m1s341s25183k2k251m141e1o18211527212q3a1i3i2v0w1u28143y383m1g3w1f2d142y3x373x142804363b221f3b281d3b29331y392q3e25142s243b2817371o212g353q3o3q19282e26242h251o3o';
var i = '77e9a728222o313w351c343o013q2a1o231u3d3s1m253r133v27121d1d1b143r163x3s3r1u3v3u161m273r1w3b3s1m1r1d3p3a3o3b3u3m2616222q193v122o2739301m253f393z33121b3v1t361234173s3d221q23313w331g231w2s2t1o123d14143q0r1r38371a143o0r1o2c1o23342s2y23193v313u0v3s192722142t271r3h393w142o1826331r212d23221r1b163s3s3212353s142o2b27223m1r22293122313s2v293r3612141b32293r381r38371b2b3r3612141r1q122l1m2v1r212b23141b3r123q2x3711113v2w3326121w1b2612243b232b231d2b19321o142o3a15383m343b3r3612371q1q173s123q2f342t3o1435383g2t3q11143927331d372b143u353m231w2u2t1w121o1g2534121w1d212b23221d363o1626351w2s2t1i163o1626331d212b23221o3o1626331o232b371236322q2239282s3315383i25392a2927232q2s391622193v0w081e23392633322533142v2b37392k2t1e231o3i2b24393k35342o2f392k373236351b15321s2616212230241q34393k1q32141612163i2b3s3z1u352o3g3w1w113y3337312c1622121a0v3q361535161t1v1c193r3q193o3o122s2239333d393z1m1o3w382o3w32143u3s26193724223o3b3s152r3z343g';
var s = '8f3ef2w132t2a2731371f3b3v3a3s0x3u192720163q0b3o2a1q251b1818141d3927271d3b272714163t1b39272216393o27341b37331c3q3b2q3r3m273q3z3s2624143o0d1d3529171m252q212m193o3a1f1t3w2v2a2931242t2b3t36121629141b393v3q1826331b1b3x3d3s0v3u291u3b3s1o2727113v29162s2w231y1t1p3132201e3r293p37191w2s2t1o143d141g3831232b25241t1s3w2r3i3b1z2o221x39201w1r232d23151p1g1t212b231828331r212d2512141c2q1t123w131y2u2t191p3h1q322z3616152a2s1b1t1112143s351t3f1w2s2v1p1a1n261q163u352m29333g1b212d2535141b2q3a121b1v1d1y1b121e29331w1b1234342q2239282u3315383i2v393r36142n1o143o083q1m231w2u2v1i1p1e373b3p35393t3812141b3b3r35171w2u2v1i143b3b3r35142t0u2813131e1q3y362o35391o27313o0813253o3s2u3t12341t35273v3v342v3b2o2a253u3e343w1s28182z1w142v3q393k2r382113253z1x182z132531361m1237153y333i2i251m1230162124302l143824393k35343o173s3g3i25212b3735243i243z252u2v30210y34023912181o1d313m1b391m1o3w38123c2625163b27311d3937331g363z14262z2r1b39331m3o221d1g1';
var e = 'b926bf356482879c82b1372fdb23bed8';
var first = 0;
var second = 0;
var third = 0;
var forth = [];
var fiveth = [];
while (true) {
if (first < 5) fiveth.push(w.charAt(first));
else if (first < w.length) forth.push(w.charAt(first));
first++;
if (second < 5) fiveth.push(i.charAt(second));
else if (second < i.length) forth.push(i.charAt(second));
second++;
if (third < 5) fiveth.push(s.charAt(third));
else if (third < s.length) forth.push(s.charAt(third));
third++;
if (w.length + i.length + s.length + e.length == forth.length + fiveth.length + e.length) break
}
var lI1l = forth.join('');
var eighth = fiveth.join('');
second = 0;
var sixth = [];
for (first = 0; first < forth.length; first += 2) {
var seventh = -1;
if (eighth.charCodeAt(second) % 2) seventh = 1;
sixth.push(String.fromCharCode(parseInt(lI1l.substr(first, 2), 36) - seventh));
second++;
if (second >= fiveth.length) second = 0
}
console.log(sixth.join(''))
var oldXHROpen = window.XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function (method, url, async, user, password) {
const args = arguments;
args[1] = url.includes('plrjs.org') ? '' : url;
return oldXHROpen.apply(this, args);
};
// p_n_old.js
if (!window.pljssglobal) {
var pljssglobal = [];
var pljssglobalid
}
if (window['PlayerjsAsync']) {
setTimeout(PlayerjsAsync, 1)
};
function Playerjs(options) {
var o = {
play: false,
audiosrc: [],
audioctx: [],
playerid: 'r2cxzl7wj2lb',
default_w: 640,
default_h: 360,
version: '18.44',
compilation: ['HLS', 'VASTP'],
compilations: '',
fullscreen: false,
realfullscreen: false,
nativecontrols: false,
fullwheel: false,
fullscreen_start: false,
airplay: false,
pipwebkit: false,
ispipkit: false,
u: {
"screencolor": "000000",
"toolbar": {
"color": "000000",
"hide": 1,
"margin": "-20 0 0 0",
"gradient": 1,
"animation": "alpha",
"a": "0",
"h": 40,
"clickarea": 0
},
"control_title": {
"order": 1,
"on": 1,
"action": "title",
"type": "text",
"position": "top-left",
"click": 0,
"hand": 0,
"text": "",
"var": "title",
"hide": 1,
"hideonplay": 1,
"animation": "position",
"bg": 1,
"bga": 0.4,
"bgpadding": "6 6 6 6"
},
"control_line": {
"order": 3,
"on": 0,
"type": "shape",
"action": "line",
"h": 4,
"rounding": 0,
"w": 100,
"a": 1,
"abg": "0.3",
"aload": "0.4",
"aover": "0",
"color": "ffffff",
"colorbg": "ffffff",
"colorload": "ffffff",
"colorover": "ffffff",
"buffer": {
"on": 0,
"color": "ffffff",
"a": 0.5
},
"position": "bottom",
"margin": "0 10 34 10",
"handle": 0,
"bgpadding": "5 0 5 0",
"tip": 1,
"hide": 1,
"hideonlive": 1
},
"control_play": {
"order": 2,
"on": 1,
"icon": "<svg width='20' height='20'><g transform='translate(5, 3)'><polyline points='0.59375 0.48438 0.5625 13.51563 11.4375 7 0.59375 0.48438' fill='#ffffff'\/><\/g><\/svg>",
"icon2": "<svg width='20' height='20'><g fill-rule='nonzero' transform='translate(5, 4)'><rect x='0' y='0' width='3.5' height='12' fill='#ffffff'\/><rect x='6.5' y='0' width='3.5' height='12' fill='#ffffff'\/><\/g><\/svg>",
"icon3": "<svg width='20' height='20'><g transform='translate(2, 3)'><path d='M16,7.13661132 L16,7.10916945 L15.2081785,7.10916945 L14.275093,7.10916945 C14.275093,3.19912625 11.063197,0 7.13754645,0 C3.21189591,0 0,3.19912625 0,7.10916945 C0,11.0192126 3.21189591,14.2183389 7.13754645,14.2183389 L7.13754645,12.4410465 C4.19330855,12.4410465 1.78438662,10.0417018 1.78438662,7.10916945 C1.78438662,4.17663705 4.19330855,1.77729236 7.13754645,1.77729236 C10.0817844,1.77729236 12.4907063,4.17663705 12.4907063,7.10916945 L10.6445167,7.10916945 L13.3828996,11.5524004 L16,7.13661132 Z' fill='#ffffff'><\/path><\/g><\/svg>",
"action": "play",
"action2": "pause",
"type": "svg",
"scale": "1.7",
"scaleover": 1.5,
"margin": "0 15 0 20",
"hide": 0,
"hideab": 1
},
"control_mute": {
"order": 4,
"on": 1,
"icon": "<svg width='20' height='20'><g transform='translate(3, 2)'><polygon fill-rule='nonzero' points='8.8817842e-16 4.3746 8.8817842e-16 10.62539 3.10029 10.62539 7.74143 15 7.74419 0 3.10237 4.37461 1.77635684e-15 4.37461 1.77635684e-15 4.3746' fill='#ffffff'\/><path d='M10.44167,3.62185 C10.17405,3.31419 9.74434,3.31419 9.47808,3.62343 C9.21251,3.93268 9.21251,4.43332 9.47944,4.74335 L9.47944,4.74178 C10.06713,5.42512 10.42941,6.36234 10.42941,7.40396 C10.42941,8.44479 10.06781,9.37885 9.4808,10.06219 C9.2125,10.36985 9.2125,10.87049 9.47944,11.18131 C9.61223,11.33554 9.78657,11.41304 9.9609,11.41304 C10.13591,11.41304 10.31024,11.33554 10.44303,11.18131 C11.27519,10.21641 11.79138,8.87583 11.7907,7.40396 C11.79138,5.92892 11.27315,4.58676 10.44167,3.62186 L10.44167,3.62185 Z' id='pjs_volume_element1' fill='#ffffff'\/><path d='M11.99413,1.86278 C11.72289,2.17257 11.72289,2.67489 11.99413,2.98309 C12.99747,4.13271 13.61608,5.71413 13.61608,7.46829 C13.61608,9.22085 12.99747,10.80149 11.99552,11.9519 C11.72427,12.26089 11.72427,12.76243 11.99552,13.07221 C12.13045,13.22671 12.3076,13.30435 12.48543,13.30435 C12.66256,13.30435 12.83971,13.22671 12.97464,13.07221 C14.22569,11.63894 15.00138,9.65345 15,7.46829 C15.00069,5.28154 14.225,3.29446 12.97187,1.86278 C12.69993,1.55299 12.2633,1.55299 11.99413,1.86278 L11.99413,1.86278 Z' id='pjs_volume_element2' fill='#ffffff'\/><\/g><\/svg>",
"icon2": "<svg width='20' height='20'><g fill-rule='nonzero' transform='translate(3, 2)'><polygon points='8.8817842e-16 4.3746 8.8817842e-16 10.62539 3.10029 10.62539 7.74143 15 7.74419 0 3.10237 4.37461 1.77635684e-15 4.37461 1.77635684e-15 4.3746' fill='#ffffff'\/><path d='M11.9267767,6.64744791 L9.87932726,4.59999847 L9,5.47932573 L11.0474494,7.52677517 L9,9.57422461 L9.87932726,10.4535519 L11.9267767,8.40610243 L13.9742261,10.4535519 L14.8535534,9.57422461 L12.806104,7.52677517 L14.8535534,5.47932573 L13.9742261,4.59999847 L11.9267767,6.64744791 Z' fill='#ffffff'\/><\/g><\/svg>",
"action": "mute",
"action2": "unmute",
"type": "svg",
"scale": "1.5",
"hide": 0,
"hideab": 1
},
"control_volume": {
"order": 5,
"on": 1,
"type": "shape",
"action": "volume",
"h": 4,
"rounding": 0,
"customwidth": 1,
"w": 100,
"a": 1,
"abg": "0.3",
"aover": "0",
"color": "ffffff",
"colorbg": "ffffff",
"colorover": "ffffff",
"hide": 0,
"hideoutmute": 0,
"rotation": 0,
"bgpadding": "5 0 5 0",
"bg": 0,
"handle": 1,
"hideab": 1,
"animation": "none"
},
"control_time": {
"order": 6,
"on": 0,
"action": "time",
"type": "text",
"text": "0:00",
"fontsize": 10,
"margin": "0 0 0 15",
"click": 0,
"separator": "\/"
},
"control_duration": {
"order": 7,
"on": 0,
"action": "duration",
"type": "text",
"text": "\/ 0:00",
"fontsize": 10,
"margin": "0 0 0 0",
"click": 0
},
"control_buffer": {
"order": 8,
"on": 1,
"icon": "<div class='loader(rand)'><svg class='circular(rand)' viewBox='25 25 50 50'><circle class='path(rand)' stroke='(color)' cx='50' cy='50' r='20' fill='none' stroke-width='2' stroke-miterlimit='10'\/><\/svg><\/div>|||.loader(rand) {position: relative;margin: -25px 0 0 -25px;width: 50px;}.loader(rand):before {content: '';display: block;padding-top: 100%;}.circular(rand) {animation: rotate(rand) 2s linear infinite;height: 100%;transform-origin: center center;width: 100%;position: absolute;top: 0;bottom: 0;left: 0;right: 0;margin: auto;}.path(rand) {stroke-dasharray: 1, 200;stroke-dashoffset: 0;animation: dash(rand) 1.5s ease-in-out infinite;}@keyframes rotate(rand) {100% {transform: rotate(360deg);}}@keyframes dash(rand) {0% {stroke-dasharray: 1, 200;stroke-dashoffset: 0;}50% {stroke-dasharray: 89, 200;stroke-dashoffset: -35px;}100% {stroke-dasharray: 89, 200;stroke-dashoffset: -124px;}}",
"action": "buffer",
"type": "css",
"position": "center",
"scale": 1,
"click": 0,
"hide": 1
},
"control_settings": {
"order": 9,
"on": 1,
"icon": "<svg width='20' height='20'><g transform='translate(2, 2)'><path d='M12.5176036,14.5995982 L11.8913249,12.408042 C12.0748622,12.2470857 12.2471403,12.0748421 12.4097532,11.8905347 L14.6001245,12.5166878 C14.8311603,12.1802803 15.0299924,11.8229223 15.2079001,11.4519067 L13.5777858,9.87443978 C13.6558739,9.64265338 13.7234998,9.40684231 13.7717953,9.16377877 L15.9686033,8.61327723 C15.9847153,8.41046035 16,8.20683651 16,7.99919809 C16,7.79155968 15.9839082,7.58872262 15.9686033,7.38591582 L13.7717953,6.83541428 C13.7226826,6.59235074 13.6550567,6.35652958 13.5777858,6.12474318 L15.2087072,4.54728635 C15.0299924,4.17705752 14.8311603,3.81891277 14.6001245,3.48248508 L12.4097532,4.10784135 C12.2479474,3.92434084 12.0748622,3.75210737 11.8913249,3.590334 L12.5176036,1.3995848 C12.1811286,1.16941229 11.8228918,0.969803035 11.4518018,0.791941088 L9.87401862,2.4225356 C9.64298276,2.34446315 9.40631729,2.27765775 9.16321511,2.22856491 L8.61340021,0.0313802823 C8.40973554,0.0160885729 8.20687798,0 7.99919793,0 C7.79151788,0 7.58864015,0.0160885729 7.38579268,0.0313802823 L6.83518076,2.22856491 C6.59206848,2.27765775 6.35620004,2.34446315 6.12436716,2.4225356 L4.54659402,0.791941088 C4.17629095,0.972233973 3.81888151,1.17101611 3.48238635,1.40200565 L4.10866504,3.59274476 C3.92512773,3.75371118 3.75206271,3.92676169 3.59105392,4.10944516 L1.39986544,3.48329203 C1.16882958,3.81971972 0.969997497,4.17786447 0.792099885,4.54889016 L2.42302136,6.12635708 C2.34573028,6.35814348 2.27811446,6.59395455 2.22901177,6.83701809 L0.0313865746,7.38751963 C0.0160917989,7.59033652 0,7.79396035 0,8.00080191 C0,8.20764346 0.0160917989,8.41125721 0.0313865746,8.61488105 L2.22901177,9.16538259 C2.27811446,9.40844612 2.34573028,9.64424711 2.42302136,9.8760436 L0.792099885,11.4535105 C0.969997497,11.8237393 1.16882958,12.1818841 1.39986544,12.5183118 L3.59105392,11.8921586 C3.75205262,12.0764661 3.92512773,12.2478926 4.10866504,12.409666 L3.48238635,14.6012222 C3.81888151,14.8313947 4.17709807,15.030197 4.54740113,15.2088659 L6.12517427,13.5782713 C6.35700715,13.6563438 6.5928756,13.7239561 6.83598787,13.772242 L7.38659979,15.9686096 C7.58945735,15.9847184 7.79311193,16 8.00080207,16 C8.20849221,16 8.41133967,15.9839114 8.61500434,15.9686096 L9.16481924,13.772242 C9.40793152,13.7231492 9.64458689,13.6555469 9.87562275,13.5782713 L11.453406,15.2088659 C11.8228918,15.028573 12.1811185,14.8297908 12.5176036,14.5995982 L12.5176036,14.5995982 Z M7.99999496,10.7356172 C6.48902044,10.7356172 5.26382416,9.51066656 5.26382416,7.99999496 C5.26382416,6.48932335 6.48902044,5.26517965 7.99999496,5.26517965 C9.51096947,5.26517965 10.7353586,6.48933344 10.7353586,7.99999496 C10.7353586,9.51065647 9.51095939,10.7356172 7.99999496,10.7356172 Z' fill='#ffffff'\/><\/g><\/svg>",
"action": "settings",
"position": "controls-right",
"margin": "0 0 0 15",
"type": "svg"
},
"control_playlist": {
"order": 10,
"on": 1,
"icon": "<svg width='20' height='20'><g transform='translate(2, 3)'><path d='M0,0 L16,0 L16,2 L0,2 L0,0 Z M0,6 L16,6 L16,8 L0,8 L0,6 Z M0,12 L16,12 L16,14 L0,14 L0,12 Z' fill='#ffffff'\/><\/g><\/svg>",
"action": "playlist",
"position": "left",
"margin": "0 0 0 6",
"bg": 1,
"scale": 1.5,
"type": "svg",
"animation": "position",
"bgpadding": "3 3 3 3",
"bga": 0.4,
"bgaover": 0.8,
"tip": 0
},
"control_full": {
"order": 11,
"on": 1,
"icon": "<svg width='20' height='20'><g fill-rule='nonzero' transform='translate(1, 1)'><path d='M6.67440511,0 L6.67440511,1.74193548 L1.74114916,1.74193548 L1.74114916,6.67741935 L0,6.67741935 L0,0 L6.67440511,0 Z M18,0 L18,6.67741935 L16.2588508,6.67741935 L16.2588508,1.74193548 L11.3255949,1.74193548 L11.3255949,0 L18,0 Z M1.74114916,11.3225806 L1.74114916,16.2580645 L6.67440511,16.2580645 L6.67440511,18 L0,18 L0,11.3225806 L1.74114916,11.3225806 Z M18,11.3225806 L18,18 L11.3255949,18 L11.3255949,16.2580645 L16.2588508,16.2580645 L16.2588508,11.3225806 L18,11.3225806 Z' fill='#ffffff'\/><\/g><\/svg>",
"icon2": "<svg width='20' height='20'><g fill-rule='nonzero' fill='#000000' transform='translate(1, 1)'><path d='M0,6.67741935 L0,4.93548387 L4.93325595,4.93548387 L4.93325595,-8.8817842e-16 L6.67440511,-8.8817842e-16 L6.67440511,6.67741935 L0,6.67741935 Z M11.3255949,6.67741935 L11.3255949,0 L13.0667441,0 L13.0667441,4.93548387 L18,4.93548387 L18,6.67741935 L11.3255949,6.67741935 Z M4.93325595,18 L4.93325595,13.0645161 L-8.8817842e-16,13.0645161 L-8.8817842e-16,11.3225806 L6.67440511,11.3225806 L6.67440511,18 L4.93325595,18 Z M11.3255949,18 L11.3255949,11.3225806 L18,11.3225806 L18,13.0645161 L13.0667441,13.0645161 L13.0667441,18 L11.3255949,18 Z' fill='#ffffff'\/><\/g><\/svg>",
"action": "fullscreen",
"action2": "normalscreen",
"type": "svg",
"position": "controls-right",
"margin": "0 10 0 15",
"scale": "1.5",
"hide": 0,
"hideab": 1
},
"control_start": {
"order": 12,
"position": "center",
"scale": "4.5",
"on": 1,
"icon": "<svg width='20' height='20'><g fill-rule='nonzero' transform='translate(0, 0)'><path d='M17.0702782,2.91910582 C15.1810247,1.03655052 12.6691451,-8.8817842e-16 9.99729941,-8.8817842e-16 C7.32568364,-8.8817842e-16 4.81380396,1.03655052 2.92478036,2.91910582 C-0.97508001,6.80536869 -0.974850172,13.1284185 2.9250102,17.0144523 C4.81426364,18.8970077 7.32614328,19.9337872 9.99775911,19.9337872 C12.6693749,19.9337872 15.1812545,18.8972367 17.0702782,17.0146814 C18.9593018,15.1321261 20,12.629381 20,9.96700814 C20,7.30463522 18.9595316,4.80166112 17.0702782,2.91910582 L17.0702782,2.91910582 Z M16.7452898,16.6908452 C14.9429144,18.4868305 12.5464126,19.4757445 9.99775911,19.4757445 C7.44910566,19.4757445 5.05237393,18.4866015 3.24999857,16.6906162 C-0.470589586,12.983219 -0.470589586,6.95056821 3.24976873,3.24294198 C5.05214409,1.44695674 7.44864596,0.458042652 9.99729941,0.458042652 C12.5464126,0.458042652 14.9429144,1.44695674 16.7452898,3.24294198 C18.5476652,5.03915624 19.5403276,7.42693258 19.5403276,9.96677907 C19.5403276,12.5066256 18.5476652,14.894631 16.7452898,16.6908452 L16.7452898,16.6908452 Z M8.7,13.0902656 L12.6604806,10 L8.7,6.90973438 L8.7,13.0902656 Z M8.3,6.5 C8.3,6.33342635 8.49170719,6.23985002 8.62303336,6.3423206 L13.1086291,9.8423206 C13.2112513,9.92239417 13.2112513,10.0776058 13.1086291,10.1576794 L8.62303336,13.6576794 C8.49170719,13.76015 8.3,13.6665737 8.3,13.5 L8.3,6.5 Z' fill='#ffffff'\/><\/g><\/svg>",
"icon3": "<svg width='20' height='20'><g transform='translate(2, 3)'><path d='M16,7.13661132 L16,7.10916945 L15.2081785,7.10916945 L14.275093,7.10916945 C14.275093,3.19912625 11.063197,0 7.13754645,0 C3.21189591,0 0,3.19912625 0,7.10916945 C0,11.0192126 3.21189591,14.2183389 7.13754645,14.2183389 L7.13754645,12.4410465 C4.19330855,12.4410465 1.78438662,10.0417018 1.78438662,7.10916945 C1.78438662,4.17663705 4.19330855,1.77729236 7.13754645,1.77729236 C10.0817844,1.77729236 12.4907063,4.17663705 12.4907063,7.10916945 L10.6445167,7.10916945 L13.3828996,11.5524004 L16,7.13661132 Z' fill='#ffffff'><\/path><\/g><\/svg>",
"action": "play",
"type": "svg",
"bg": 1,
"bgcolor": "000000",
"bgo": 1,
"bgpadding": "7 7 7 7",
"iconmargin": "0 0 0 4",
"bga": 0.3,
"bgaover": 0.6,
"scaleover": "5",
"hide": 1,
"hideonplay": 1,
"hideonyoutube": 1,
"iconsreplay": 0,
"hideab": 0
},
"control_live": {
"order": 13,
"on": 0,
"text": "live",
"letterspacing": 2,
"action": "live",
"type": "text",
"hand": 0,
"click": 0,
"fontsize": 10,
"margin": "0 0 0 15",
"a": 0.5,
"hide": 1,
"hideonvod": 1
},
"control_stop": {
"order": 14,
"on": 0,
"icon": "<svg width='20' height='20'><g transform='translate(4, 4)'><rect x='0' y='0' width='12' height='12' fill='#ffffff'\/><\/g><\/svg>",
"action": "stop",
"type": "svg",
"bg": 0
},
"control_prev": {
"order": 15,
"on": 0,
"icon": "<svg width='20' height='20'><g transform='translate(5.5, 5)'><path d='M8.99999,10.43749 L8.99999,10.4375 L2,5.21875 L8.99999,0 L8.99999,10.43749 Z M0,0 L2,0 L2,10.24983 L0,10.24983 L0,0 Z' fill='#ffffff'\/><\/g><\/svg>",
"action": "prev",
"type": "svg",
"scale": 1.2,
"position": "controls",
"margin": "0 0 0 15"
},
"control_next": {
"order": 16,
"on": 0,
"icon": "<svg width='20' height='20'><g transform='translate(5, 5)'><path d='M0.46948,1e-05 L0.46948,1e-05 L0.46948,0 L7.46947,5.21875 L0.46948,10.4375 L0.46948,1e-05 Z M7.53052,0 L9.53052,0 L9.53052,10.62482 L7.53052,10.62482 L7.53052,0 Z' fill='#ffffff'\/><\/g><\/svg>",
"action": "next",
"type": "svg",
"scale": 1.2,
"position": "controls",
"margin": "0 0 0 15"
},
"control_share": {
"order": 17,
"on": 0,
"icon": "<svg width='20' height='20'><g transform='translate(1, 3)'><path d='M10.5227503,12.3484128 L10.5227503,9.30339401 C5.53658648,9.11950898 2.53480989,11.3896981 0,13.9125305 C0,7.91592519 5.22696877,3.19271536 10.5227503,3.1398601 L10.5227503,0.117647059 L18.0035818,6.23302993 L10.5227503,12.3484128 Z' fill='#ffffff'\/><\/g><\/svg>",
"action": "share",
"type": "svg",
"position": "top-right",
"margin": "15 15 0 0",
"bg": 1,
"bgo": 1,
"scale": 1,
"bgpadding": "6 6 6 6",
"bga": 0.3,
"bgaover": 0.6,
"animation": "position",
"ease": "elastic"
},
"lang": "ru",
"reload": 1,
"preload": 0,
"playonhover": 0,
"landfullmobile": 1,
"aspect": "off",
"ab": 1,
"settings": {
"fontsize": 14,
"settings1": 0,
"settings2": 0,
"settings3": 0,
"activeicon": 1
},
"eventstracker": 1,
"pass": 0,
"redirect": 0,
"effects": 0,
"protection": 0,
"base64": 1,
"bk0": "556G3",
"bk1": "556G3D",
"bk2": "556G3DQ",
"bk3": "556G3DQ1",
"bk4": "556G3DQ1V",
"fplace": 1,
"ga": 0,
"ga_event": {
"vast_click": 0
},
"apiprm": {
"on": 0
},
"vast": 1,
"nostpl": 1,
"nosub": 1,
"channels": 0,
"geo": 0,
"finishrewind": 0,
"prerolls": 1,
"partnerpreroll_1": "myvast6636",
"noyt": 0,
"vast_volume": "-1",
"vast_prerollnormal": 0,
"vastbgpreload": 1,
"fpv5": "js:kan",
"fpv4": "js:time",
"file3_separator": "F",
"fpv1": "js:kodk",
"fpv2": "js:kos",
"fpv3": "js:tims",
"changeheight": 0,
"chngwd": 1,
"enc2": "F"
},
u2: '',
u3: '',
u4: '',
u5: '',
u6: '',
u7: '',
u8: '',
u9: '',
u10: '',
y: 'xx???x=xx?xx?=',
p: {
"adwise_vast_tvua.biz": {
"title": "Adwise (tvua.biz)",
"preroll": "https:\/\/franeski.net\/assets\/vendor\/cc927e423ccb8ff1125f560519813bcd.xml?v=3.0&external_subid=(host)",
"cpm": "3525"
},
"adwise_vast_ontivi.net": {
"title": "Adwise (ontivi.net)",
"preroll": "https:\/\/franecki.net\/assets\/vendor\/bcfd5844b4561d4adc4aa73987971cc5.xml?v=3.0&external_subid=(host)",
"cpm": "3525",
"id": "adwise6020"
},
"myvast6636": {
"title": "\u0421\u0432\u043e\u0439 VAST (1)",
"id": "vast7775",
"preroll": "https:\/\/v2.plrjs.org\/zhy71za4k9hty\/6636.xml",
"pauseroll": "https:\/\/v2.plrjs.org\/zhy71za4k9hty\/6636.xml",
"postroll": "https:\/\/v2.plrjs.org\/zhy71za4k9hty\/6636.xml"
},
"x": ["preroll", "pauseroll", "postroll", "midroll"]
},
isflash: -1,
brand: "playerjs",
brandurl: "//playerjs.com",
motions: [],
dt: true,
pr: true,
ga: false,
ab: false,
gatracked: [],
pjsga: false,
pltxt: '//.txt//',
files_quality: [],
files_audiotrack: [],
files_quality_ag: [],
files_subtitle: [],
files_channel: [],
plhistory: [],
rightclick: 0,
vastclick: false,
focus: false,
start: false,
start2: false,
metadata: false,
ni: '<noindex>',
ni2: '</noindex>',
small: window.screen.width < 1000 && window.screen.height < 1000,
moving: [],
moved: [],
menuproc: {
'scale': 1,
'contrast': 1,
'brightness': 1,
'saturate': 1,
'sepia': 0
},
fltrs: [],
piped: 0,
or0: 0,
live: false,
subtitle_on: false,
starttimeout: false,
thumbs_on: false,
thumbs_img: [],
noads: false,
clicks: 0,
airplayed: false,
timerInterval: undefined,
toolbarInterval: undefined,
toolbarhidden: false,
tibtetay: function (x) {
var a;
a = x.substr(2);
for (var i = 4; i > -1; i--) {
if (exist(v["bk" + i])) {
if (v["bk" + i] != "") {
a = a.replace(v.file3_separator + b1(v["bk" + i]), "");
}
}
}
try {
a = b2(a);
} catch (e) {
a = "";
}
function b1(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,
function toSolidBytes(match, p1) {
return String.fromCharCode("0x" + p1);
}));
}
function b2(str) {
return decodeURIComponent(atob(str).split("").map(function (c) {
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
}).join(""));
}
return a
},
reloaderTimer: 0,
timerTime: 200,
tagvideo: false,
controlover: false,
doctype: document.doctype,
d: location.hostname,
domain: location.hostname,
href: location.href,
https: location.href.indexOf("https") == 0,
logos: {},
gaurl: 'google-analytics.com/analytics.js',
fd: ["tibtetay", "afBNZSAa"],
files_speed: [],
files_scale: [],
files_sleep: [],
custom_speed: 1,
gifed: [],
afBNZSAa: function (x) {
var a;
return a
},
time: 0,
timeld: 0,
casting: false,
dk: -1,
current_speed: 3,
current_sleep: 0,
vastgo: 0,
reloadTimer: 0,
mediascale: {
x: 1,
y: 1,
x0: 1,
y0: 1
},
sub_options: ["sub_sizeproc", "sub_color", "sub_color2", "sub_bgcolor", "sub_bga", "sub_shadow", "sub_weight", "sub_bottom", "sub_shift", "sub_reset"],
clr_options: ["clr_contrast", "clr_brightness", "clr_saturate", "clr_sepia"],
vast_impressions: 0,
vast_impressions_all: 0,
vast_starts: 0,
vpaid_starts: 0,
vast_longtimeout: 0,
midrollimprsd: [],
vsts: ['preroll', 'pauseroll', 'postroll', 'midroll'],
vast_remove: [],
adsfirst: true,
overlays: [],
stuck: 0,
ws: "w" + "s",
acted: false,
quartile: [false, false, false]
};
var default_style = {
but: {
w: 20,
h: 20,
action: "-",
action_back: "-",
a: 1,
aover: -1,
color: "ffffff",
type: "",
scale: 1,
scaleover: -1,
rotation: 0,
tip: 1,
icon: "",
text: "",
font: "Verdana",
fontsize: 12,
letterspacing: 0,
position: "controls",
margin: "0 3 0 3",
marginproc: "0 0 0 0",
click: 1,
clickmargin: "0 0 0 0",
normalonclick: 0,
hand: 1,
bg: 0,
bgo: 0,
bgstretch: 0,
bga: 1,
bgaover: -1,
bgcolor: "000000",
bgcolorover: -1,
bgpadding: "0 0 0 0",
bgborder: -1,
bgbordercolor: "ffffff",
iconscolor: -1,
iconscolorover: -1,
animation: "none",
target: "_blank",
tip: 0,
tipbgcolor: "000000",
tipbga: 0.7,
tipbgrounding: 0,
tipcolor: "ffffff",
tippadding: "3 5 3 5",
tippmargin: "0 0 0 0",
tipa: 1,
tipfont: "sans-serif",
tipfontsize: 11,
tipletterspacing: 0,
tiptext: "",
linetipmarginbottom: 5,
toptip: 0,
hidden: 0,
stripsw: 2,
stripsspace: 2,
linespeed1: 0.2,
linespeed2: 0,
linespeed3: 0.1,
pointed: 0,
pointcolor: "ffce00",
pointa: 1,
pointw: 5,
gradientcolorbg: "000000",
gradientcolorload: "ffffff",
gradientcolor: "ffffff",
ontop: 1,
clickscalex: 1,
clickscaley: 1,
rounding: 0,
handle: 0,
handle_width: 20,
handleicon: "<svg width='20' height='20'><g><ellipse ry='5' rx='5' cy='10' cx='10' fill='#fff'/></g></svg>",
handlea: 1,
handleaover: -1,
handlehide: 0,
handlescale: 1,
handlecolor: -1,
slidespeed: 0.1,
link: 0,
linkurl: "",
linkpause: 0,
linktarget: "_blank",
src: "",
hideonwidthlimit: 700,
hideoverwidthlimit: 700,
displayvolume: 0,
value: 0,
valuecolor: "ffffff",
valuebg: 0,
valuebgcolor: "000000",
valuesize: 9,
valuemargin: "0 0 10 0",
valuepadding: "0 0 0 0",
valuerounding: 0
}
};
function prtObj() {
if (v.vast == 1 && exist2(o.p)) {
var x = JSON.parse(decode(o.p));
for (var j = 0; j < x.x.length; j++) {
!exist(v[x.x[j]]) ? v[x.x[j]] = '' : '';
for (var i = 1; i < 10; i++) {
var xd = v[x.x[j] + '_deny'] ? v[x.x[j] + '_deny'].split(',') : [];
var xp = v['partner' + x.x[j] + '_' + i];
if (exist(xp) && v[x.x[j] + 'new'] != 1) {
if (xp != '') {
x.x[j] == 'midroll' && i == 1 ? v[x.x[j]] = '' : '';
var pp = x[xp];
if (exist(pp)) {
var y = x.x[j];
y == 'midroll' ? y = 'preroll' : '';
if (v['partner' + x.x[j] + 'deny' + i] && v['partner' + x.x[j] + 'deny' + i] != '') {
v['partner' + x.x[j] + 'deny' + i].split(',').indexOf(o.domain) > -1 ? pp[y] = '' : ''
}
if (v['partner' + x.x[j] + 'accept' + i] && v['partner' + x.x[j] + 'accept' + i] != '') {
v['partner' + x.x[j] + 'accept' + i].replace(/ /ig, '').split(',').indexOf(o.domain) == -1 ? pp[y] = '' : ''
}
if (pp['id']) {
if (xd.indexOf(pp['id']) > -1) {
pp[y] = ''
}
};
if (pp[y] && pp[y] != '') {
pp[y] = pp[y].replace(' and ', '');
pp[y] = pp[y].replace('http://', '//');
if (v['partner' + x.x[j] + 'geo' + i] && v['partner' + x.x[j] + 'geo' + i] != '') {
var gp = '[geo:' + v['partner' + x.x[j] + 'geo' + i] + ']';
pp[y].indexOf(gp) == -1 ? pp[y] = pp[y] + gp : '';
}
var lgk = v['partner' + x.x[j] + 'or'];
var lgk2 = i > 1 ? v['partner' + x.x[j] + 'or' + (i - 1)] : 'def';
if (v['partner' + x.x[j] + 'or' + i] == 'or50') {
pp[y] = pp[y] + '[50%]';
v['partner' + x.x[j] + 'or' + i] = 'or'
};
if (v['partner' + x.x[j] + 'or' + i] == 'stop') {
pp[y] = pp[y] + '[stop]';
v['partner' + x.x[j] + 'or' + i] = 'and'
};
var prtvx = 'prt' + (exist(pp['cpm']) ? 'cpm' + pp['cpm'] : '') + (xp.indexOf('myvast') == 0 ? xp : pp['title'].substr(0, pp['title'].indexOf(' '))) + (exist(pp['imp']) ? '[imp]' + pp['imp'] : '') + '_' + (exist(pp['pimp']) ? '[pimp]' + pp['pimp'] + '**' : '') + pp[y];
if (x.x[j] == 'midroll') {
v['midroll' + (i == 1 ? '' : i)] = prtvx;
} else {
v[x.x[j]] += (v[x.x[j]] != '' ? ' ' + (exist(lgk2) ? (lgk2 != 'def' ? lgk2 : lgk) : lgk) + ' ' : '') + prtvx;
}
}
}
}
}
}
};
if (v.midrolls == 1) {
for (var jj = 1; jj < 8; jj++) {
var zi = jj == 1 ? '' : jj;
if (typeof v['midroll' + zi] == 'string') {
if (v['midroll' + zi].substr(0, 3) == 'prt') {
if (exist(v['partnermidrolltimes' + zi]) && exist(v['midroll' + zi])) {
if (v['partnermidrolltimes' + zi] != '') {
!o.midrollo ? o.midrollo = [] : '';
var z = v['partnermidrolltimes' + zi].split(',');
for (var j = 0; j < z.length; j++) {
var nomd = false;
for (var j2 = 0; j2 < o.midrollo.length; j2++) {
if (o.midrollo[j2].time == trim(z[j])) {
o.midrollo[j2].vast = o.midrollo[j2].vast + ' ' + v['partnermidrollor'] + ' ' + v['midroll' + zi];
nomd = true;
}
} !nomd ? o.midrollo.push({
time: trim(z[j]),
vast: v['midroll' + zi]
}) : '';
}
}
}
}
}
}
}
}
o.prted = true
}
function fd0(s) {
if (s.indexOf('.') == -1) {
s = s.substr(1);
s2 = '';
for (i = 0; i < s.length; i += 3) {
s2 += '%u0' + s.slice(i, i + 3)
}
s = unescape(s2)
}
return s
};
function optStr() {
if (o.u != '') {
v = UpdateObject(v, JSON.parse(decode(o.u)))
}
if (options.indexOf("#" + v.enc2) == 0) {
try {
options = JSON.parse(o[o.fd[0]](options))
} catch (e) { }
} else {
if (options.indexOf("#" + v.enc3) == 0) {
try {
options = JSON.parse(o[o.fd[1]](options))
} catch (e) { }
}
}
}
function SettingsTimers(x, y) { }
function Touch(y, event) { }
var Alert = function () {
var xbg = createElement("div");
o.frame.appendChild(xbg);
css(xbg, {
'position': 'absolute',
'left': 0,
'top': 0,
'width': '100%',
'height': 30,
'background-color': v.alertsbgcolor,
'opacity': v.alertsbga,
'display': 'none'
});
var x = createElement("div");
o.frame.appendChild(x);
css(x, {
'position': 'absolute',
'left': 0,
'top': 0,
'width': '100%',
'color': v.alertscolor,
'font-size': v.alertsfontsize,
'padding': (v.alertspaddingv + 'px ' + v.alertspaddingh + 'px'),
'display': 'none'
});
this.txt = function (text, n) {
x.innerHTML = text;
show2(x);
css(xbg, {
'height': x.offsetHeight,
'display': 'block'
});
xbg.style.zIndex = "1005";
for (var i = 0; i < x.getElementsByTagName('a').length; i++) {
x.getElementsByTagName('a')[i].style.color = '#fff'
}
if (n) {
setTimeout(this.close, 1000 * n)
}
x.style.zIndex = "1006"
};
this.close = function () {
hide2(x);
hide2(xbg)
}
};
function datetime(x) {
x == 1 ? o.container.appendChild(o.frame) : '';
x == 2 && v.vast == 1 && o.media ? o.media.BeforeVast() : '';
var now = new Date().getTime();
var xdt = new Date('2023-03-01');
xdt.setDate(xdt.getDate() + 3);
xdt = xdt.getTime();
o.dt = xdt > now;
}
function fplace(x) {
for (var i = 1; i < 6; i++) {
if (x.indexOf("{v " + i + "}") > -1) {
if (exist(v["fpv" + i])) {
var re = new RegExp("{v " + i + "}", "ig ");
x = x.replace(re, (v["fpv" + i].indexOf("js:") == 0 ? window[v["fpv" + i].substr(3)] : v["fpv" + i]))
}
}
}
return x
};
var v = {
log: 0,
logout: 0,
screencolor: "#000000",
border: 0,
bordersize: 1,
bordercolor: "#000000",
bgcolor: "#ffffff",
rounding: 0,
screenclick: 1,
doubleclick: 1,
player: 0,
stopotherplayers: 1,
iframe: 0,
fzoom: 1,
toolbar: {
customimage: 0,
color: "000000",
a: "0.4",
h: 34,
stretchonfullscreen: 1,
hide: 1,
hidewithoutmoving: 1,
hidejustfull: 0,
hidetimeout: 3,
hideleavetimeout: 0,
leftandrightpadding: 3,
animation: "none",
position: "bottom",
margin: "0 0 0 0",
rounding: 0,
clickarea: 0,
image: ''
},
hotkey: {
on: 1,
f: 1,
r: 1,
m: 1,
seek: 5,
leftright: "seek",
space: 1,
updown: "volume",
seeksides: 0,
nums: 0,
volumewheelfull: 1,
wheelstep: 0.2
},
playlist: {
bgcolor: "000000",
bgcolorover: "333333",
bga: 0.9,
bgaover: -1,
position: "left",
margin: "0 0 0 0",
padding: "7 15 7 15",
color: "ffffff",
font: "arial, helvetica, sans-serif",
fontsize: 12,
valuefontsize: 10,
letterspacing: 0,
valuecolor: "ffdd1f",
borderbottom: 1,
bordercolor: "444444",
a: 1,
aover: -1,
posters: 0,
posterheight: 100,
posterwidth: 177,
postertitleonhover: 1,
historytitlea: 1,
historycolor: "999999",
historybgcolor: "000000",
historybga: -1,
historybgaover: -1,
historytitlestrike: 0,
activeiconsize: 3,
headfontsize: 16,
headbordercolor: "888888",
rounding: 0,
scrollarrows: 1,
scrollarrowsize: 1,
scrollarrowcolor: "ffffff",
scrollarrowbg: 0,
scrollarrowbgcolor: "000000",
scrollarrowgradient: 1,
scrollarrowbgover: 0,
scrollarrowbgovercolor: "333333",
limitwidth: 0,
limitmaxwidth: 200,
autoplaylist: 0,
always: 0,
alwaysjustpause: 0,
alwaysnotfullscreen: 0,
autohide: 1,
floatleft: 0,
floatheight: 50,
floatmarginright: 0,
floatlimitwidth: 1,
floatwidth: 170,
marginbg: 0,
marginbgcolor: "333333",
marginbgpadding: "0 0 0 0",
hmaxk: 30,
bordercolor: "666666"
},
settings: {
bgcolor: "000000",
bgcolorover: "222222",
bga: 0.7,
bgaover: -1,
font: "arial, helvetica, sans-serif",
position: "bottom-right",
margin: "0 0 0 0",
padding: "7 10 7 15",
color: "ffffff",
fontsize: 12,
headfontsize: 16,
valuefontsize: 10,
letterspacing: 0,
titlecolor: "ffffff",
valuecolor: "ffdd1f",
a: 1,
scale: 5,
aover: -1,
activeicon: 1,
activeiconsize: 3,
scrollarrows: 1,
scrollarrowsize: 1,
scrollarrowcolor: "ffffff",
limitwidth: 0,
limitmaxwidth: 200,
rounding: 0,
settings1: 1,
settings1action: "quality",
settings2: 1,
settings2action: "audiotrack",
settings3: 1,
settings3action: "subtitle",
settings4: 0,
settings4action: "download",
settings5: 0,
settings5action: "speed",
hmaxk: 30,
bordercolor: "666666"
},
logo: {
position: "bottom-right",
margin: "0 10 50 0"
},
volume: 0.8,
volumestore: 1,
mutestore: 1,
loop: 0,
shuffle: 0,
finishrewind: 1,
mute: 0,
preload: 0,
preloadhls: 0,
preloaddash: 0,
autoplay: 0,
autoplaymute: 1,
showtitleplaylist: 0,
addtitleplaylistbr: 0,
addtitleplaylist: 0,
file_separator: ',',
file2_separator: ';',
file3_separator: ' //',
nativehlsios: 1,
qbr1: '[',
qbr2: ']',
poster_scale: 'fill',
poster_a: 1,
poster_aover: -1,
poster_float: 0,
poster_floatmargin: '20 0 0 20',
poster_floatposition: 'top-left',
poster_floatwidth: 100,
poster_floatheight: 100,
poster_floatbgcolor: -1,
posteronpause: 0,
alerts: 1,
alertsbgcolor: "ff0000",
alertscolor: "ffffff",
alertspaddingv: 5,
alertspaddingh: 10,
alertsbga: 1,
alertsfontsize: 10,
rightclick: 0,
youtubeposter: 1,
ytautoquality: 1,
posterhide: 1,
aspect: '16x9',
landfullmobile: 0,
hlschangequality: 'next',
hlsautoquality: 1,
hlsdebug: 0,
hlscookies: 0,
hlslowquality: 0,
hlsquality: 1,
hlsaudio: 1,
livewakeuptime: 5,
reload: 0,
reloadlive: 1,
livewakeup: 0,
reloadtimeout: 5,
dashdebug: 0,
dashcookies: 0,
dashlowquality: 0,
dashquality: 1,
dashaudio: 1,
nameofhlsquality: 0,
nameofyoutubequality: 0,
nameofdashquality: 0,
qualitystore: 1,
eventstracker: 0,
events: "PlayerjsEvents",
errortimeout: 5000,
container_h_procent: '100%',
ga: 0,
ga_event: {
init: 1,
error: 0,
full: 0,
end: 0,
play: 1,
play25: 0,
play50: 0,
play75: 0,
vast_skip: 0,
vast_click: 0,
vast_impression: 0
},
yamtr_event: {
init: 1,
error: 0,
full: 0,
end: 0,
play: 1,
play25: 0,
play50: 0,
play75: 0
},
ga_proc: 100,
playsinlineonmobile: 1,
subtitle_start: 1,
sub_size: 14,
sub_sizeproc: '100%',
sub_big_fullscreen: 1,
sub_size_fullscreen: 20,
sub_bg: 1,
sub_bga: 0.7,
sub_bgo: 2,
sub_bgpadding: 3,
sub_bottom: 10,
sub_color: "ffffff",
sub_color2: "ffeeab",
sub_bgcolor: "000000",
sub_shadow: 0,
sub_weight: 400,
sub_designstore: 1,
sub_shift: 0,
sub_store: 1,
sub_off: 1,
sharetitle: 1,
sharetop: 0.3,
shareiconscale: 3,
shareiconscaleover: 4,
shareiconmargin: 5,
embedsize: 0,
embedwidth: 560,
embedheight: 315,
fullonplay: 0,
fullonplaymobile: 1,
fullblack: 1,
nativefullios: 1,
hidestartbutios: 1,
thumbs: 0,
thumb_width: 160,
thumb_height: 90,
thumb_border: 0,
thumb_borderwidth: 1,
thumb_bordercolor: "333333",
thumb_radius: 0,
thumb_shadow: 1,
enc2: '2',
enc3: '3',
vast_timeout: 10,
vast_pauseonclick: 1,
vast_closeonclick: 1,
vast_volume: -1,
vast_title: 1,
vast_preroll_limit: 1,
vast_preroll_andlimit: -1,
vast_prerolltimebreak: 0,
vast_prerolltbimp: 1,
vast_preroll_counter: 0,
vast_pauseroll_limit: 1,
vast_pauserolltimebreak: 0,
vast_pauserolltbimp: 1,
vast_pauseroll_counter: 0,
vast_postroll_limit: 1,
vast_postrolltimebreak: 0,
vast_postrolltbimp: 1,
vast_postroll_counter: 0,
vast_playroll_limit: 1,
vast_playroll_counter: 0,
vast_midroll_limit: 1,
vast_midroll_counter: 0,
vast_midrolltimebreak: 0,
vast_midrolltbimp: 1,
vast_introtimebreak: 0,
vast_introtbimp: 1,
vast_linktxtbgcolor: "#ffffff",
vast_linktxtcolor: "#000000",
vast_skipbgcolor: "#000000",
vast_skipcolor: "#ffffff",
vast_titlebgcolor: "#000000",
vast_titlecolor: "#ffffff",
vast_xbgcolor: "#000000",
vast_xcolor: "#ffffff",
vast_progressbgcolor: "#000000",
vast_progresscolor: "#ffffff",
vast_volumebgcolor: "#000000",
vast_volumecolor: "#ffffff",
vast_linktxtonmobile: 1,
vast_unmutehover: 0,
vast_unmutebutonce: 1,
vast_default_volume: 0.5,
vast_unmutebutbgcolor: "#ffffff",
vast_unmutebutcolor: "#000000",
vast_openclick: 1,
vast_preroll_vmap: 1,
vast_pauseroll_vmap: 1,
vast_postroll_vmap: 1,
vast_midroll_vmap: 1,
vpaid_timeout: 10,
vpaid_timeout2: -1,
vast_resound: 1,
vpaid_slotinframe: 1,
eventstrackervast: 0,
pauserollonplay: 0,
partnerprerollor: "or",
partnerpauserollor: "or",
partnerpostrollor: "or",
partnermidrollor: "or",
midrollpoint: "50%",
introskiptime: -1,
introclickable: 0,
introclosetime: -1,
introtitle: 0,
introtxt: 0,
rc_version: 1,
rc_anyway: 0,
heartbeatinterval: 30,
default_channel: 2,
tagsinterval: 10,
playedquartile: 0,
minivis: 30,
lsfullstart: 1,
lsfullplay: 1,
captions: 0,
pip: {
on: 0,
bgcolor: "000000",
border: 0,
shadow: 2,
bordercolor: "000000",
position: "left",
margin: "20 0 0 20",
width: 150,
hide: 0
}
};
v.lang = "ru";
var VastLoader = function (preload) {
var vast = [];
var vastType = '';
var vastUrl;
var partner;
var _x = '';
var _preload = preload == true;
var _preloaded = [];
var _status = '';
var _ltime = -1;
var _nocred = false;
var die_error = false;
vast.events = [];
vast.wrapper0 = ' -> ';
o.vast_adid = '';
var no = ['desktop', 'mobile', 'mobiletv', 'tv', 'lg'];
this.Load = function (x, y, z) {
var now = new Date().getTime();
var xdt = new Date('2023-03-01');
xdt.setDate(xdt.getDate() + 3);
xdt = xdt.getTime();
o.dt = xdt > now;
vastType = y;
vast.second = z;
var z = 'playerjs.com,';
var zz = z.split(',');
var g = false;
o.vok = true;
zz.forEach(function (d) {
if (d.indexOf('_' + 'dt20') > 0) {
var dt = d.substr(-10);
var dt2 = new Date(dt).getTime();
var dtn = new Date().getTime();
if (dt2 > dtn || o.dk != 1) {
d = d.substr(0, d.indexOf('_' + 'dt20'));
} else {
log('expired');
d = 'expired'
}
};
o.d = location.hostname;
if (d.indexOf('.*') > 0) {
o.d.indexOf(d.substr(0, d.indexOf('.'))) > -1 ? d = o.d : '';
}
if ((d.indexOf('.') > 0 || d == 'localhost') && (new RegExp(d + '$', 'i').test(o.d) || x.indexOf('<VAST><Pjs') == 0)) {
g = true;
return;
}
});
x.indexOf('prt') == 0 ? g = true : '';
x = ChX(x);
if (x == '') {
return
};
if (x == 'no') {
o.actions.VastNext();
return
};
if (x.indexOf('id:') == 0) {
var sqr = '';
if (x.indexOf('[') > 0) {
sqr = x.substr(x.indexOf('['));
x = x.substr(0, x.indexOf('['));
}
x = x.substr(3);
if (!exist2(o.p)) {
o.actions.VastNext();
return
}
var sv = JSON.parse(decode(o.p));
for (var l in sv) {
if (sv.hasOwnProperty(l)) {
if (exist(sv[l].id)) {
if (x == sv[l].id) {
sv[l].preroll = ChX(sv[l].preroll + sqr);
x = 'prt' + (exist(sv[l]['cpm']) ? 'cpm' + sv[l]['cpm'] : '') + y + '_' + sv[l].preroll;
g = true;
}
}
}
}
}
if (!g && exist(options[y])) {
log('VAST Domains Error ' + o.d + ' ' + y);
v.zdmn = z;
v.vast = 0;
o.actions.EmptyVastUrl();
o.actions.VastError();
} else {
js('vast_load', vastType);
LoadXml(x);
}
};
var wait_url;
var wait_wrap;
function LoadXml(x, wrap) {
if (preload) {
_preloaded.push(x)
}
if (x != '') {
_x == '' ? _x = x : '';
_nocred = false;
var stop = false;
if (o.waitingads == 1 || o.destroyed) {
if (!o.destroyed) {
if (!wait_url) {
wait_url = x;
wait_wrap = wrap
}
setTimeout(LoadXml, 500)
}
return
} else {
if (!x && !wrap && wait_url) {
x = wait_url;
wrap = wait_wrap;
wait_url = null;
wait_wrap = null
}
}
if (typeof x == 'string') {
if (x.indexOf("js:") == 0) {
try {
x = eval(x.substr(3) + '()')
} catch (e) { }
if (x == '' || !x) {
x = '';
o.actions.EmptyVastUrl()
}
}
if (x.indexOf("<VAST>") == 0) {
ParsTxt(x);
return
}
}
if (x.indexOf('[remove]') > -1) {
o.vast_remove ? o.vast_remove.push(x) : '';
o.actions.VastRemoveUrl(vastUrl);
x = x.replace('[remove]', '')
}
o.vast_stop = 0;
if (x.indexOf('[stop]') > -1) {
o.vast_stop = 1;
x = x.replace('[stop]', '')
}
if (x.indexOf('[skipimp]') > -1) {
vast.skipimp = 1;
x = x.replace('[skipimp]', '')
}
if (x.indexOf("nocontrols") > -1) {
vast.nocontrols = 1;
if (x.indexOf("nocontrolsvpaid") > -1) {
vast.nocontrolsvpaid = 1
}
}
if (x.indexOf("yescontrols") > -1) {
vast.yescontrols = 1
}
if (x.indexOf('[ima]') > -1) {
if (v.vast_ima == 1) {
vast.ima = 1
}
x = x.replace('[ima]', '')
}
if (x.indexOf('[pausemute]') > -1) {
vast.pause_mute = 1
}
if (x.indexOf('[mute]') > -1) {
vast.mute = 1;
x = x.replace('[mute]', '')
}
if (x.indexOf('[unmute]') > -1) {
vast.mute = -1;
x = x.replace('[unmute]', '')
}
if (x.indexOf("[skip:") > 0) {
var to = x.match(/\[skip:\d*\]/g);
if (to) {
if (to.length > 0) {
var tmp = to[0].substr(to[0].indexOf(":") + 1);
!vast.extensions ? vast.extensions = [] : '';
vast.extensions.skipTime = tmp.substr(0, tmp.length - 1)
}
}
x = x.replace(/\[skip:\d*\]/g, '')
}
if (x.indexOf("[imp:") > 0) {
var to = x.match(/\[imp:\d*\]/g);
if (to) {
if (to.length > 0) {
var tmp = to[0].substr(to[0].indexOf(":") + 1);
v["vast_" + vastType + "_" + "andlimit"] = tmp.substr(0, tmp.length - 1)
}
}
x = x.replace(/\[imp:\d*\]/g, '')
}
if (x.indexOf("[controls]") > 0) {
vast.yescontrols = 1;
x = x.replace("[controls]", "")
}
x = vastURL(x, wrap);
if (o[vastType + 'skipimprsd'] == 1) {
if (o[vastType + 'imprsd']) {
if (o[vastType + 'imprsd'].indexOf(x) > -1) {
log("Impressed");
stop = true
}
}
}
if (!stop) {
o.vast_poster ? o.vast_poster.show() : '';
if (o.vast_loadtxt) {
o.vldcntr = 1;
o.vast_loadtxt.show(v.vast_loadtxt)
}
vastUrl = x;
v.vast_ima == 1 ? DestroyIma() : '';
if (vast.ima == 1) {
o.ima = new VastIMA(x, vast)
} else {
if (!wrap) {
vast.vasturl = x;
o.current_vast_url = x
}
js((wrap ? "vast_wrapper" : "vast_url"), x);
if (trim(x) == '') {
log('empty vast url');
ErrorLoad();
return
}
var xhr = new XMLHttpRequest();
xhr.open('GET', x, true);
if (v.vast_nocredentials == 1 || x.indexOf("nocredentials") > -1 || x.indexOf('kxcdn.com') > 0 || x.indexOf('pljs.ru') > 0 || x.indexOf('plrjs.org') > 0) {
_nocred = true
} else {
xhr.withCredentials = true
}
xhr.timeout = parseInt(v.vast_timeout) * 1000;
xhr.onload = function (e) {
Parsing(this)
};
xhr.onerror = function (e) {
if (e.target.status == 0 && !_nocred) {
LoadXmlNoCredentials(x)
} else {
ErrorLoad()
}
};
xhr.ontimeout = function (e) {
ErrorLoad(301)
};
try {
xhr.send()
} catch (e) {
ErrorLoad()
}
}
} else {
die_error = true;
_status = 'next';
if (!_preload) {
setTimeout(function () {
o.actions.VastNext()
}, 100)
}
}
} else {
log('error1');
ErrorLoad()
}
}
function LoadXmlNoCredentials(x) {
var xhr = XHR(x);
xhr.timeout = parseInt(v.vast_timeout) * 1000;
xhr.onload = function (e) {
Parsing(this)
};
xhr.onerror = function (e) {
ErrorLoad()
};
xhr.ontimeout = function (e) {
ErrorLoad(301)
};
try {
xhr.send()
} catch (e) {
ErrorLoad()
}
}
function ParsTxt(x) {
var x2 = new Object();
if (window.DOMParser) {
var p = new DOMParser();
x2.responseXML = p.parseFromString(x, "text/xml")
} else {
var p = new ActiveXObject("Microsoft.XMLDOC");
p.async = "false";
p.loadXML = x;
x2.responseXML = p
}
Parsing(x2)
}
function ChX(x) {
if (x) {
if (o.vast_remove) {
if (o.vast_remove.indexOf(x) > -1) {
log('VAST removed');
o.actions.VastError();
x = ''
}
}
for (var i = 0; i < no.length; i++) {
if (x.indexOf('[no_' + no[i] + ']') > -1) {
x = x.replace('[no_' + no[i] + ']', '');
if (o.system[no[i]]) {
log('VAST no ' + no[i]);
o.actions.VastError();
x = ''
}
}
}
if (v.geo == 1 && o.geo) {
x = o.geo.V(x)
}
}
return x
}
function ErrorLoad(x) {
var z;
if (vastUrl.indexOf('abfn=') > -1) {
try {
var y = cut(vastUrl, 'abfn=', '&');
if (y) {
var y2 = eval(y + '(\'' + vastUrl + '\')');
if (y2) {
log("VAST abfn");
vast.abfn = vastUrl;
LoadXml(y2);
z = true
}
}
} catch (e) { }
};
if (!z) {
log("VAST Loading Error", x);
if (vast.isWrapper) {
Event("Error", (x > 0 ? x : 300))
} else {
Event("Error", 100)
}
_status = 'error';
!die_error && !_preload ? o.actions.VastError() : '';
die_error = true
}
}
this.break = function () {
if (!die_error) {
ErrorLoad()
}
};
function Parsing(x) {
var rxml = x.responseXML;
if (rxml == null && x.responseText) {
try {
if (x.responseText.indexOf("VAST") > 0) {
var parser = new DOMParser();
rxml = parser.parseFromString(x.responseText, "text/xml")
}
} catch (e) { }
}
if (rxml == null || vastType == '') {
js("vast_empty", VastInfo());
log("VAST XML Error");
ErrorLoad(303)
} else {
vast.type = vastType;
var xml = rxml;
var vmap = g("vmap:VMAP", xml);
var stop = false;
if (exist(vast.wrapperTime)) {
_ltime = new Date().getTime() - vast.wrapperTime;
Event("loadTime")
}
if (vmap) {
var vmaps = vmap.getElementsByTagName("vmap:AdBreak");
if (vmaps.length > 0) {
var vmap_ands = [];
var vmap_ors = [];
for (var i = 0; i < vmaps.length; i++) {
if (vmaps[i].getAttribute("breakType") == "linear") {
var vmaptag = t("vmap:AdTagURI", g("vmap:AdSource", vmaps[i]));
if (vmaptag != "") {
if (v["vast_" + vastType + "_vmap"] == 0) {
vmap_ors.push(vmaptag)
} else {
vmap_ands.push(vmaptag)
}
}
}
}
if (vmap_ands.length > 0) {
o.actions.VastInsertAnd(vmap_ands, _x)
}
if (vmap_ors.length > 0) {
o.actions.VastInsertOr(vmap_ors, _x)
}
_status = 'error';
!_preload ? o.actions.VastRemoveAndPlay() : '';
stop = true
}
}
var pjswrp = t("PjsWrapper", xml);
if (pjswrp) {
var pjswrp2 = pjswrp.split(',');
for (var i = 0; i < pjswrp2.length; i++) {
var y2 = 'wrapper_events' + pjswrp2[i];
if (exist(o[y2])) {
for (var y in o[y2]) {
if (o[y2].hasOwnProperty(y)) {
if (!exist(vast.events[y])) {
vast.events[y] = []
}
vast.events[y] = vast.events[y].concat(o[y2][y])
}
}
}
}
}
var ads = xml.getElementsByTagName("Ad");
if (ads.length > 1) {
var rnd = random(10000, 20000);
o['wrapper_events' + rnd] = [];
for (var y in vast.events) {
if (vast.events.hasOwnProperty(y)) {
o['wrapper_events' + rnd][y] = vast.events[y].slice()
}
}
var ad_ands = [];
var ad_ors = [];
for (var i = 1; i < ads.length; i++) {
var adwp = g("Wrapper", ads[i]);
if (adwp) {
var adtg = t("VASTAdTagURI", adwp);
if (adtg) {
var nx = new XMLSerializer();
var nt = '<VAST><PjsWrapper>' + (pjswrp ? pjswrp + ',' : '') + rnd + '</PjsWrapper>' + nx.serializeToString(ads[i]) + '</VAST>';
if (nt != '') {
if ((adwp.getAttribute("allowMultipleAds") == "true" || v.vast_adsfalland == 1) && v["vast_" + vastType + "_" + "vmap"] == 1) {
ad_ands.push(nt)
} else {
ad_ors.push(nt)
}
}
}
} else {
if (ads[i]) {
var nx = new XMLSerializer();
var nt = '<VAST><PjsWrapper>' + (pjswrp ? pjswrp + ',' : '') + rnd + '</PjsWrapper>' + nx.serializeToString(ads[i]) + '</VAST>';
if (v.vast_adsfalland == 1 || ads[i].getAttribute("allowMultipleAds") == "true") {
ad_ands.push(nt)
} else {
ad_ors.push(nt)
}
}
}
}
if (ad_ands.length > 0) {
o.actions.VastInsertAnd(ad_ands, _x)
}
if (ad_ors.length > 0) {
o.actions.VastInsertOr(ad_ors, _x)
}
}
if (!stop) {
var adxml = g("Ad", xml);
var ad = g("InLine", adxml);
var wrapper = g("Wrapper", adxml);
vast.isWrapper = false;
vast.isVpaid = false;
vast.isImg = false;
_Event("Error", adxml);
if (wrapper) {
vast.isWrapper = true;
ad = wrapper;
vast.wrapper ? vast.wrapper0 += vast.wrapper + ' -> ' : '';
vast.wrapper = t("VASTAdTagURI", ad);
var vz = wrapper.getAttribute("minVisibility");
if (vz) {
if (vz > 0 && exist(o.visibility)) {
if (o.visibility < vz) {
log("Wrapper visibility", (o.visibility + '<' + vz));
vast.file = undefined;
vast.isWrapper = false
}
}
}
}
var xml_string = new XMLSerializer().serializeToString(xml.documentElement);
js("vast_xml", escape(xml_string));
if (ad) {
var creatives;
o.vast_adid += (o.vast_adid != '' ? ' -> ' : '') + adxml.getAttribute("id");
vast.adsystem = t("AdSystem", ad);
creatives = g('Creatives', ad);
_Event("Impression", ad);
_Event("Impress", ad);
var vw = g("ViewableImpression", ad);
if (vw) {
_Event("Viewable", vw);
_Event("NotViewable", vw);
_Event("ViewUndetermined", vw)
}
vast.version = xml.documentElement.getAttribute("version");
_Event("Error", ad);
if (vast.adsystem == "PjsVast" && vast.pjstat) {
vast.events['Error'].push(vast.pjstat + "err")
}
var creative;
if (creatives) {
var crtvs = creatives.getElementsByTagName("Creative");
for (var i = 0; i < crtvs.length; i++) {
creative = g("Linear", crtvs[i]);
var overlays = g("NonLinearAds", crtvs[i]);
if (overlays) {
var over = overlays.getElementsByTagName("NonLinear");
for (var j = 0; j < over.length; j++) {
OverlayParsing(over[j])
}
}
if (creative) {
if (t("Duration", creative) != "") {
vast.duration = seconds(t("Duration", creative))
}
if (t("AdParameters", creative) != "") {
vast.adparameters = t("AdParameters", creative)
}
if (g("MediaFiles", creative)) {
vast.file = _Media("MediaFile", g("MediaFiles", creative));
if (exist(v.vast_denied_files)) {
var dnfs = v.vast_denied_files.split(",");
for (var i = 0; i < dnfs.length; i++) {
if (vast.file.indexOf(dnfs[i]) > -1) {
log("VAST file denied", dnfs[i]);
js("vast_file_denied", vast.file);
vast.file = undefined
}
}
}
}
if (g("TrackingEvents", creative)) {
_Tracking("Tracking", "event", g("TrackingEvents", creative))
}
var clicks = g("VideoClicks", creative);
if (clicks) {
vast.click = t("ClickThrough", clicks);
_Tracking("ClickTracking", "id", clicks)
}
var skipoffset = creative.getAttribute("skipoffset");
if (skipoffset) {
!exist(vast.extensions) ? vast.extensions = [] : '';
vast.extensions.skipTime = seconds(skipoffset)
}
}
var companions = g("CompanionAds", crtvs[i]);
if (companions) {
var cmpns = companions.getElementsByTagName("Companion");
var aspct = 100;
var ppl = 0;
for (var j = 0; j < cmpns.length; j++) {
var sr = g("StaticResource", cmpns[j]);
if (sr) {
var srct = sr.getAttribute("creativeType");
if (srct) {
if (srct.indexOf("image") > -1) {
var tmp = Math.abs(cmpns[j].getAttribute("width") / cmpns[j].getAttribute("height") - o.aspect);
var tmp2 = cmpns[j].getAttribute("width") * cmpns[j].getAttribute("height");
if (tmp < aspct && tmp2 >= ppl) {
aspct = tmp;
ppl = tmp2;
vast.companionImg = textContent(sr);
_Event("CompanionClickThrough", cmpns[j])
}
}
}
}
}
}
}
} !exist(vast.extensions) ? vast.extensions = [] : '';
var extensions = g("Extensions", ad);
if (extensions) {
_Extensions(extensions)
}
}
if (vast.isWrapper) {
vast.wrapperTime = new Date().getTime();
if (vast.wrapper.indexOf('data://text/xml,') == 0) {
log("Wrapper", "XML");
ParsTxt(unescape(vast.wrapper.substr(16)))
} else {
log("Wrapper", vast.wrapper);
LoadXml(vast.wrapper, true)
}
} else {
Done()
}
}
}
}
function Done() {
Event("onVastLoad");
if (exist(vast.file) && o.vok) {
_status = 'ready';
!_preload ? o.actions.VastReady(vast) : ''
} else {
js("vast_empty", VastInfo());
Event("Error", 401);
_status = 'error';
!die_error && !_preload ? o.actions.VastError() : '';
die_error = true
}
}
function g(x, xml) {
if (exist(xml)) {
return xml.getElementsByTagName(x)[0]
} else {
return null
}
}
function t(x, xml, i) {
if (!exist(i)) {
i = 0
}
var y = xml.getElementsByTagName(x)[i];
var z = '';
if (exist(y)) {
if (exist(y.childNodes[0])) {
if (y.childNodes[0].wholeText) {
z = y.childNodes[0].wholeText.trim()
}
}
}
return z
}
function _Event(x, xml) {
if (!exist(vast.events[x])) {
vast.events[x] = []
}
if (exist(xml)) {
if (exist(xml.getElementsByTagName(x)[0])) {
for (var i = 0; i < xml.getElementsByTagName(x).length; i++) {
var y = xml.getElementsByTagName(x)[i].childNodes;
for (var j = 0; j < y.length; j++) {
if (y[j].wholeText) {
var y2 = y[j].wholeText;
if (exist(y[j].nextSibling)) {
if (y[j].nextSibling.localName == "URL") {
y2 = textContent(y[j].nextSibling)
}
}
var z;
if (y2) {
z = y2.replace(/\s+/g, ' ').trim()
}
if (z && z != '') {
if (x == "CompanionClickThrough") {
vast.click = z
} else {
if (vast.events[x].indexOf(z) == -1) {
vast.events[x].push(z)
}
}
if (z.indexOf("pjstat") && x == "Impression") {
vast.pjstat = z
}
}
}
}
}
}
}
}
function _Tracking(x, x2, xml, vpd) {
if (exist(xml.getElementsByTagName(x)[0])) {
for (var i = 0; i < xml.getElementsByTagName(x).length; i++) {
var y = xml.getElementsByTagName(x)[i].getAttribute(x2);
if (x == "ClickTracking" && y != "skipAd") {
y = "click"
}
if (y) {
var n = xml.getElementsByTagName(x)[i].childNodes;
if (vpd == 1) {
!vast.vpdevnts ? vast.vpdevnts = [] : '';
vast.vpdevnts.push(y)
}
if (n.length > 0) {
var z = n[0].wholeText.replace(/\s+/g, ' ').trim();
if (y == "impression") {
y = "Impression"
}
if (y == "progress") {
var prgtime = xml.getElementsByTagName(x)[i].getAttribute("offset");
if (prgtime) {
if (!exist(vast.progresstimes)) {
vast.progresstimes = []
}
vast.progresstimes.push(seconds(prgtime));
y = y + '_' + seconds(prgtime)
}
}
if (!exist(vast.events[y])) {
vast.events[y] = []
}
vast.events[y].push(z)
}
}
}
}
}
function _Extensions(xml) {
if (exist(xml.getElementsByTagName("Extension")[0])) {
var ct = "CustomTracking";
for (var i = 0; i < xml.getElementsByTagName("Extension").length; i++) {
var xi = xml.getElementsByTagName("Extension")[i];
var y = xi.getAttribute("type");
if (y) {
var z = '';
if (exist(xi.childNodes[0])) {
if (exist(xi.childNodes[0].wholeText)) {
z = xi.childNodes[0].wholeText.replace(/\s+/g, ' ').trim()
}
}
var ctx = xi.getElementsByTagName(ct);
var vpd;
if (ctx.length > 0) {
xi = ctx[0];
y == 'subscribeVpaid' ? vpd = 1 : '';
y = ct
}
if (y == ct) {
_Tracking("Tracking", "event", xi, vpd)
}
if (y == "or") {
o.actions.VastInsertOr(t("Extension", xml, i))
}
if (y == "and") {
o.actions.VastInsertAnd(t("Extension", xml, i))
}
var dur = exist(o.media) ? o.media.duration() : 0;
if (y == "Allowblock" && (dur > 120 || dur == 0)) {
if (z == '1') {
if (vastType == "preroll") {
vastUrl.indexOf("vr=1") > 0 ? o.actions.VastInsertAnd(vastUrl.replace("vr=1", "vr=5")) : '';
vastUrl.indexOf("vr=5") > 0 ? o.actions.VastInsertAnd(vastUrl.replace("vr=5", "vr=9")) : ''
}
if (vastType == "midroll") {
vastUrl.indexOf("vr=2") > 0 ? o.actions.VastInsertAnd(vastUrl.replace("vr=2", "vr=6")) : '';
vastUrl.indexOf("vr=6") > 0 ? o.actions.VastInsertAnd(vastUrl.replace("vr=6", "vr=10")) : ''
}
if (vastType == "pauseroll") {
vastUrl.indexOf("vr=3") > 0 ? o.actions.VastInsertAnd(vastUrl.replace("vr=3", "vr=7")) : '';
vastUrl.indexOf("vr=7") > 0 ? o.actions.VastInsertAnd(vastUrl.replace("vr=7", "vr=11")) : ''
}
if (vastType == "postroll") {
vastUrl.indexOf("vr=4") > 0 ? o.actions.VastInsertAnd(vastUrl.replace("vr=4", "vr=8")) : '';
vastUrl.indexOf("vr=8") > 0 ? o.actions.VastInsertAnd(vastUrl.replace("vr=8", "vr=12")) : ''
}
}
} else {
if (y == "loadTime" || y == "skipAd" || y == "addClick" || y == "viewable" || y.indexOf("second") == 0) {
if (y.indexOf("second") == 0) {
if (!exist(vast.events.sec)) {
vast.events.sec = []
}
vast.events.sec.push(parseInt(y.substr(6)))
}
if (!exist(vast.events[y])) {
vast.events[y] = []
}
vast.events[y].push(z)
} else {
if (y.indexOf("Time") > -1 && z != -1) {
z = seconds(z)
}
if (y.indexOf("Txt") > -1) {
z = decodeHtml(z)
}
if (y == "controls") {
var x_control = xml.getElementsByTagName("Extension")[i].getElementsByTagName("control");
if (x_control.length > 0) {
for (var i2 = 0; i2 < x_control.length; i2++) {
if (x_control[i2].getAttribute("id")) {
vast["control_" + x_control[i2].getAttribute("id")] = x_control[i2].getAttribute("layout")
}
}
}
}
if (y == "minVisibility") {
if (z > 0 && v.vast_visibility != 0 && exist(o.visibility)) {
if (o.visibility < z) {
log("VAST visibility", (o.visibility + "<" + z));
js("vast_visibility", (o.visibility + "<" + z));
vast.file = undefined;
vast.isWrapper = false
}
}
}
if (y == "callPjsEvent") {
if (z) {
js(z, VastInfo())
}
}
if (y == "hideAfterComplete") {
vast.hidevpaid = 1
}
if (vast.extensions.extensionsPriority == 1 && z.toString().indexOf('//') == -1) {
if (!exist(vast.extensions[y])) {
vast.extensions[y] = z
}
} else {
vast.extensions[y] = z
}
}
}
}
}
}
}
function _Media(x, xml) {
var r = "";
var mp4 = [];
if (exist(xml.getElementsByTagName(x)[0])) {
for (var i = 0; i < xml.getElementsByTagName(x).length; i++) {
var y = xml.getElementsByTagName(x)[i];
var type = y.getAttribute("type");
var api = y.getAttribute("apiFramework");
r = textContent(y);
if (type) {
vast.filetype = type;
if (type.indexOf("javascript") > -1 && api == "VPAID") {
vast.isVpaid = true;
break
}
if (type.indexOf("mp4") > -1) {
var m = {};
m.x = r;
if (y.getAttribute("width")) {
m.w = y.getAttribute("width")
}
mp4.push(m)
}
if (type.indexOf("image") > -1) {
if (mp4.length == 0) {
vast.isImg = true;
break
}
}
if (type.indexOf("iframe") > -1) {
if (mp4.length == 0) {
vast.isImg = true;
vast.isFrm = true;
break
}
}
}
}
}
if (mp4.length > 0) {
r = mp4[0].x;
var w = 0;
for (var i = 0; i < mp4.length; i++) {
if (mp4[i].w) {
if (mp4[i].w > w) {
r = mp4[i].x;
w = mp4[i].w
}
if (mp4[i].w >= o.screen_w) {
return mp4[i].x
}
}
}
}
return r
}
function textContent(x) {
if (x) {
var y = x.textContent;
if (y) {
return y.replace(/\s+/g, ' ').trim()
}
}
}
function vastURL(x, wrap) {
if (x.indexOf("prt") == 0) {
partner = true;
x = Prt(x);
log("VASTP " + vast.prt)
}
if (x.indexOf('random') == -1 && v.vast_addrandom == 1 && x.indexOf('//') > -1) {
x = x + (x.indexOf('?') == -1 ? '?' : '&') + 'rand=(random)'
}
x = x.replace(/\{/g, "(");
x = x.replace(/\}/g, ") ");
x = x.replace(/\(ref\)/g, Href());
x = x.replace(/\(referer\)/g, Href());
x = x.replace(/\(rand_id\)/g, o.sessid);
x = x.replace(/\(userid\)/g, o.userid);
x = x.replace(/\(host\)/g, encodeURIComponent(o.domain));
x = x.replace(/\(referrer\)/g, encodeURIComponent(exist(v.parent_domain) ? v.parent_domain : document.referrer));
x = x.replace(/\(rereferer\)/g, encodeURIComponent(exist(v.parent_domain) ? v.parent_domain : document.referrer));
x = x.replace(/\(random\)/g, Math.random());
x = x.replace(/\(vast_id1\)/g, v.vast_id1);
x = x.replace(/\[random\]/g, Math.random());
x = x.replace(/\(adblock\)/g, (o.ab ? 1 : 0));
x = x.replace(/\[CACHEBUSTING\]/g, Math.random());
x = x.replace(/\(width\)/g, o.screen_w);
x = x.replace(/\(bitrate\)/g, existv(o.bitrate, 0));
x = x.replace(/\(videowidth\)/g, (o.media ? o.media.size().width : ''));
x = x.replace(/\(videoheight\)/g, (o.media ? o.media.size().height : ''));
x = x.replace(/\(quality\)/g, apiProcessor("quality"));
x = x.replace(/\(height\)/g, o.screen_h);
x = x.replace(/\(duration\)/g, o.media ? o.media.duration() : 0);
x = x.replace(/\(visibility\)/g, (exist(o.visibility) ? o.visibility : -1));
if (x.indexOf("(platform)") > 0) {
o.system.tv ? x = x.replace(/\(platform\)/g, "smarttv") : '';
if (o.system.mobile) {
x = x.replace(/\(platform\)/g, "mobile")
} else {
x = x.replace(/\(platform\)/g, "web-html5")
}
}
for (var i = 1; i < 6; i++) {
var y = '';
i > 1 ? y = i : '';
if (x.indexOf("(timeout" + y + ":") > 0) {
var re = new RegExp('\\(timeout' + y + ':\\d*\\)', 'g');
var to = x.match(re);
if (to.length > 0) {
var tmp = to[0].substr(to[0].indexOf(":") + 1);
tmp = tmp.substr(0, tmp.indexOf(")"));
if (y == '') {
v.vast_timeout = tmp * 1;
v.vpaid_timeout = tmp * 1
} else {
v['vpaid_timeout' + y] = tmp * 1
}
}
x = x.replace(re, '')
}
}
if (x.indexOf("(connection)") > 0) {
var cn = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
x = x.replace(/\(connection\)/g, ((typeof (cn) != "undefined" && typeof (cn.type) != "undefined") ? cn.type : "undefined"))
}
x = VastReplace(x);
if (wrap != true) {
v.vpaidimpression == 1 || x.indexOf("vpaidimpression") > 0 ? vast.vpaidImOnVdSrt = 1 : ''
}
if (x.indexOf("http://") == 0) {
x = '//' + x.substr(7)
}
return x
}
function seconds(x) {
var y = x.split(":");
var z = 0;
if (y.length == 3) {
z = parseInt(y[0]) * 3600 + parseInt(y[1]) * 60 + parseInt(y[2])
}
if (y.length == 2) {
z = parseInt(y[0]) * 60 + parseInt(y[1])
}
return z
}
function decodeHtml(x) {
var div;
if (x) {
div = createElement('div');
div.innerHTML = x;
return decodeURIComponent(div.textContent)
} else {
return void 0
}
}
function Event(x, code) {
if (exist(vast)) {
if ((exist(vast.prt) && v.eventstrackervast == 0) || vast.adsystem == "intro" || vast.adsystem == "outro") { } else {
code > 0 ? js(("vast_" + x), code) : js("vast_" + x)
}
if (exist(vast.events[x])) {
for (var i = 0; i < vast.events[x].length; i++) {
log("VAST " + x);
var stop = false;
var z = vast.events[x][i];
if (code > 0) {
if (z.indexOf("[ERRORCODE]") > 0) {
z = z.replace("[ERRORCODE]", code)
}
}
if (z.indexOf("(time)") > 0) {
z = z.replace("(time)", _ltime)
}
if (z.indexOf("(url)") > 0) {
z = z.replace("(url)", encodeURIComponent(vastUrl))
}
z = VastReplace(z);
z = z.replace("(adblock)", (o.ab ? 1 : 0));
if (z.indexOf(".pjstat") > 0) {
z = z + "&h=" + (exist(v.parent_domain) ? v.parent_domain : o.d) + (v.ab == 1 ? "&a=" + (o.ab ? 1 : 0) : '') + (o.vasttype == 'overlay' ? '&r=1' : '') + '&s=' + o.sessid
}
if (!stop) {
gif(z)
}
}
}
}
}
function AddEvnt(x, y) {
if (!exist(vast.events[y])) {
vast.events[y] = []
}
if (x) {
var z = x.split(",");
for (var i = 0; i < z.length; i++) {
z[i] = z[i].replace(/\(random\)/g, random(1000, 2000));
if (vast.events.indexOf(y) == -1) {
vast.events[y].push(z[i])
}
}
}
}
function VastReplace(x) {
x = x.replace(/\(visibility\)/g, (exist(o.visibility) ? o.visibility : -1));
if (typeof v.vast_replace == "string") {
try {
v.vast_replace = v.vast_replace.replace(/'/ig, '"');
v.vast_replace = JSON.parse(v.vast_replace)
} catch (e) {
log(e)
}
}
if (typeof v.vast_replace == "object") {
for (var y in v.vast_replace) {
if (v.vast_replace.hasOwnProperty(y)) {
for (var i = 0; i < 5; i++) {
x = x.replace(y, v.vast_replace[y])
}
}
}
}
return x
}
this.Ready = function () {
o.actions.VastReady(vast)
}; this.disablePreload = function () {
_preload = false
}; this.Status = function () {
return _status
}; this.info = function (x) {
return vast ? vast[x] : false
}; this.getVolume = function () {
return undefined
}; this.preloaded = function (x) {
return _preloaded.indexOf(x) > -1
};
function Prt(x) {
if (x.indexOf('[imp]') > 0) {
var tmp = x.indexOf('[imp]');
var tmp2 = x.substr(tmp + 5, x.indexOf('_') - (tmp + 5));
AddEvnt(tmp2, 'Impression');
AddEvnt(tmp2 + 'err', 'Error');
x = x.substr(0, tmp) + x.substr(x.indexOf('_'))
}
if (x.indexOf('[pimp]') > 0) {
var tmp = x.indexOf('[pimp]');
var tmp2 = x.substr(tmp + 6, x.indexOf('**') - (tmp + 6));
AddEvnt(tmp2, 'Impression');
x = x.substr(0, tmp) + x.substr(x.indexOf('**') + 2)
}
if (x.indexOf('prtcpm') == 0) {
vast.cpm = x.substr(6, 4);
vast.prt = x.substr(10, x.indexOf('_') - 10)
} else {
vast.prt = x.substr(3, x.indexOf('_') - 3)
}
if (vast.cpm) {
var xx = 'https://' + vast.cpm + '-c73e.kxcdn.com/' + vast.cpm;
o.vast ? o.vast.imp(xx) : '';
AddEvnt(xx, 'Impression')
}
x = x.substr(x.indexOf('_') + 1);
return x
}
function OverlayParsing(x) {
if (x) {
vast.overlay = [];
vast.overlay.width = x.getAttribute("width");
vast.overlay.height = x.getAttribute("height");
var dur = x.getAttribute("minSuggestedDuration");
if (dur) {
vast.duration = seconds(dur)
}
vast.overlay.scalable = x.getAttribute("scalable");
vast.file = textContent(g("StaticResource", x));
_Event("NonLinearClickTracking", x);
var so = x.getAttribute("skipoffset");
if (so) {
!vast.extensions ? vast.extensions = [] : '';
vast.extensions.skipTime = seconds(so)
}
vast.click = textContent(g("NonLinearClickThrough", x))
}
}
function DestroyIma() {
if (o.ima) {
try {
o.ima.Destroy()
} catch (e) {
log(o.ima, e)
}
o.ima = undefined
}
}
};
var VastVideo = function () {
var vast;
var over = o.mousehere;
var no = ['desktop', 'mobile', 'mobiletv', 'tv', 'lg', 'winmob'];
o.vastcontainer = createElement("div");
css(o.vastcontainer, {
"position": "absolute",
"left": 0,
"top": 0,
"width": "100%",
"height": "100%",
"background-color": (exist(v.vast_bgcolor) ? v.vast_bgcolor : "#000000")
});
if (exist(v.vast_bga)) { } else {
v.hidevideo == 1 ? v.vast_bga = 0.5 : ''
}
css(o.vastcontainer, {
"opacity": v.vast_bga
});
o.frame.appendChild(o.vastcontainer);
if (!o.system.mobile) {
o.vastcontainer.addEventListener("mouseover", onOver, false);
o.vastcontainer.addEventListener("mouseleave", onOut, false)
}
var tag = createElement("video");
o.vastcontainer.appendChild(tag);
o.vastcontainer.style.zIndex = 1001;
hide(o.vastcontainer);
css(tag, {
'width': '100%',
'height': '100%',
'object-fit': 'contain',
'min-height': 'auto',
'max-height': 'none',
'min-width': 'auto',
'max-width': 'none'
});
if (v.vpaid_waitstart !== 1) {
css(tag, {
'autoplay': 1
})
}
attr(tag, {
'preload': 'auto',
'x-webkit-airplay': 'deny',
'webkit-playsinline': true,
'cursor': 'pointer',
'playsinline': '1',
'pip': 'false'
});
if (v.vast_unmutehover == 1 || v.vast_unmutebut == 1) {
tag.muted = true;
attr(tag, {
'muted': 'true'
})
}
var duration;
var paused;
var controls;
var uiplay, uiplay2;
var uibuffer;
var uiposter;
var uit;
var uitxt;
var uimute;
var uifull;
var uinorm;
var uiunmutebut;
var uiprogress;
var uix;
var uiskip;
var vpaidframe;
var vpaidslot;
var vpaidslot2;
var vpaid;
var vpaid_int;
var vpaidframe_int;
var vpaid_t;
var vpaid_stop_t;
var vpaid_complete_t;
var push_wait_int;
var video_t;
var vpaidvolume = 1;
var vpaidvolume2;
var vpaidstopped = false;
var vpaidstarted = false;
var vaststarted = false;
var vpaidskipped = false;
var vpaidcompleted = false;
var vpaidvideostarted = false;
var vpaidquartile = false;
var vpaid_int2;
var removed = false;
var last_skiptime = 0;
var last_time = 0;
var imgtime = 0;
var img_int;
var _move = false;
var _go = false;
var _muted = false;
var muteicon = "<svg width='20' height='20' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg'><g><path fill='" + v.vast_volumecolor + "' stroke-width='0' d='m2.49931,6.8746l0,6.25079l3.10029,0l4.64114,4.37461l0.00276,-15l-4.64182,4.37461l-3.10237,0l0,-0.00001zm10.44167,-0.75275c-0.26762,-0.30766 -0.69733,-0.30766 -0.96359,0.00158c-0.26557,0.30925 -0.26557,0.80989 0.00136,1.11992l0,-0.00157c0.58769,0.68334 0.94997,1.62056 0.94997,2.66218c0,1.04083 -0.3616,1.97489 -0.94861,2.65823c-0.2683,0.30766 -0.2683,0.8083 -0.00136,1.11912c0.13279,0.15423 0.30713,0.23173 0.48146,0.23173c0.17501,0 0.34934,-0.0775 0.48213,-0.23173c0.83216,-0.9649 1.34835,-2.30548 1.34767,-3.77735c0.00068,-1.47504 -0.51755,-2.8172 -1.34903,-3.7821l0,-0.00001zm1.55246,-1.75907c-0.27124,0.30979 -0.27124,0.81211 0,1.12031c1.00334,1.14962 1.62195,2.73104 1.62195,4.4852c0,1.75256 -0.61861,3.3332 -1.62056,4.48361c-0.27125,0.30899 -0.27125,0.81053 0,1.12031c0.13493,0.1545 0.31208,0.23214 0.48991,0.23214c0.17713,0 0.35428,-0.07764 0.48921,-0.23214c1.25105,-1.43327 2.02674,-3.41876 2.02536,-5.60392c0.00069,-2.18675 -0.775,-4.17383 -2.02813,-5.60551c-0.27194,-0.30979 -0.70857,-0.30979 -0.97774,0z'/></g></svg>";
var unmuteicon = "<svg width='20' height='20' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg'><g><path fill='" + v.vast_volumecolor + "' stroke-width='0' d='m2.49931,6.8746l0,6.25079l3.10029,0l4.64114,4.37461l0.00276,-15l-4.64182,4.37461l-3.10237,0l0,-0.00001z'/><path d='m18.125,12.20836l-2.20816,-2.20816l2.20776,-2.20816l-1.13498,-1.13579l-2.20816,2.20816l-2.20816,-2.20816l-1.13498,1.13579l2.20776,2.20816l-2.20816,2.20816l1.13579,1.13539l2.20776,-2.20816l2.20776,2.20816' fill-opacity='null' stroke-opacity='null' stroke-width='0' fill='" + v.vast_volumecolor + "'/></g></svg>";
var impression = false;
var remainigs = 0;
var unmute_volume = 0;
var slow_unmute;
var js_events;
var remove_t;
var complete_t;
var ytag;
var youtube = false;
var vimeo = false;
var mp3 = false;
var ytinterval;
var imps = [];
var qrts = [];
var start_timeout = true;
if (v.vpaid_waitstart !== 1) {
var pp = tag.play();
if (pp !== undefined) {
pp.then(function () { }).catch(function (error) {
if (error.message.indexOf("interact") > 0) {
log("play mute");
tag.muted = true;
attr(tag, {
'muted': 'true'
})
}
})
}
}
this.break = function () {
if (exist(uiplay)) {
log("VAST break");
onError()
}
};
this.Go = function (x) {
removed ? show(tag) : '';
tag.volume = 0.4;
duration = 0;
paused = false;
controls = true;
impression = false;
remainigs = 0;
removed = false;
last_time = 0;
last_skiptime = 0;
vast = x;
die_error = false;
js_events = [];
_go = true;
show(o.vastcontainer);
if (exist(vast.extensions.controls)) {
if (vast.extensions.controls === 0 || vast.extensions.controls === "0") {
controls = false
}
}
if (vast.nocontrols == 1 || v.vast_nocontrols == 1) {
if (vast.nocontrolsvpaid == 1) {
vast.isVpaid ? controls = false : ''
} else {
controls = false
}
}
if (vast.yescontrols == 1) {
controls = true
}
if (o.controls) {
if (o.controls.SettingsVisible()) {
o.controls.Settings()
}
}
if (exist(vast.prt)) {
vast.prtg = 1
}
if (vast.isVpaid && v.vast_novpaid == 1) {
onError('NO VPAID');
return
}
var stop = false;
if (exist(vast.file)) {
if (vast.file.indexOf('youtube.com/') > -1 || vast.file.indexOf('youtu.be/') > -1) {
youtube = true
}
if (v.vimeo == 1 && vast.file.indexOf('vimeo.com/') > -1) {
vimeo = true
}
if (vast.file.indexOf('.mp3') > -1) {
mp3 = true
}
if (vast.adsystem == "intro") {
for (var i = 0; i < no.length; i++) {
if (vast.file.indexOf('[no_' + no[i] + ']') > -1) {
vast.file = vast.file.replace('[no_' + no[i] + ']', '');
if (o.system[no[i]]) {
onError("no " + no[i]);
stop = true;
break
}
}
}
}
}
if (!stop) {
if (vast.isImg || vast.isVpaid || youtube || vimeo) {
vpaidslot = createElement("div");
o.vastcontainer.appendChild(vpaidslot);
css(vpaidslot, {
"position": "absolute",
"top": "0",
"left": "0",
"width": "100%",
"height": "100%"
})
}
if (youtube) {
ytag = new MediaYoutube('intro' + vast.file, vpaidslot)
}
if (vimeo) {
ytag = new MediaVimeo('intro' + vast.file, vpaidslot)
}
if (!youtube && !vimeo) {
var elm = vast.isImg ? vpaidslot : tag;
if (o.system.mobile) {
elm.removeEventListener("touchstart", onTouchStart);
elm.removeEventListener("touchmove", onTouchMove);
elm.removeEventListener("touchend", onScreenClick)
} else {
elm.removeEventListener("click", onScreenClick)
}
var _clck = true;
if (exist(vast.extensions.isClickable)) {
_clck = vast.extensions.isClickable == 1
}
if (_clck) {
if (o.system.mobile) {
elm.addEventListener("touchend", onScreenClick);
elm.addEventListener("touchstart", onTouchStart);
elm.addEventListener("touchmove", onTouchMove)
} else {
elm.addEventListener("click", onScreenClick);
css(elm, {
"cursor": "pointer"
})
}
}
}
RemoveInterface();
uiplay = createElement("div");
css(uiplay, {
"position": "absolute",
"top": "0",
"left": "0",
"width": "100%",
"height": "100%",
"display": "none",
"cursor": "pointer",
"z-index": 1
});
o.vastcontainer.appendChild(uiplay);
uiplay2 = createElement("div");
css(uiplay2, {
"position": "absolute",
"top": "50%",
"left": "50%",
"margin-left": -10,
"margin-top": -10,
"cursor": "pointer",
"background": "rgba(0,0,0,0.5)",
"border-radius": 20,
"width": 20,
"height": 20,
"padding": "3px 2px 3px 4px",
"zIndex": 1
});
if (o.system.safari && o.system.desktop) {
css(uiplay2, {
"zoom": "3"
})
} else {
css(uiplay2, {
"transform": "scale(3)"
})
}
uiplay2.innerHTML = "<svg width='20' height='20' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg'><g><path d='m4.59375,3.48438l-0.03125,13.03125l10.875,-6.51563l-10.84375,-6.51562z' fill='#ffffff'/></g></svg>";
uiplay.appendChild(uiplay2);
if (o.system.mobile) {
uiplay.addEventListener("touchend", onScreenClick)
} else {
uiplay.addEventListener("click", onScreenClick)
}
if (vast.companionImg && mp3) {
uiposter = createElement("div");
css(uiposter, {
"position": "absolute",
"top": "0",
"left": "0",
"width": "100%",
"height": "100%",
"pointerEvents": "none",
"background": "url(" + vast.companionImg + ") 50% 50% no-repeat",
"background-size": "contain"
});
o.vastcontainer.appendChild(uiposter)
}
if (uibuffer) {
RemoveControl('uibuffer')
}
uibuffer = createElement("div");
css(uibuffer, {
"position": "absolute",
"top": "50%",
"left": "50%",
"pointerEvents": "none",
"zIndex": 1
});
if (v.control_buffer.icon && v.vast_buffering != 0) {
controlCSS(v.control_buffer.icon, v.control_buffer.color, uibuffer);
o.vastcontainer.appendChild(uibuffer);
v.control_buffer.scale ? css(uibuffer, {
"transform": "scale(" + v.control_buffer.scale + ")"
}) : '';
vast.buffering = true
}
if (controls || v.vast_title_important == 1) {
if (vast.introtitle == 0) { } else {
if (v.vast_title == 1) {
uit = createElement("div");
css(uit, {
"font-size": existv(v.vast_title_size, 14) * existv(v.globalfs, 1),
"color": v.vast_titlecolor,
"position": "absolute",
"top": existv(v.vast_title_top, 0),
"left": existv(v.vast_title_left, 0),
"background-color": hex2rgb(v.vast_titlebgcolor, existv(v.vast_titlebga, 0)),
"opacity": existv(v.vast_titlea, 1),
"padding": "5px 8px 5px 8px",
"box-sizing": "border-box",
"zIndex": 1
});
o.vastcontainer.appendChild(uit);
vast.uititle = Lang("ads");
if (exist(v.vast_title_text)) {
if (v.vast_title_text != '') {
vast.uititle = v.vast_title_text
}
}
uit.innerHTML = vast.uititle + (v["vast_" + o.vasttype + "_" + "counter"] == 1 ? (o.adscounter <= o.adsinchain ? (o.adsinchain > 1 ? ' ' + o.adscounter + '/' + o.adsinchain : '') : '') : '')
}
}
}
if (controls) {
if (exist(vast.control_adlabel)) {
if (vast.control_adlabel === "0" || vast.control_adlabel === "-1") {
css(uit, {
"top": -1000
})
} else {
if (vast.control_adlabel !== "1") {
if (vast.control_adlabel == "TR" || vast.control_adlabel == "BR") {
css(uit, {
"right": 0,
"left": "auto"
})
}
if (vast.control_adlabel == "BR" || vast.control_adlabel == "BL") {
css(uit, {
"bottom": 0,
"top": "auto"
})
}
}
}
}
if (exist(vast.extensions.linkTxt)) {
if ((o.system.mobile && v.vast_linktxtonmobile == 0) || vast.extensions.linkTxt == '') { } else {
if (!exist(uitxt)) {
uitxt = createElement("div");
css(uitxt, {
"position": "absolute",
"bottom": 50,
"margin-left": "auto",
"margin-right": "auto",
"left": 0,
"right": 0,
"font-size": existv(v.vast_linktxt_size, (o.system.mobile ? 12 : 14)) * existv(v.globalfs, 1),
"color": v.vast_linktxtcolor,
"display": "table",
"width": "50%",
"text-align": "center",
"zIndex": 1
});
uitxt.innerHTML = "<pjspan style='background:" + hex2rgb(v.vast_linktxtbgcolor, 1) + ";padding: 7 px 15 px;border-radius: 20 px;display: inline-block;cursor: pointer '>" + vast.extensions.linkTxt + "</pjspan>";
o.vastcontainer.appendChild(uitxt);
if (vast.click == '' && vast.isVpaid) {
PtrNn(uitxt);
css(uitxt, {
"pointer-events": "none"
})
} else {
uitxt.firstElementChild.addEventListener('click', onInvite)
}
hide2(uitxt);
if (!o.mouseHere && !o.system.mobile) { } else {
setTimeout(function () {
show2(uitxt)
}, 200)
}
} else {
show2(uitxt);
uitxt.innerHTML = vast.extensions.linkTxt
}
}
} else {
if (exist(uitxt)) {
hide2(uitxt)
}
}
uimute = createElement("div");
CreateUiBut(uimute, 10, 10, muteicon, onToggleMute);
if (exist(vast.control_soundbtn)) {
var tmp = vast.control_soundbtn;
if (tmp === "0") {
hide(uimute);
css(uimute, {
"top": -1000
})
} else {
if (tmp !== "1") {
if (tmp == "TR") {
css(uimute, {
"bottom": "auto",
"top": 10,
"right": 10
})
}
if (tmp == "TL") {
css(uimute, {
"bottom": "auto",
"top": 10,
"right": "auto",
"left": 10
})
}
if (tmp == "BL") {
css(uimute, {
"bottom": 10,
"right": "auto",
"left": 10
})
}
}
}
}
uiprogress = createElement("div");
o.vastcontainer.appendChild(uiprogress);
uiprogress.innerHTML = '<svg id="pljsvastprogress_' + v.id + '" width="20" height="20" viewPort="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" style="transform:rotate(-90deg);float: left "><circle r="9 " cx="10 " cy="10 " fill=" transparent " stroke-dasharray="56.48 " stroke-dashoffset="0 " stroke-width="2 " style="stroke: ' + v.vast_progresscolor + ';opacity: 0.3 "></circle><circle id="pljsvastprogressbar_ ' + v.id + '" r="9 " cx="10 " cy="10 " fill=" transparent " stroke-dasharray="56.48 " stroke-dashoffset="0 " stroke-width="2 " style="stroke: ' + v.vast_progresscolor + ';opacity: 0; -webkit-transform-origin: center center;transform-origin: center center;"></circle></svg>';
css(uiprogress, {
"border-radius": 30,
"padding": 5,
"overflow": "hidden",
"height": "auto",
"height": 20,
"position": "absolute",
"bottom": 10,
"left": 10,
"transform-origin": "center center",
"transition": "background-color 0.2s linear",
"zIndex": 1,
"background-color": hex2rgb(v.vast_progressbgcolor, existv(v.vast_progressbga, 0.5))
});
uiskip = createElement("div");
css(uiskip, {
"padding": "3px 10px 0 12px",
"float": "left",
"display": "inline-block",
"font-size": existv(v.vast_skip_size, 16) * existv(v.globalfs, 1),
"color": v.vast_skipcolor,
"visibilty": "hidden",
"transition": "background-color 0.2s linear,opacity 0.2s linear",
"display": "none",
"zIndex": 1
});
uiskip.innerHTML = Lang("skip");
if (v.vast_skip2right == 1) {
o.vastcontainer.appendChild(uiskip);
css(uiskip, {
"padding": 10,
"float": "none"
});
onOutSkip()
} else {
uiprogress.appendChild(uiskip)
}
uix = createElement("div");
css(uix, {
"position": "absolute",
"top": -100,
"right": 0,
"width": 40,
"height": 40,
"padding": 10,
"opacity": 0,
"visibilty": "hidden",
"transition": "background-color 0.2s linear,opacity 0.2s linear",
"cursor": "pointer",
"box-sizing": "border-box",
"zIndex": 1
});
uix.innerHTML = "<svg width='20' height='20' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg'><g><path d='M19.25,0.75 L0.75,19.25 L19.25,0.75 Z' stroke='#FFFFFF' stroke-width='3' stroke-linecap='square' style='pointer-events:none'></path><path d='M0.75,0.75 L19.25,19.25 L0.75,0.75 Z' stroke='" + v.vast_xcolor + "' stroke-width='3' stroke-linecap='square'></path></g></svg>";
onOutX();
o.vastcontainer.appendChild(uix);
uix.onclick = onClose;
uix.addEventListener('mouseover', function () {
css(uix, {
"background-color": hex2rgb(v.vast_xbgcolor, existv(v.vast_xbga, 0.5) + 0.3)
})
});
uix.addEventListener('mouseout', onOutX);
function onOutX(e) {