stream-engine-player 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -13333,8 +13333,8 @@
|
|
13333
13333
|
}
|
13334
13334
|
var global2 = get_self_scope_1.getSelfScope();
|
13335
13335
|
function consolePrintFn(type2) {
|
13336
|
-
var
|
13337
|
-
if (
|
13336
|
+
var func = global2.console[type2];
|
13337
|
+
if (func) {
|
13338
13338
|
return function() {
|
13339
13339
|
var args = [];
|
13340
13340
|
for (var _i2 = 0; _i2 < arguments.length; _i2++) {
|
@@ -13343,7 +13343,7 @@
|
|
13343
13343
|
if (args[0]) {
|
13344
13344
|
args[0] = formatMsg(type2, args[0]);
|
13345
13345
|
}
|
13346
|
-
|
13346
|
+
func.apply(global2.console, args);
|
13347
13347
|
};
|
13348
13348
|
}
|
13349
13349
|
return noop2;
|
@@ -22091,20 +22091,20 @@
|
|
22091
22091
|
if (Array.isArray(type2)) {
|
22092
22092
|
return _handleMultipleEvents(one, elem, type2, fn);
|
22093
22093
|
}
|
22094
|
-
var
|
22095
|
-
off(elem, type2,
|
22094
|
+
var func = function func2() {
|
22095
|
+
off(elem, type2, func2);
|
22096
22096
|
fn.apply(this, arguments);
|
22097
22097
|
};
|
22098
|
-
|
22099
|
-
on(elem, type2,
|
22098
|
+
func.guid = fn.guid = fn.guid || newGUID();
|
22099
|
+
on(elem, type2, func);
|
22100
22100
|
}
|
22101
22101
|
function any(elem, type2, fn) {
|
22102
|
-
var
|
22103
|
-
off(elem, type2,
|
22102
|
+
var func = function func2() {
|
22103
|
+
off(elem, type2, func2);
|
22104
22104
|
fn.apply(this, arguments);
|
22105
22105
|
};
|
22106
|
-
|
22107
|
-
on(elem, type2,
|
22106
|
+
func.guid = fn.guid = fn.guid || newGUID();
|
22107
|
+
on(elem, type2, func);
|
22108
22108
|
}
|
22109
22109
|
var Events = /* @__PURE__ */ Object.freeze({
|
22110
22110
|
fixEvent,
|
@@ -22134,7 +22134,7 @@
|
|
22134
22134
|
};
|
22135
22135
|
return throttled;
|
22136
22136
|
};
|
22137
|
-
var debounce = function debounce2(
|
22137
|
+
var debounce = function debounce2(func, wait, immediate, context) {
|
22138
22138
|
if (context === void 0) {
|
22139
22139
|
context = window_1$1;
|
22140
22140
|
}
|
@@ -22150,11 +22150,11 @@
|
|
22150
22150
|
timeout = null;
|
22151
22151
|
_later = null;
|
22152
22152
|
if (!immediate) {
|
22153
|
-
|
22153
|
+
func.apply(self2, args);
|
22154
22154
|
}
|
22155
22155
|
};
|
22156
22156
|
if (!timeout && immediate) {
|
22157
|
-
|
22157
|
+
func.apply(self2, args);
|
22158
22158
|
}
|
22159
22159
|
context.clearTimeout(timeout);
|
22160
22160
|
timeout = context.setTimeout(_later, wait);
|
@@ -43276,7 +43276,7 @@
|
|
43276
43276
|
default: videojs$1
|
43277
43277
|
}, Symbol.toStringTag, { value: "Module" }));
|
43278
43278
|
const name$1 = "stream-engine-player";
|
43279
|
-
const version$2 = "0.0.
|
43279
|
+
const version$2 = "0.0.11";
|
43280
43280
|
const description = "Stream engine player";
|
43281
43281
|
const type$1 = "module";
|
43282
43282
|
const files$1 = [
|
@@ -43306,7 +43306,8 @@
|
|
43306
43306
|
"video.js": "7.6.6",
|
43307
43307
|
"videojs-youtube": "^2.6.1",
|
43308
43308
|
"videojs-ima": "1.7.5",
|
43309
|
-
"videojs-contrib-ads": "6.6.5"
|
43309
|
+
"videojs-contrib-ads": "6.6.5",
|
43310
|
+
"videojs-mux": "4.19.0"
|
43310
43311
|
};
|
43311
43312
|
const devDependencies$1 = {
|
43312
43313
|
concurrently: "^8.2.1",
|
@@ -43592,11 +43593,11 @@
|
|
43592
43593
|
QueueItem.prototype.otherCallRejected = function(value) {
|
43593
43594
|
unwrap(this.promise, this.onRejected, value);
|
43594
43595
|
};
|
43595
|
-
function unwrap(promise,
|
43596
|
+
function unwrap(promise, func, value) {
|
43596
43597
|
immediate(function() {
|
43597
43598
|
var returnValue;
|
43598
43599
|
try {
|
43599
|
-
returnValue =
|
43600
|
+
returnValue = func(value);
|
43600
43601
|
} catch (e) {
|
43601
43602
|
return handlers.reject(promise, e);
|
43602
43603
|
}
|
@@ -43668,10 +43669,10 @@
|
|
43668
43669
|
onError2(result.value);
|
43669
43670
|
}
|
43670
43671
|
}
|
43671
|
-
function tryCatch(
|
43672
|
+
function tryCatch(func, value) {
|
43672
43673
|
var out = {};
|
43673
43674
|
try {
|
43674
|
-
out.value =
|
43675
|
+
out.value = func(value);
|
43675
43676
|
out.status = "success";
|
43676
43677
|
} catch (e) {
|
43677
43678
|
out.status = "error";
|
@@ -45644,12 +45645,12 @@
|
|
45644
45645
|
loadData: function(data) {
|
45645
45646
|
angular.extend(this, data);
|
45646
45647
|
},
|
45647
|
-
exec: function(
|
45648
|
-
if (this[
|
45648
|
+
exec: function(func, args) {
|
45649
|
+
if (this[func]) {
|
45649
45650
|
if (!args || args.constructor !== Array) {
|
45650
45651
|
args = [args];
|
45651
45652
|
}
|
45652
|
-
this[
|
45653
|
+
this[func].apply(this, args);
|
45653
45654
|
}
|
45654
45655
|
},
|
45655
45656
|
whenReady: function() {
|
@@ -52726,6 +52727,2219 @@
|
|
52726
52727
|
plugin.pluginName = "sourceSelector";
|
52727
52728
|
return plugin;
|
52728
52729
|
});
|
52730
|
+
var videojsMux = { exports: {} };
|
52731
|
+
const require$$0 = /* @__PURE__ */ getAugmentedNamespace(video_es);
|
52732
|
+
/*!
|
52733
|
+
* videojs-mux
|
52734
|
+
* @version 4.19.0
|
52735
|
+
* @copyright 2024 Mux, Inc.
|
52736
|
+
*/
|
52737
|
+
(function(module2, exports2) {
|
52738
|
+
!function() {
|
52739
|
+
!function(e, t) {
|
52740
|
+
module2.exports = t(require$$0);
|
52741
|
+
}(this, function(e) {
|
52742
|
+
return function() {
|
52743
|
+
var t = { 48: function(e2, t2, a2) {
|
52744
|
+
var r2;
|
52745
|
+
r2 = "undefined" != typeof window ? window : void 0 !== a2.g ? a2.g : "undefined" != typeof self ? self : {}, e2.exports = r2;
|
52746
|
+
}, 855: function(t2) {
|
52747
|
+
t2.exports = e;
|
52748
|
+
} }, a = {};
|
52749
|
+
function r(e2) {
|
52750
|
+
var n2 = a[e2];
|
52751
|
+
if (void 0 !== n2)
|
52752
|
+
return n2.exports;
|
52753
|
+
var i2 = a[e2] = { exports: {} };
|
52754
|
+
return t[e2](i2, i2.exports, r), i2.exports;
|
52755
|
+
}
|
52756
|
+
r.n = function(e2) {
|
52757
|
+
var t2 = e2 && e2.__esModule ? function() {
|
52758
|
+
return e2.default;
|
52759
|
+
} : function() {
|
52760
|
+
return e2;
|
52761
|
+
};
|
52762
|
+
return r.d(t2, { a: t2 }), t2;
|
52763
|
+
}, r.d = function(e2, t2) {
|
52764
|
+
for (var a2 in t2)
|
52765
|
+
r.o(t2, a2) && !r.o(e2, a2) && Object.defineProperty(e2, a2, { enumerable: true, get: t2[a2] });
|
52766
|
+
}, r.g = function() {
|
52767
|
+
if ("object" == typeof globalThis)
|
52768
|
+
return globalThis;
|
52769
|
+
try {
|
52770
|
+
return this || new Function("return this")();
|
52771
|
+
} catch (e2) {
|
52772
|
+
if ("object" == typeof window)
|
52773
|
+
return window;
|
52774
|
+
}
|
52775
|
+
}(), r.o = function(e2, t2) {
|
52776
|
+
return Object.prototype.hasOwnProperty.call(e2, t2);
|
52777
|
+
}, r.r = function(e2) {
|
52778
|
+
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
|
52779
|
+
};
|
52780
|
+
var n = {};
|
52781
|
+
return function() {
|
52782
|
+
r.r(n), r.d(n, { register: function() {
|
52783
|
+
return Ta;
|
52784
|
+
} });
|
52785
|
+
var e2 = r(48), t2 = r.n(e2), a2 = r(855), i2 = r.n(a2), o = Object.create, s = Object.defineProperty, u = Object.getOwnPropertyDescriptor, d = Object.getOwnPropertyNames, l = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, p = function(e3, t3) {
|
52786
|
+
return function() {
|
52787
|
+
return e3 && (t3 = e3(e3 = 0)), t3;
|
52788
|
+
};
|
52789
|
+
}, f = function(e3, t3) {
|
52790
|
+
return function() {
|
52791
|
+
return t3 || e3((t3 = { exports: {} }).exports, t3), t3.exports;
|
52792
|
+
};
|
52793
|
+
}, _2 = function(e3, t3, a3) {
|
52794
|
+
return a3 = null != e3 ? o(l(e3)) : {}, function(e4, t4, a4, r2) {
|
52795
|
+
if (t4 && "object" == typeof t4 || "function" == typeof t4)
|
52796
|
+
for (var n2, i3 = d(t4), o2 = 0, l2 = i3.length; o2 < l2; o2++)
|
52797
|
+
n2 = i3[o2], !c.call(e4, n2) && n2 !== a4 && s(e4, n2, { get: function(e5) {
|
52798
|
+
return t4[e5];
|
52799
|
+
}.bind(null, n2), enumerable: !(r2 = u(t4, n2)) || r2.enumerable });
|
52800
|
+
return e4;
|
52801
|
+
}(!t3 && e3 && e3.__esModule ? a3 : s(a3, "default", { value: e3, enumerable: true }), e3);
|
52802
|
+
}, h = f(function(e3, t3) {
|
52803
|
+
var a3;
|
52804
|
+
a3 = "undefined" != typeof window ? window : "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : {}, t3.exports = a3;
|
52805
|
+
});
|
52806
|
+
function v(e3) {
|
52807
|
+
return e3 && "undefined" != typeof Symbol && e3.constructor === Symbol ? "symbol" : typeof e3;
|
52808
|
+
}
|
52809
|
+
var m = p(function() {
|
52810
|
+
}), y = f(function(e3, t3) {
|
52811
|
+
var a3, r2;
|
52812
|
+
m(), a3 = e3, r2 = function() {
|
52813
|
+
var e4 = function() {
|
52814
|
+
}, t4 = "undefined", a4 = ("undefined" == typeof window ? "undefined" : v(window)) !== t4 && v(window.navigator) !== t4 && /Trident\/|MSIE /.test(window.navigator.userAgent), r3 = ["trace", "debug", "info", "warn", "error"];
|
52815
|
+
function n2(e5, t5) {
|
52816
|
+
var a5 = e5[t5];
|
52817
|
+
if ("function" == typeof a5.bind)
|
52818
|
+
return a5.bind(e5);
|
52819
|
+
try {
|
52820
|
+
return Function.prototype.bind.call(a5, e5);
|
52821
|
+
} catch (t6) {
|
52822
|
+
return function() {
|
52823
|
+
return Function.prototype.apply.apply(a5, [e5, arguments]);
|
52824
|
+
};
|
52825
|
+
}
|
52826
|
+
}
|
52827
|
+
function i3() {
|
52828
|
+
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
52829
|
+
}
|
52830
|
+
function o2(r4) {
|
52831
|
+
return "debug" === r4 && (r4 = "log"), ("undefined" == typeof console ? "undefined" : v(console)) !== t4 && ("trace" === r4 && a4 ? i3 : void 0 !== console[r4] ? n2(console, r4) : void 0 !== console.log ? n2(console, "log") : e4);
|
52832
|
+
}
|
52833
|
+
function s2(t5, a5) {
|
52834
|
+
for (var n3 = 0; n3 < r3.length; n3++) {
|
52835
|
+
var i4 = r3[n3];
|
52836
|
+
this[i4] = n3 < t5 ? e4 : this.methodFactory(i4, t5, a5);
|
52837
|
+
}
|
52838
|
+
this.log = this.debug;
|
52839
|
+
}
|
52840
|
+
function u2(e5, a5, r4) {
|
52841
|
+
return function() {
|
52842
|
+
("undefined" == typeof console ? "undefined" : v(console)) !== t4 && (s2.call(this, a5, r4), this[e5].apply(this, arguments));
|
52843
|
+
};
|
52844
|
+
}
|
52845
|
+
function d2(e5, t5, a5) {
|
52846
|
+
return o2(e5) || u2.apply(this, arguments);
|
52847
|
+
}
|
52848
|
+
function l2(e5, a5, n3) {
|
52849
|
+
var i4, o3 = this;
|
52850
|
+
a5 = null == a5 ? "WARN" : a5;
|
52851
|
+
var u3 = "loglevel";
|
52852
|
+
function l3() {
|
52853
|
+
var e6;
|
52854
|
+
if (("undefined" == typeof window ? "undefined" : v(window)) !== t4 && u3) {
|
52855
|
+
try {
|
52856
|
+
e6 = window.localStorage[u3];
|
52857
|
+
} catch (e7) {
|
52858
|
+
}
|
52859
|
+
if ((void 0 === e6 ? "undefined" : v(e6)) === t4)
|
52860
|
+
try {
|
52861
|
+
var a6 = window.document.cookie, r4 = a6.indexOf(encodeURIComponent(u3) + "=");
|
52862
|
+
-1 !== r4 && (e6 = /^([^;]+)/.exec(a6.slice(r4))[1]);
|
52863
|
+
} catch (e7) {
|
52864
|
+
}
|
52865
|
+
return void 0 === o3.levels[e6] && (e6 = void 0), e6;
|
52866
|
+
}
|
52867
|
+
}
|
52868
|
+
"string" == typeof e5 ? u3 += ":" + e5 : "symbol" === (void 0 === e5 ? "undefined" : v(e5)) && (u3 = void 0), o3.name = e5, o3.levels = { TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3, ERROR: 4, SILENT: 5 }, o3.methodFactory = n3 || d2, o3.getLevel = function() {
|
52869
|
+
return i4;
|
52870
|
+
}, o3.setLevel = function(a6, n4) {
|
52871
|
+
if ("string" == typeof a6 && void 0 !== o3.levels[a6.toUpperCase()] && (a6 = o3.levels[a6.toUpperCase()]), !("number" == typeof a6 && a6 >= 0 && a6 <= o3.levels.SILENT))
|
52872
|
+
throw "log.setLevel() called with invalid level: " + a6;
|
52873
|
+
if (i4 = a6, false !== n4 && function(e6) {
|
52874
|
+
var a7 = (r3[e6] || "silent").toUpperCase();
|
52875
|
+
if (("undefined" == typeof window ? "undefined" : v(window)) !== t4 && u3) {
|
52876
|
+
try {
|
52877
|
+
return void (window.localStorage[u3] = a7);
|
52878
|
+
} catch (e7) {
|
52879
|
+
}
|
52880
|
+
try {
|
52881
|
+
window.document.cookie = encodeURIComponent(u3) + "=" + a7 + ";";
|
52882
|
+
} catch (e7) {
|
52883
|
+
}
|
52884
|
+
}
|
52885
|
+
}(a6), s2.call(o3, a6, e5), ("undefined" == typeof console ? "undefined" : v(console)) === t4 && a6 < o3.levels.SILENT)
|
52886
|
+
return "No console available for logging";
|
52887
|
+
}, o3.setDefaultLevel = function(e6) {
|
52888
|
+
a5 = e6, l3() || o3.setLevel(e6, false);
|
52889
|
+
}, o3.resetLevel = function() {
|
52890
|
+
o3.setLevel(a5, false), function() {
|
52891
|
+
if (("undefined" == typeof window ? "undefined" : v(window)) !== t4 && u3) {
|
52892
|
+
try {
|
52893
|
+
return void window.localStorage.removeItem(u3);
|
52894
|
+
} catch (e6) {
|
52895
|
+
}
|
52896
|
+
try {
|
52897
|
+
window.document.cookie = encodeURIComponent(u3) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
52898
|
+
} catch (e6) {
|
52899
|
+
}
|
52900
|
+
}
|
52901
|
+
}();
|
52902
|
+
}, o3.enableAll = function(e6) {
|
52903
|
+
o3.setLevel(o3.levels.TRACE, e6);
|
52904
|
+
}, o3.disableAll = function(e6) {
|
52905
|
+
o3.setLevel(o3.levels.SILENT, e6);
|
52906
|
+
};
|
52907
|
+
var c3 = l3();
|
52908
|
+
null == c3 && (c3 = a5), o3.setLevel(c3, false);
|
52909
|
+
}
|
52910
|
+
var c2 = new l2(), p2 = {};
|
52911
|
+
c2.getLogger = function(e5) {
|
52912
|
+
if ("symbol" !== (void 0 === e5 ? "undefined" : v(e5)) && "string" != typeof e5 || "" === e5)
|
52913
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
52914
|
+
var t5 = p2[e5];
|
52915
|
+
return t5 || (t5 = p2[e5] = new l2(e5, c2.getLevel(), c2.methodFactory)), t5;
|
52916
|
+
};
|
52917
|
+
var f2 = ("undefined" == typeof window ? "undefined" : v(window)) !== t4 ? window.log : void 0;
|
52918
|
+
return c2.noConflict = function() {
|
52919
|
+
return ("undefined" == typeof window ? "undefined" : v(window)) !== t4 && window.log === c2 && (window.log = f2), c2;
|
52920
|
+
}, c2.getLoggers = function() {
|
52921
|
+
return p2;
|
52922
|
+
}, c2.default = c2, c2;
|
52923
|
+
}, "object" == typeof t3 && t3.exports ? t3.exports = r2() : a3.log = r2();
|
52924
|
+
});
|
52925
|
+
function g(e3, t3) {
|
52926
|
+
return null != t3 && "undefined" != typeof Symbol && t3[Symbol.hasInstance] ? !!t3[Symbol.hasInstance](e3) : g(e3, t3);
|
52927
|
+
}
|
52928
|
+
var b = p(function() {
|
52929
|
+
b();
|
52930
|
+
}), w = f(function(e3) {
|
52931
|
+
var t3 = Object.prototype.hasOwnProperty;
|
52932
|
+
function a3(e4) {
|
52933
|
+
try {
|
52934
|
+
return decodeURIComponent(e4.replace(/\+/g, " "));
|
52935
|
+
} catch (e5) {
|
52936
|
+
return null;
|
52937
|
+
}
|
52938
|
+
}
|
52939
|
+
function r2(e4) {
|
52940
|
+
try {
|
52941
|
+
return encodeURIComponent(e4);
|
52942
|
+
} catch (e5) {
|
52943
|
+
return null;
|
52944
|
+
}
|
52945
|
+
}
|
52946
|
+
e3.stringify = function(e4, a4) {
|
52947
|
+
a4 = a4 || "";
|
52948
|
+
var n2, i3, o2 = [];
|
52949
|
+
for (i3 in "string" != typeof a4 && (a4 = "?"), e4)
|
52950
|
+
if (t3.call(e4, i3)) {
|
52951
|
+
if (!(n2 = e4[i3]) && (null == n2 || isNaN(n2)) && (n2 = ""), i3 = r2(i3), n2 = r2(n2), null === i3 || null === n2)
|
52952
|
+
continue;
|
52953
|
+
o2.push(i3 + "=" + n2);
|
52954
|
+
}
|
52955
|
+
return o2.length ? a4 + o2.join("&") : "";
|
52956
|
+
}, e3.parse = function(e4) {
|
52957
|
+
for (var t4, r3 = /([^=?#&]+)=?([^&]*)/g, n2 = {}; t4 = r3.exec(e4); ) {
|
52958
|
+
var i3 = a3(t4[1]), o2 = a3(t4[2]);
|
52959
|
+
null === i3 || null === o2 || i3 in n2 || (n2[i3] = o2);
|
52960
|
+
}
|
52961
|
+
return n2;
|
52962
|
+
};
|
52963
|
+
}), T = f(function(e3, t3) {
|
52964
|
+
!function(a3) {
|
52965
|
+
var r2 = false;
|
52966
|
+
if ("object" == typeof e3 && (t3.exports = a3(), r2 = true), !r2) {
|
52967
|
+
var n2 = window.Cookies, i3 = window.Cookies = a3();
|
52968
|
+
i3.noConflict = function() {
|
52969
|
+
return window.Cookies = n2, i3;
|
52970
|
+
};
|
52971
|
+
}
|
52972
|
+
}(function() {
|
52973
|
+
var e4 = function() {
|
52974
|
+
for (var e5 = 0, t4 = {}; e5 < arguments.length; e5++) {
|
52975
|
+
var a3 = arguments[e5];
|
52976
|
+
for (var r2 in a3)
|
52977
|
+
t4[r2] = a3[r2];
|
52978
|
+
}
|
52979
|
+
return t4;
|
52980
|
+
};
|
52981
|
+
return function t4(a3) {
|
52982
|
+
function r2(t5, n2, i3) {
|
52983
|
+
var o2;
|
52984
|
+
if ("undefined" != typeof document) {
|
52985
|
+
if (arguments.length > 1) {
|
52986
|
+
if ("number" == typeof (i3 = e4({ path: "/" }, r2.defaults, i3)).expires) {
|
52987
|
+
var s2 = new Date();
|
52988
|
+
s2.setMilliseconds(s2.getMilliseconds() + 864e5 * i3.expires), i3.expires = s2;
|
52989
|
+
}
|
52990
|
+
try {
|
52991
|
+
o2 = JSON.stringify(n2), /^[\{\[]/.test(o2) && (n2 = o2);
|
52992
|
+
} catch (e5) {
|
52993
|
+
}
|
52994
|
+
return n2 = a3.write ? a3.write(n2, t5) : encodeURIComponent(String(n2)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), t5 = (t5 = (t5 = encodeURIComponent(String(t5))).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)).replace(/[\(\)]/g, escape), document.cookie = [t5, "=", n2, i3.expires ? "; expires=" + i3.expires.toUTCString() : "", i3.path ? "; path=" + i3.path : "", i3.domain ? "; domain=" + i3.domain : "", i3.secure ? "; secure" : ""].join("");
|
52995
|
+
}
|
52996
|
+
t5 || (o2 = {});
|
52997
|
+
for (var u2 = document.cookie ? document.cookie.split("; ") : [], d2 = /(%[0-9A-Z]{2})+/g, l2 = 0; l2 < u2.length; l2++) {
|
52998
|
+
var c2 = u2[l2].split("="), p2 = c2.slice(1).join("=");
|
52999
|
+
'"' === p2.charAt(0) && (p2 = p2.slice(1, -1));
|
53000
|
+
try {
|
53001
|
+
var f2 = c2[0].replace(d2, decodeURIComponent);
|
53002
|
+
if (p2 = a3.read ? a3.read(p2, f2) : a3(p2, f2) || p2.replace(d2, decodeURIComponent), this.json)
|
53003
|
+
try {
|
53004
|
+
p2 = JSON.parse(p2);
|
53005
|
+
} catch (e5) {
|
53006
|
+
}
|
53007
|
+
if (t5 === f2) {
|
53008
|
+
o2 = p2;
|
53009
|
+
break;
|
53010
|
+
}
|
53011
|
+
t5 || (o2[f2] = p2);
|
53012
|
+
} catch (e5) {
|
53013
|
+
}
|
53014
|
+
}
|
53015
|
+
return o2;
|
53016
|
+
}
|
53017
|
+
}
|
53018
|
+
return r2.set = r2, r2.get = function(e5) {
|
53019
|
+
return r2.call(r2, e5);
|
53020
|
+
}, r2.getJSON = function() {
|
53021
|
+
return r2.apply({ json: true }, [].slice.call(arguments));
|
53022
|
+
}, r2.defaults = {}, r2.remove = function(t5, a4) {
|
53023
|
+
r2(t5, "", e4(a4, { expires: -1 }));
|
53024
|
+
}, r2.withConverter = t4, r2;
|
53025
|
+
}(function() {
|
53026
|
+
});
|
53027
|
+
});
|
53028
|
+
}), x = f(function(e3, t3) {
|
53029
|
+
var a3 = Array.prototype.slice;
|
53030
|
+
t3.exports = function(e4, t4) {
|
53031
|
+
for (("length" in e4) || (e4 = [e4]), e4 = a3.call(e4); e4.length; ) {
|
53032
|
+
var r2 = e4.shift(), n2 = t4(r2);
|
53033
|
+
if (n2)
|
53034
|
+
return n2;
|
53035
|
+
r2.childNodes && r2.childNodes.length && (e4 = a3.call(r2.childNodes).concat(e4));
|
53036
|
+
}
|
53037
|
+
};
|
53038
|
+
}), k = f(function(e3, t3) {
|
53039
|
+
function a3(e4, t4) {
|
53040
|
+
if (!g(this, a3))
|
53041
|
+
return new a3(e4, t4);
|
53042
|
+
this.data = e4, this.nodeValue = e4, this.length = e4.length, this.ownerDocument = t4 || null;
|
53043
|
+
}
|
53044
|
+
b(), t3.exports = a3, a3.prototype.nodeType = 8, a3.prototype.nodeName = "#comment", a3.prototype.toString = function() {
|
53045
|
+
return "[object Comment]";
|
53046
|
+
};
|
53047
|
+
}), E = f(function(e3, t3) {
|
53048
|
+
function a3(e4, t4) {
|
53049
|
+
if (!g(this, a3))
|
53050
|
+
return new a3(e4);
|
53051
|
+
this.data = e4 || "", this.length = this.data.length, this.ownerDocument = t4 || null;
|
53052
|
+
}
|
53053
|
+
b(), t3.exports = a3, a3.prototype.type = "DOMTextNode", a3.prototype.nodeType = 3, a3.prototype.nodeName = "#text", a3.prototype.toString = function() {
|
53054
|
+
return this.data;
|
53055
|
+
}, a3.prototype.replaceData = function(e4, t4, a4) {
|
53056
|
+
var r2 = this.data, n2 = r2.substring(0, e4), i3 = r2.substring(e4 + t4, r2.length);
|
53057
|
+
this.data = n2 + a4 + i3, this.length = this.data.length;
|
53058
|
+
};
|
53059
|
+
}), D = f(function(e3, t3) {
|
53060
|
+
t3.exports = function(e4) {
|
53061
|
+
var t4 = this, a3 = e4.type;
|
53062
|
+
e4.target || (e4.target = t4), t4.listeners || (t4.listeners = {});
|
53063
|
+
var r2 = t4.listeners[a3];
|
53064
|
+
if (r2)
|
53065
|
+
return r2.forEach(function(a4) {
|
53066
|
+
e4.currentTarget = t4, "function" == typeof a4 ? a4(e4) : a4.handleEvent(e4);
|
53067
|
+
});
|
53068
|
+
t4.parentNode && t4.parentNode.dispatchEvent(e4);
|
53069
|
+
};
|
53070
|
+
}), q = f(function(e3, t3) {
|
53071
|
+
t3.exports = function(e4, t4) {
|
53072
|
+
var a3 = this;
|
53073
|
+
a3.listeners || (a3.listeners = {}), a3.listeners[e4] || (a3.listeners[e4] = []), -1 === a3.listeners[e4].indexOf(t4) && a3.listeners[e4].push(t4);
|
53074
|
+
};
|
53075
|
+
}), S = f(function(e3, t3) {
|
53076
|
+
t3.exports = function(e4, t4) {
|
53077
|
+
var a3 = this;
|
53078
|
+
if (a3.listeners && a3.listeners[e4]) {
|
53079
|
+
var r2 = a3.listeners[e4], n2 = r2.indexOf(t4);
|
53080
|
+
-1 !== n2 && r2.splice(n2, 1);
|
53081
|
+
}
|
53082
|
+
};
|
53083
|
+
}), A = f(function(e3, t3) {
|
53084
|
+
m(), t3.exports = r2;
|
53085
|
+
var a3 = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"];
|
53086
|
+
function r2(e4) {
|
53087
|
+
switch (e4.nodeType) {
|
53088
|
+
case 3:
|
53089
|
+
return o2(e4.data);
|
53090
|
+
case 8:
|
53091
|
+
return "<!--" + e4.data + "-->";
|
53092
|
+
default:
|
53093
|
+
return function(e5) {
|
53094
|
+
var t4 = [], s2 = e5.tagName;
|
53095
|
+
return "http://www.w3.org/1999/xhtml" === e5.namespaceURI && (s2 = s2.toLowerCase()), t4.push("<" + s2 + function(e6) {
|
53096
|
+
var t5 = [];
|
53097
|
+
for (var a4 in e6)
|
53098
|
+
n2(e6, a4) && t5.push({ name: a4, value: e6[a4] });
|
53099
|
+
for (var r3 in e6._attributes)
|
53100
|
+
for (var o3 in e6._attributes[r3]) {
|
53101
|
+
var s3 = e6._attributes[r3][o3], u2 = (s3.prefix ? s3.prefix + ":" : "") + o3;
|
53102
|
+
t5.push({ name: u2, value: s3.value });
|
53103
|
+
}
|
53104
|
+
return e6.className && t5.push({ name: "class", value: e6.className }), t5.length ? i3(t5) : "";
|
53105
|
+
}(e5) + function(e6) {
|
53106
|
+
var t5 = e6.dataset, a4 = [];
|
53107
|
+
for (var r3 in t5)
|
53108
|
+
a4.push({ name: "data-" + r3, value: t5[r3] });
|
53109
|
+
return a4.length ? i3(a4) : "";
|
53110
|
+
}(e5)), a3.indexOf(s2) > -1 ? t4.push(" />") : (t4.push(">"), e5.childNodes.length ? t4.push.apply(t4, e5.childNodes.map(r2)) : e5.textContent || e5.innerText ? t4.push(o2(e5.textContent || e5.innerText)) : e5.innerHTML && t4.push(e5.innerHTML), t4.push("</" + s2 + ">")), t4.join("");
|
53111
|
+
}(e4);
|
53112
|
+
}
|
53113
|
+
}
|
53114
|
+
function n2(e4, t4) {
|
53115
|
+
var a4 = v(e4[t4]);
|
53116
|
+
return "style" === t4 && Object.keys(e4.style).length > 0 || e4.hasOwnProperty(t4) && ("string" === a4 || "boolean" === a4 || "number" === a4) && "nodeName" !== t4 && "className" !== t4 && "tagName" !== t4 && "textContent" !== t4 && "innerText" !== t4 && "namespaceURI" !== t4 && "innerHTML" !== t4;
|
53117
|
+
}
|
53118
|
+
function i3(e4) {
|
53119
|
+
var t4 = [];
|
53120
|
+
return e4.forEach(function(e5) {
|
53121
|
+
var a4 = e5.name, r3 = e5.value;
|
53122
|
+
"style" === a4 && (r3 = function(e6) {
|
53123
|
+
if ("string" == typeof e6)
|
53124
|
+
return e6;
|
53125
|
+
var t5 = "";
|
53126
|
+
return Object.keys(e6).forEach(function(a5) {
|
53127
|
+
var r4 = e6[a5];
|
53128
|
+
a5 = a5.replace(/[A-Z]/g, function(e7) {
|
53129
|
+
return "-" + e7.toLowerCase();
|
53130
|
+
}), t5 += a5 + ":" + r4 + ";";
|
53131
|
+
}), t5;
|
53132
|
+
}(r3)), t4.push(a4 + '="' + function(e6) {
|
53133
|
+
return o2(e6).replace(/"/g, """);
|
53134
|
+
}(r3) + '"');
|
53135
|
+
}), t4.length ? " " + t4.join(" ") : "";
|
53136
|
+
}
|
53137
|
+
function o2(e4) {
|
53138
|
+
var t4 = "";
|
53139
|
+
return "string" == typeof e4 ? t4 = e4 : e4 && (t4 = e4.toString()), t4.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
53140
|
+
}
|
53141
|
+
}), O = f(function(e3, t3) {
|
53142
|
+
b();
|
53143
|
+
var a3 = x(), r2 = D(), n2 = q(), i3 = S(), o2 = A(), s2 = "http://www.w3.org/1999/xhtml";
|
53144
|
+
function u2(e4, t4, a4) {
|
53145
|
+
if (!g(this, u2))
|
53146
|
+
return new u2(e4);
|
53147
|
+
var r3 = void 0 === a4 ? s2 : a4 || null;
|
53148
|
+
this.tagName = r3 === s2 ? String(e4).toUpperCase() : e4, this.nodeName = this.tagName, this.className = "", this.dataset = {}, this.childNodes = [], this.parentNode = null, this.style = {}, this.ownerDocument = t4 || null, this.namespaceURI = r3, this._attributes = {}, "INPUT" === this.tagName && (this.type = "text");
|
53149
|
+
}
|
53150
|
+
t3.exports = u2, u2.prototype.type = "DOMElement", u2.prototype.nodeType = 1, u2.prototype.appendChild = function(e4) {
|
53151
|
+
return e4.parentNode && e4.parentNode.removeChild(e4), this.childNodes.push(e4), e4.parentNode = this, e4;
|
53152
|
+
}, u2.prototype.replaceChild = function(e4, t4) {
|
53153
|
+
e4.parentNode && e4.parentNode.removeChild(e4);
|
53154
|
+
var a4 = this.childNodes.indexOf(t4);
|
53155
|
+
return t4.parentNode = null, this.childNodes[a4] = e4, e4.parentNode = this, t4;
|
53156
|
+
}, u2.prototype.removeChild = function(e4) {
|
53157
|
+
var t4 = this.childNodes.indexOf(e4);
|
53158
|
+
return this.childNodes.splice(t4, 1), e4.parentNode = null, e4;
|
53159
|
+
}, u2.prototype.insertBefore = function(e4, t4) {
|
53160
|
+
e4.parentNode && e4.parentNode.removeChild(e4);
|
53161
|
+
var a4 = null == t4 ? -1 : this.childNodes.indexOf(t4);
|
53162
|
+
return a4 > -1 ? this.childNodes.splice(a4, 0, e4) : this.childNodes.push(e4), e4.parentNode = this, e4;
|
53163
|
+
}, u2.prototype.setAttributeNS = function(e4, t4, a4) {
|
53164
|
+
var r3 = null, n3 = t4, i4 = t4.indexOf(":");
|
53165
|
+
(i4 > -1 && (r3 = t4.substr(0, i4), n3 = t4.substr(i4 + 1)), "INPUT" === this.tagName && "type" === t4) ? this.type = a4 : (this._attributes[e4] || (this._attributes[e4] = {}))[n3] = { value: a4, prefix: r3 };
|
53166
|
+
}, u2.prototype.getAttributeNS = function(e4, t4) {
|
53167
|
+
var a4 = this._attributes[e4], r3 = a4 && a4[t4] && a4[t4].value;
|
53168
|
+
return "INPUT" === this.tagName && "type" === t4 ? this.type : "string" != typeof r3 ? null : r3;
|
53169
|
+
}, u2.prototype.removeAttributeNS = function(e4, t4) {
|
53170
|
+
var a4 = this._attributes[e4];
|
53171
|
+
a4 && delete a4[t4];
|
53172
|
+
}, u2.prototype.hasAttributeNS = function(e4, t4) {
|
53173
|
+
var a4 = this._attributes[e4];
|
53174
|
+
return !!a4 && t4 in a4;
|
53175
|
+
}, u2.prototype.setAttribute = function(e4, t4) {
|
53176
|
+
return this.setAttributeNS(null, e4, t4);
|
53177
|
+
}, u2.prototype.getAttribute = function(e4) {
|
53178
|
+
return this.getAttributeNS(null, e4);
|
53179
|
+
}, u2.prototype.removeAttribute = function(e4) {
|
53180
|
+
return this.removeAttributeNS(null, e4);
|
53181
|
+
}, u2.prototype.hasAttribute = function(e4) {
|
53182
|
+
return this.hasAttributeNS(null, e4);
|
53183
|
+
}, u2.prototype.removeEventListener = i3, u2.prototype.addEventListener = n2, u2.prototype.dispatchEvent = r2, u2.prototype.focus = function() {
|
53184
|
+
}, u2.prototype.toString = function() {
|
53185
|
+
return o2(this);
|
53186
|
+
}, u2.prototype.getElementsByClassName = function(e4) {
|
53187
|
+
var t4 = e4.split(" "), r3 = [];
|
53188
|
+
return a3(this, function(e5) {
|
53189
|
+
if (1 === e5.nodeType) {
|
53190
|
+
var a4 = (e5.className || "").split(" ");
|
53191
|
+
t4.every(function(e6) {
|
53192
|
+
return -1 !== a4.indexOf(e6);
|
53193
|
+
}) && r3.push(e5);
|
53194
|
+
}
|
53195
|
+
}), r3;
|
53196
|
+
}, u2.prototype.getElementsByTagName = function(e4) {
|
53197
|
+
e4 = e4.toLowerCase();
|
53198
|
+
var t4 = [];
|
53199
|
+
return a3(this.childNodes, function(a4) {
|
53200
|
+
1 === a4.nodeType && ("*" === e4 || a4.tagName.toLowerCase() === e4) && t4.push(a4);
|
53201
|
+
}), t4;
|
53202
|
+
}, u2.prototype.contains = function(e4) {
|
53203
|
+
return a3(this, function(t4) {
|
53204
|
+
return e4 === t4;
|
53205
|
+
}) || false;
|
53206
|
+
};
|
53207
|
+
}), R = f(function(e3, t3) {
|
53208
|
+
b();
|
53209
|
+
var a3 = O();
|
53210
|
+
function r2(e4) {
|
53211
|
+
if (!g(this, r2))
|
53212
|
+
return new r2();
|
53213
|
+
this.childNodes = [], this.parentNode = null, this.ownerDocument = e4 || null;
|
53214
|
+
}
|
53215
|
+
t3.exports = r2, r2.prototype.type = "DocumentFragment", r2.prototype.nodeType = 11, r2.prototype.nodeName = "#document-fragment", r2.prototype.appendChild = a3.prototype.appendChild, r2.prototype.replaceChild = a3.prototype.replaceChild, r2.prototype.removeChild = a3.prototype.removeChild, r2.prototype.toString = function() {
|
53216
|
+
return this.childNodes.map(function(e4) {
|
53217
|
+
return String(e4);
|
53218
|
+
}).join("");
|
53219
|
+
};
|
53220
|
+
}), P = f(function(e3, t3) {
|
53221
|
+
function a3(e4) {
|
53222
|
+
}
|
53223
|
+
t3.exports = a3, a3.prototype.initEvent = function(e4, t4, a4) {
|
53224
|
+
this.type = e4, this.bubbles = t4, this.cancelable = a4;
|
53225
|
+
}, a3.prototype.preventDefault = function() {
|
53226
|
+
};
|
53227
|
+
}), N = f(function(e3, t3) {
|
53228
|
+
b();
|
53229
|
+
var a3 = x(), r2 = k(), n2 = E(), i3 = O(), o2 = R(), s2 = P(), u2 = D(), d2 = q(), l2 = S();
|
53230
|
+
function c2() {
|
53231
|
+
if (!g(this, c2))
|
53232
|
+
return new c2();
|
53233
|
+
this.head = this.createElement("head"), this.body = this.createElement("body"), this.documentElement = this.createElement("html"), this.documentElement.appendChild(this.head), this.documentElement.appendChild(this.body), this.childNodes = [this.documentElement], this.nodeType = 9;
|
53234
|
+
}
|
53235
|
+
t3.exports = c2;
|
53236
|
+
var p2 = c2.prototype;
|
53237
|
+
p2.createTextNode = function(e4) {
|
53238
|
+
return new n2(e4, this);
|
53239
|
+
}, p2.createElementNS = function(e4, t4) {
|
53240
|
+
var a4 = null === e4 ? null : String(e4);
|
53241
|
+
return new i3(t4, this, a4);
|
53242
|
+
}, p2.createElement = function(e4) {
|
53243
|
+
return new i3(e4, this);
|
53244
|
+
}, p2.createDocumentFragment = function() {
|
53245
|
+
return new o2(this);
|
53246
|
+
}, p2.createEvent = function(e4) {
|
53247
|
+
return new s2(e4);
|
53248
|
+
}, p2.createComment = function(e4) {
|
53249
|
+
return new r2(e4, this);
|
53250
|
+
}, p2.getElementById = function(e4) {
|
53251
|
+
return e4 = String(e4), a3(this.childNodes, function(t4) {
|
53252
|
+
if (String(t4.id) === e4)
|
53253
|
+
return t4;
|
53254
|
+
}) || null;
|
53255
|
+
}, p2.getElementsByClassName = i3.prototype.getElementsByClassName, p2.getElementsByTagName = i3.prototype.getElementsByTagName, p2.contains = i3.prototype.contains, p2.removeEventListener = l2, p2.addEventListener = d2, p2.dispatchEvent = u2;
|
53256
|
+
}), I = f(function(e3, t3) {
|
53257
|
+
var a3 = N();
|
53258
|
+
t3.exports = new a3();
|
53259
|
+
}), L = f(function(e3, t3) {
|
53260
|
+
var a3, r2 = "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof window ? window : {}, n2 = I();
|
53261
|
+
"undefined" != typeof document ? a3 = document : (a3 = r2["__GLOBAL_DOCUMENT_CACHE@4"]) || (a3 = r2["__GLOBAL_DOCUMENT_CACHE@4"] = n2), t3.exports = a3;
|
53262
|
+
});
|
53263
|
+
function C(e3, t3) {
|
53264
|
+
(null == t3 || t3 > e3.length) && (t3 = e3.length);
|
53265
|
+
for (var a3 = 0, r2 = new Array(t3); a3 < t3; a3++)
|
53266
|
+
r2[a3] = e3[a3];
|
53267
|
+
return r2;
|
53268
|
+
}
|
53269
|
+
function j(e3, t3) {
|
53270
|
+
return function(e4) {
|
53271
|
+
if (Array.isArray(e4))
|
53272
|
+
return e4;
|
53273
|
+
}(e3) || function(e4, t4) {
|
53274
|
+
var a3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
|
53275
|
+
if (null != a3) {
|
53276
|
+
var r2, n2, i3 = [], o2 = true, s2 = false;
|
53277
|
+
try {
|
53278
|
+
for (a3 = a3.call(e4); !(o2 = (r2 = a3.next()).done) && (i3.push(r2.value), !t4 || i3.length !== t4); o2 = true)
|
53279
|
+
;
|
53280
|
+
} catch (e5) {
|
53281
|
+
s2 = true, n2 = e5;
|
53282
|
+
} finally {
|
53283
|
+
try {
|
53284
|
+
!o2 && null != a3.return && a3.return();
|
53285
|
+
} finally {
|
53286
|
+
if (s2)
|
53287
|
+
throw n2;
|
53288
|
+
}
|
53289
|
+
}
|
53290
|
+
return i3;
|
53291
|
+
}
|
53292
|
+
}(e3, t3) || function(e4, t4) {
|
53293
|
+
if (e4) {
|
53294
|
+
if ("string" == typeof e4)
|
53295
|
+
return C(e4, t4);
|
53296
|
+
var a3 = Object.prototype.toString.call(e4).slice(8, -1);
|
53297
|
+
if ("Object" === a3 && e4.constructor && (a3 = e4.constructor.name), "Map" === a3 || "Set" === a3)
|
53298
|
+
return Array.from(a3);
|
53299
|
+
if ("Arguments" === a3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a3))
|
53300
|
+
return C(e4, t4);
|
53301
|
+
}
|
53302
|
+
}(e3, t3) || function() {
|
53303
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
53304
|
+
}();
|
53305
|
+
}
|
53306
|
+
var H = _2(h()), M = function() {
|
53307
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e3) {
|
53308
|
+
var t3 = 16 * Math.random() | 0;
|
53309
|
+
return ("x" === e3 ? t3 : 3 & t3 | 8).toString(16);
|
53310
|
+
});
|
53311
|
+
}, U = function() {
|
53312
|
+
return ("000000" + (Math.random() * Math.pow(36, 6) << 0).toString(36)).slice(-6);
|
53313
|
+
}, B = function(e3) {
|
53314
|
+
if (e3 && void 0 !== e3.nodeName)
|
53315
|
+
return e3.muxId || (e3.muxId = U()), e3.muxId;
|
53316
|
+
var t3;
|
53317
|
+
try {
|
53318
|
+
t3 = document.querySelector(e3);
|
53319
|
+
} catch (e4) {
|
53320
|
+
}
|
53321
|
+
return t3 && !t3.muxId && (t3.muxId = e3), (null == t3 ? void 0 : t3.muxId) || e3;
|
53322
|
+
}, F = function(e3) {
|
53323
|
+
var t3;
|
53324
|
+
e3 && void 0 !== e3.nodeName ? e3 = B(t3 = e3) : t3 = document.querySelector(e3);
|
53325
|
+
var a3 = t3 && t3.nodeName ? t3.nodeName.toLowerCase() : "";
|
53326
|
+
return [t3, e3, a3];
|
53327
|
+
}, W = _2(y()), V = W.default.methodFactory;
|
53328
|
+
W.default.methodFactory = function(e3, t3, a3) {
|
53329
|
+
var r2 = V(e3, t3, a3);
|
53330
|
+
return function() {
|
53331
|
+
for (var e4 = ["[mux]"], t4 = 0; t4 < arguments.length; t4++)
|
53332
|
+
e4.push(arguments[t4]);
|
53333
|
+
r2.apply(void 0, e4);
|
53334
|
+
};
|
53335
|
+
}, W.default.setLevel(W.default.getLevel());
|
53336
|
+
var G = W.default, Q = _2(h());
|
53337
|
+
function J() {
|
53338
|
+
return "1" === (Q.default.doNotTrack || Q.default.navigator && Q.default.navigator.doNotTrack);
|
53339
|
+
}
|
53340
|
+
var z = _2(h()), K = { now: function() {
|
53341
|
+
var e3 = z.default.performance, t3 = e3 && e3.timing, a3 = t3 && t3.navigationStart, r2 = "number" == typeof a3 && "function" == typeof e3.now ? a3 + e3.now() : Date.now();
|
53342
|
+
return Math.round(r2);
|
53343
|
+
} };
|
53344
|
+
function Y(e3) {
|
53345
|
+
if (void 0 === e3)
|
53346
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
53347
|
+
return e3;
|
53348
|
+
}
|
53349
|
+
function X(e3, t3) {
|
53350
|
+
if (!g(e3, t3))
|
53351
|
+
throw new TypeError("Cannot call a class as a function");
|
53352
|
+
}
|
53353
|
+
function $2(e3, t3) {
|
53354
|
+
for (var a3 = 0; a3 < t3.length; a3++) {
|
53355
|
+
var r2 = t3[a3];
|
53356
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, "value" in r2 && (r2.writable = true), Object.defineProperty(e3, r2.key, r2);
|
53357
|
+
}
|
53358
|
+
}
|
53359
|
+
function Z(e3, t3, a3) {
|
53360
|
+
return t3 && $2(e3.prototype, t3), a3 && $2(e3, a3), e3;
|
53361
|
+
}
|
53362
|
+
function ee(e3, t3, a3) {
|
53363
|
+
return t3 in e3 ? Object.defineProperty(e3, t3, { value: a3, enumerable: true, configurable: true, writable: true }) : e3[t3] = a3, e3;
|
53364
|
+
}
|
53365
|
+
function te(e3, t3) {
|
53366
|
+
return (te = Object.setPrototypeOf || function(e4, t4) {
|
53367
|
+
return e4.__proto__ = t4, e4;
|
53368
|
+
})(e3, t3);
|
53369
|
+
}
|
53370
|
+
function ae(e3) {
|
53371
|
+
return (ae = Object.setPrototypeOf ? Object.getPrototypeOf : function(e4) {
|
53372
|
+
return e4.__proto__ || Object.getPrototypeOf(e4);
|
53373
|
+
})(e3);
|
53374
|
+
}
|
53375
|
+
function re(e3, t3) {
|
53376
|
+
return !t3 || "object" !== v(t3) && "function" != typeof t3 ? Y(e3) : t3;
|
53377
|
+
}
|
53378
|
+
function ne(e3) {
|
53379
|
+
var t3 = function() {
|
53380
|
+
if ("undefined" == typeof Reflect || !Reflect.construct || Reflect.construct.sham)
|
53381
|
+
return false;
|
53382
|
+
if ("function" == typeof Proxy)
|
53383
|
+
return true;
|
53384
|
+
try {
|
53385
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
53386
|
+
})), true;
|
53387
|
+
} catch (e4) {
|
53388
|
+
return false;
|
53389
|
+
}
|
53390
|
+
}();
|
53391
|
+
return function() {
|
53392
|
+
var a3, r2 = ae(e3);
|
53393
|
+
if (t3) {
|
53394
|
+
var n2 = ae(this).constructor;
|
53395
|
+
a3 = Reflect.construct(r2, arguments, n2);
|
53396
|
+
} else
|
53397
|
+
a3 = r2.apply(this, arguments);
|
53398
|
+
return re(this, a3);
|
53399
|
+
};
|
53400
|
+
}
|
53401
|
+
b(), m();
|
53402
|
+
var ie = function(e3) {
|
53403
|
+
return oe(e3)[0];
|
53404
|
+
}, oe = function(e3) {
|
53405
|
+
if ("string" != typeof e3 || "" === e3)
|
53406
|
+
return ["localhost"];
|
53407
|
+
var t3, a3 = (e3.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/) || [])[4];
|
53408
|
+
return a3 && (t3 = (a3.match(/[^\.]+\.[^\.]+$/) || [])[0]), [a3, t3];
|
53409
|
+
}, se = _2(h()), ue = { exists: function() {
|
53410
|
+
var e3 = se.default.performance;
|
53411
|
+
return void 0 !== (e3 && e3.timing);
|
53412
|
+
}, domContentLoadedEventEnd: function() {
|
53413
|
+
var e3 = se.default.performance, t3 = e3 && e3.timing;
|
53414
|
+
return t3 && t3.domContentLoadedEventEnd;
|
53415
|
+
}, navigationStart: function() {
|
53416
|
+
var e3 = se.default.performance, t3 = e3 && e3.timing;
|
53417
|
+
return t3 && t3.navigationStart;
|
53418
|
+
} };
|
53419
|
+
function de(e3, t3, a3) {
|
53420
|
+
a3 = void 0 === a3 ? 1 : a3, e3[t3] = e3[t3] || 0, e3[t3] += a3;
|
53421
|
+
}
|
53422
|
+
function le(e3) {
|
53423
|
+
for (var t3 = 1; t3 < arguments.length; t3++) {
|
53424
|
+
var a3 = null != arguments[t3] ? arguments[t3] : {}, r2 = Object.keys(a3);
|
53425
|
+
"function" == typeof Object.getOwnPropertySymbols && (r2 = r2.concat(Object.getOwnPropertySymbols(a3).filter(function(e4) {
|
53426
|
+
return Object.getOwnPropertyDescriptor(a3, e4).enumerable;
|
53427
|
+
}))), r2.forEach(function(t4) {
|
53428
|
+
ee(e3, t4, a3[t4]);
|
53429
|
+
});
|
53430
|
+
}
|
53431
|
+
return e3;
|
53432
|
+
}
|
53433
|
+
function ce(e3, t3) {
|
53434
|
+
return t3 = null != t3 ? t3 : {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(e3, Object.getOwnPropertyDescriptors(t3)) : function(e4, t4) {
|
53435
|
+
var a3 = Object.keys(e4);
|
53436
|
+
if (Object.getOwnPropertySymbols) {
|
53437
|
+
var r2 = Object.getOwnPropertySymbols(e4);
|
53438
|
+
t4 && (r2 = r2.filter(function(t5) {
|
53439
|
+
return Object.getOwnPropertyDescriptor(e4, t5).enumerable;
|
53440
|
+
})), a3.push.apply(a3, r2);
|
53441
|
+
}
|
53442
|
+
return a3;
|
53443
|
+
}(Object(t3)).forEach(function(a3) {
|
53444
|
+
Object.defineProperty(e3, a3, Object.getOwnPropertyDescriptor(t3, a3));
|
53445
|
+
}), e3;
|
53446
|
+
}
|
53447
|
+
var pe = ["x-request-id", "cf-ray", "x-amz-cf-id", "x-akamai-request-id"], fe = ["x-cdn", "content-type"].concat(pe);
|
53448
|
+
function _e(e3) {
|
53449
|
+
var t3 = {};
|
53450
|
+
return (e3 = e3 || "").trim().split(/[\r\n]+/).forEach(function(e4) {
|
53451
|
+
if (e4) {
|
53452
|
+
var a3 = e4.split(": "), r2 = a3.shift();
|
53453
|
+
r2 && (fe.indexOf(r2.toLowerCase()) >= 0 || 0 === r2.toLowerCase().indexOf("x-litix-")) && (t3[r2] = a3.join(": "));
|
53454
|
+
}
|
53455
|
+
}), t3;
|
53456
|
+
}
|
53457
|
+
function he(e3) {
|
53458
|
+
if (e3) {
|
53459
|
+
var t3 = pe.find(function(t4) {
|
53460
|
+
return void 0 !== e3[t4];
|
53461
|
+
});
|
53462
|
+
return t3 ? e3[t3] : void 0;
|
53463
|
+
}
|
53464
|
+
}
|
53465
|
+
var ve = function(e3) {
|
53466
|
+
var t3 = {};
|
53467
|
+
for (var a3 in e3) {
|
53468
|
+
var r2 = e3[a3];
|
53469
|
+
if (-1 !== r2["DATA-ID"].search("io.litix.data."))
|
53470
|
+
t3[r2["DATA-ID"].replace("io.litix.data.", "")] = r2.VALUE;
|
53471
|
+
}
|
53472
|
+
return t3;
|
53473
|
+
}, me = function(e3) {
|
53474
|
+
if (!e3)
|
53475
|
+
return {};
|
53476
|
+
var t3 = ue.navigationStart(), a3 = e3.loading, r2 = a3 ? a3.start : e3.trequest, n2 = a3 ? a3.first : e3.tfirst, i3 = a3 ? a3.end : e3.tload;
|
53477
|
+
return { bytesLoaded: e3.total, requestStart: Math.round(t3 + r2), responseStart: Math.round(t3 + n2), responseEnd: Math.round(t3 + i3) };
|
53478
|
+
}, ye = function(e3) {
|
53479
|
+
if (e3 && "function" == typeof e3.getAllResponseHeaders)
|
53480
|
+
return _e(e3.getAllResponseHeaders());
|
53481
|
+
}, ge = function(e3, t3) {
|
53482
|
+
if (!e3 || !e3.requestEndDate)
|
53483
|
+
return {};
|
53484
|
+
var a3, r2 = ie(e3.url), n2 = e3.url, i3 = e3.bytesLoaded, o2 = new Date(e3.requestStartDate).getTime(), s2 = new Date(e3.firstByteDate).getTime(), u2 = new Date(e3.requestEndDate).getTime(), d2 = isNaN(e3.duration) ? 0 : e3.duration, l2 = "function" == typeof t3.getMetricsFor ? t3.getMetricsFor(e3.mediaType).HttpList : t3.getDashMetrics().getHttpRequests(e3.mediaType);
|
53485
|
+
return l2.length > 0 && (a3 = _e(l2[l2.length - 1]._responseHeaders || "")), { requestStart: o2, requestResponseStart: s2, requestResponseEnd: u2, requestBytesLoaded: i3, requestResponseHeaders: a3, requestMediaDuration: d2, requestHostname: r2, requestUrl: n2, requestId: a3 ? he(a3) : void 0 };
|
53486
|
+
}, be = function(e3, t3) {
|
53487
|
+
var a3 = t3.getQualityFor(e3), r2 = t3.getCurrentTrackFor(e3).bitrateList;
|
53488
|
+
return r2 ? { currentLevel: a3, renditionWidth: r2[a3].width || null, renditionHeight: r2[a3].height || null, renditionBitrate: r2[a3].bandwidth } : {};
|
53489
|
+
}, we = function(e3) {
|
53490
|
+
var t3;
|
53491
|
+
return null === (t3 = e3.match(/.*codecs\*?="(.*)"/)) || void 0 === t3 ? void 0 : t3[1];
|
53492
|
+
}, Te = function(e3) {
|
53493
|
+
try {
|
53494
|
+
var t3, a3;
|
53495
|
+
return null === (a3 = e3.getVersion) || void 0 === a3 || null === (t3 = a3.call(e3)) || void 0 === t3 ? void 0 : t3.split(".").map(function(e4) {
|
53496
|
+
return parseInt(e4);
|
53497
|
+
})[0];
|
53498
|
+
} catch (e4) {
|
53499
|
+
return false;
|
53500
|
+
}
|
53501
|
+
}, xe = 0, ke = function() {
|
53502
|
+
function e3() {
|
53503
|
+
X(this, e3), ee(this, "_listeners", void 0);
|
53504
|
+
}
|
53505
|
+
return Z(e3, [{ key: "on", value: function(e4, t3, a3) {
|
53506
|
+
return t3._eventEmitterGuid = t3._eventEmitterGuid || ++xe, this._listeners = this._listeners || {}, this._listeners[e4] = this._listeners[e4] || [], a3 && (t3 = t3.bind(a3)), this._listeners[e4].push(t3), t3;
|
53507
|
+
} }, { key: "off", value: function(e4, t3) {
|
53508
|
+
var a3 = this._listeners && this._listeners[e4];
|
53509
|
+
a3 && a3.forEach(function(e5, r2) {
|
53510
|
+
e5._eventEmitterGuid === t3._eventEmitterGuid && a3.splice(r2, 1);
|
53511
|
+
});
|
53512
|
+
} }, { key: "one", value: function(e4, t3, a3) {
|
53513
|
+
var r2 = this;
|
53514
|
+
t3._eventEmitterGuid = t3._eventEmitterGuid || ++xe;
|
53515
|
+
var n2 = function() {
|
53516
|
+
r2.off(e4, n2), t3.apply(a3 || this, arguments);
|
53517
|
+
};
|
53518
|
+
n2._eventEmitterGuid = t3._eventEmitterGuid, this.on(e4, n2);
|
53519
|
+
} }, { key: "emit", value: function(e4, t3) {
|
53520
|
+
var a3 = this;
|
53521
|
+
if (this._listeners) {
|
53522
|
+
t3 = t3 || {};
|
53523
|
+
var r2 = this._listeners["before*"] || [], n2 = this._listeners[e4] || [], i3 = this._listeners["after" + e4] || [], o2 = function(t4, r3) {
|
53524
|
+
(t4 = t4.slice()).forEach(function(t5) {
|
53525
|
+
t5.call(a3, { type: e4 }, r3);
|
53526
|
+
});
|
53527
|
+
};
|
53528
|
+
o2(r2, t3), o2(n2, t3), o2(i3, t3);
|
53529
|
+
}
|
53530
|
+
} }]), e3;
|
53531
|
+
}(), Ee = ke, De = _2(h()), qe = function() {
|
53532
|
+
function e3(t3) {
|
53533
|
+
var a3 = this;
|
53534
|
+
X(this, e3), ee(this, "_playbackHeartbeatInterval", void 0), ee(this, "_playheadShouldBeProgressing", void 0), ee(this, "pm", void 0), this.pm = t3, this._playbackHeartbeatInterval = null, this._playheadShouldBeProgressing = false, t3.on("playing", function() {
|
53535
|
+
a3._playheadShouldBeProgressing = true;
|
53536
|
+
}), t3.on("play", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("playing", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("adbreakstart", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("adplay", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("adplaying", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("devicewake", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("viewstart", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("rebufferstart", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("pause", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("ended", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("viewend", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("error", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("aderror", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("adpause", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("adended", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("adbreakend", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("seeked", function() {
|
53537
|
+
t3.data.player_is_paused ? a3._stopPlaybackHeartbeatInterval() : a3._startPlaybackHeartbeatInterval();
|
53538
|
+
}), t3.on("timeupdate", function() {
|
53539
|
+
null !== a3._playbackHeartbeatInterval && t3.emit("playbackheartbeat");
|
53540
|
+
}), t3.on("devicesleep", function(e4, r2) {
|
53541
|
+
null !== a3._playbackHeartbeatInterval && (De.default.clearInterval(a3._playbackHeartbeatInterval), t3.emit("playbackheartbeatend", { viewer_time: r2.viewer_time }), a3._playbackHeartbeatInterval = null);
|
53542
|
+
});
|
53543
|
+
}
|
53544
|
+
return Z(e3, [{ key: "_startPlaybackHeartbeatInterval", value: function() {
|
53545
|
+
var e4 = this;
|
53546
|
+
null === this._playbackHeartbeatInterval && (this.pm.emit("playbackheartbeat"), this._playbackHeartbeatInterval = De.default.setInterval(function() {
|
53547
|
+
e4.pm.emit("playbackheartbeat");
|
53548
|
+
}, this.pm.playbackHeartbeatTime));
|
53549
|
+
} }, { key: "_stopPlaybackHeartbeatInterval", value: function() {
|
53550
|
+
this._playheadShouldBeProgressing = false, null !== this._playbackHeartbeatInterval && (De.default.clearInterval(this._playbackHeartbeatInterval), this.pm.emit("playbackheartbeatend"), this._playbackHeartbeatInterval = null);
|
53551
|
+
} }]), e3;
|
53552
|
+
}(), Se = function e3(t3) {
|
53553
|
+
var a3 = this;
|
53554
|
+
X(this, e3), ee(this, "viewErrored", void 0), t3.on("viewinit", function() {
|
53555
|
+
a3.viewErrored = false;
|
53556
|
+
}), t3.on("error", function(e4, r2) {
|
53557
|
+
try {
|
53558
|
+
var n2 = t3.errorTranslator({ player_error_code: r2.player_error_code, player_error_message: r2.player_error_message, player_error_context: r2.player_error_context, player_error_severity: r2.player_error_severity, player_error_business_exception: r2.player_error_business_exception });
|
53559
|
+
n2 && (t3.data.player_error_code = n2.player_error_code || r2.player_error_code, t3.data.player_error_message = n2.player_error_message || r2.player_error_message, t3.data.player_error_context = n2.player_error_context || r2.player_error_context, t3.data.player_error_severity = n2.player_error_severity || r2.player_error_severity, t3.data.player_error_business_exception = n2.player_error_business_exception || r2.player_error_business_exception, a3.viewErrored = true);
|
53560
|
+
} catch (e5) {
|
53561
|
+
t3.mux.log.warn("Exception in error translator callback.", e5), a3.viewErrored = true;
|
53562
|
+
}
|
53563
|
+
}), t3.on("aftererror", function() {
|
53564
|
+
var e4, a4, r2, n2, i3;
|
53565
|
+
null === (e4 = t3.data) || void 0 === e4 || delete e4.player_error_code, null === (a4 = t3.data) || void 0 === a4 || delete a4.player_error_message, null === (r2 = t3.data) || void 0 === r2 || delete r2.player_error_context, null === (n2 = t3.data) || void 0 === n2 || delete n2.player_error_severity, null === (i3 = t3.data) || void 0 === i3 || delete i3.player_error_business_exception;
|
53566
|
+
});
|
53567
|
+
}, Ae = function() {
|
53568
|
+
function e3(t3) {
|
53569
|
+
X(this, e3), ee(this, "_watchTimeTrackerLastCheckedTime", void 0), ee(this, "pm", void 0), this.pm = t3, this._watchTimeTrackerLastCheckedTime = null, t3.on("playbackheartbeat", this._updateWatchTime.bind(this)), t3.on("playbackheartbeatend", this._clearWatchTimeState.bind(this));
|
53570
|
+
}
|
53571
|
+
return Z(e3, [{ key: "_updateWatchTime", value: function(e4, t3) {
|
53572
|
+
var a3 = t3.viewer_time;
|
53573
|
+
null === this._watchTimeTrackerLastCheckedTime && (this._watchTimeTrackerLastCheckedTime = a3), de(this.pm.data, "view_watch_time", a3 - this._watchTimeTrackerLastCheckedTime), this._watchTimeTrackerLastCheckedTime = a3;
|
53574
|
+
} }, { key: "_clearWatchTimeState", value: function(e4, t3) {
|
53575
|
+
this._updateWatchTime(e4, t3), this._watchTimeTrackerLastCheckedTime = null;
|
53576
|
+
} }]), e3;
|
53577
|
+
}(), Oe = function() {
|
53578
|
+
function e3(t3) {
|
53579
|
+
var a3 = this;
|
53580
|
+
X(this, e3), ee(this, "_playbackTimeTrackerLastPlayheadPosition", void 0), ee(this, "_lastTime", void 0), ee(this, "_isAdPlaying", void 0), ee(this, "_callbackUpdatePlaybackTime", void 0), ee(this, "pm", void 0), this.pm = t3, this._playbackTimeTrackerLastPlayheadPosition = -1, this._lastTime = K.now(), this._isAdPlaying = false, this._callbackUpdatePlaybackTime = null;
|
53581
|
+
var r2 = this._startPlaybackTimeTracking.bind(this);
|
53582
|
+
t3.on("playing", r2), t3.on("adplaying", r2), t3.on("seeked", r2);
|
53583
|
+
var n2 = this._stopPlaybackTimeTracking.bind(this);
|
53584
|
+
t3.on("playbackheartbeatend", n2), t3.on("seeking", n2), t3.on("adplaying", function() {
|
53585
|
+
a3._isAdPlaying = true;
|
53586
|
+
}), t3.on("adended", function() {
|
53587
|
+
a3._isAdPlaying = false;
|
53588
|
+
}), t3.on("adpause", function() {
|
53589
|
+
a3._isAdPlaying = false;
|
53590
|
+
}), t3.on("adbreakstart", function() {
|
53591
|
+
a3._isAdPlaying = false;
|
53592
|
+
}), t3.on("adbreakend", function() {
|
53593
|
+
a3._isAdPlaying = false;
|
53594
|
+
}), t3.on("adplay", function() {
|
53595
|
+
a3._isAdPlaying = false;
|
53596
|
+
}), t3.on("viewinit", function() {
|
53597
|
+
a3._playbackTimeTrackerLastPlayheadPosition = -1, a3._lastTime = K.now(), a3._isAdPlaying = false, a3._callbackUpdatePlaybackTime = null;
|
53598
|
+
});
|
53599
|
+
}
|
53600
|
+
return Z(e3, [{ key: "_startPlaybackTimeTracking", value: function() {
|
53601
|
+
null === this._callbackUpdatePlaybackTime && (this._callbackUpdatePlaybackTime = this._updatePlaybackTime.bind(this), this._playbackTimeTrackerLastPlayheadPosition = this.pm.data.player_playhead_time, this.pm.on("playbackheartbeat", this._callbackUpdatePlaybackTime));
|
53602
|
+
} }, { key: "_stopPlaybackTimeTracking", value: function() {
|
53603
|
+
this._callbackUpdatePlaybackTime && (this._updatePlaybackTime(), this.pm.off("playbackheartbeat", this._callbackUpdatePlaybackTime), this._callbackUpdatePlaybackTime = null, this._playbackTimeTrackerLastPlayheadPosition = -1);
|
53604
|
+
} }, { key: "_updatePlaybackTime", value: function() {
|
53605
|
+
var e4 = this.pm.data.player_playhead_time, t3 = K.now(), a3 = -1;
|
53606
|
+
this._playbackTimeTrackerLastPlayheadPosition >= 0 && e4 > this._playbackTimeTrackerLastPlayheadPosition ? a3 = e4 - this._playbackTimeTrackerLastPlayheadPosition : this._isAdPlaying && (a3 = t3 - this._lastTime), a3 > 0 && a3 <= 1e3 && de(this.pm.data, "view_content_playback_time", a3), this._playbackTimeTrackerLastPlayheadPosition = e4, this._lastTime = t3;
|
53607
|
+
} }]), e3;
|
53608
|
+
}(), Re = function() {
|
53609
|
+
function e3(t3) {
|
53610
|
+
X(this, e3), ee(this, "pm", void 0), this.pm = t3;
|
53611
|
+
var a3 = this._updatePlayheadTime.bind(this);
|
53612
|
+
t3.on("playbackheartbeat", a3), t3.on("playbackheartbeatend", a3), t3.on("timeupdate", a3), t3.on("destroy", function() {
|
53613
|
+
t3.off("timeupdate", a3);
|
53614
|
+
});
|
53615
|
+
}
|
53616
|
+
return Z(e3, [{ key: "_updateMaxPlayheadPosition", value: function() {
|
53617
|
+
this.pm.data.view_max_playhead_position = void 0 === this.pm.data.view_max_playhead_position ? this.pm.data.player_playhead_time : Math.max(this.pm.data.view_max_playhead_position, this.pm.data.player_playhead_time);
|
53618
|
+
} }, { key: "_updatePlayheadTime", value: function(e4, t3) {
|
53619
|
+
var a3 = this, r2 = function() {
|
53620
|
+
a3.pm.currentFragmentPDT && a3.pm.currentFragmentStart && (a3.pm.data.player_program_time = a3.pm.currentFragmentPDT + a3.pm.data.player_playhead_time - a3.pm.currentFragmentStart);
|
53621
|
+
};
|
53622
|
+
if (t3 && t3.player_playhead_time)
|
53623
|
+
this.pm.data.player_playhead_time = t3.player_playhead_time, r2(), this._updateMaxPlayheadPosition();
|
53624
|
+
else if (this.pm.getPlayheadTime) {
|
53625
|
+
var n2 = this.pm.getPlayheadTime();
|
53626
|
+
void 0 !== n2 && (this.pm.data.player_playhead_time = n2, r2(), this._updateMaxPlayheadPosition());
|
53627
|
+
}
|
53628
|
+
} }]), e3;
|
53629
|
+
}(), Pe = 3e5, Ne = function e3(t3) {
|
53630
|
+
if (X(this, e3), !t3.disableRebufferTracking) {
|
53631
|
+
var a3, r2 = function(e4, t4) {
|
53632
|
+
n2(t4), a3 = void 0;
|
53633
|
+
}, n2 = function(e4) {
|
53634
|
+
if (a3) {
|
53635
|
+
var r3 = e4.viewer_time - a3;
|
53636
|
+
de(t3.data, "view_rebuffer_duration", r3), a3 = e4.viewer_time, t3.data.view_rebuffer_duration > Pe && (t3.emit("viewend"), t3.send("viewend"), t3.mux.log.warn("Ending view after rebuffering for longer than ".concat(Pe, "ms, future events will be ignored unless a programchange or videochange occurs.")));
|
53637
|
+
}
|
53638
|
+
t3.data.view_watch_time >= 0 && t3.data.view_rebuffer_count > 0 && (t3.data.view_rebuffer_frequency = t3.data.view_rebuffer_count / t3.data.view_watch_time, t3.data.view_rebuffer_percentage = t3.data.view_rebuffer_duration / t3.data.view_watch_time);
|
53639
|
+
};
|
53640
|
+
t3.on("playbackheartbeat", function(e4, t4) {
|
53641
|
+
return n2(t4);
|
53642
|
+
}), t3.on("rebufferstart", function(e4, n3) {
|
53643
|
+
a3 || (de(t3.data, "view_rebuffer_count", 1), a3 = n3.viewer_time, t3.one("rebufferend", r2));
|
53644
|
+
}), t3.on("viewinit", function() {
|
53645
|
+
a3 = void 0, t3.off("rebufferend", r2);
|
53646
|
+
});
|
53647
|
+
}
|
53648
|
+
}, Ie = function() {
|
53649
|
+
function e3(t3) {
|
53650
|
+
var a3 = this;
|
53651
|
+
X(this, e3), ee(this, "_lastCheckedTime", void 0), ee(this, "_lastPlayheadTime", void 0), ee(this, "_lastPlayheadTimeUpdatedTime", void 0), ee(this, "_rebuffering", void 0), ee(this, "pm", void 0), this.pm = t3, !t3.disableRebufferTracking && !t3.disablePlayheadRebufferTracking && (this._lastCheckedTime = null, this._lastPlayheadTime = null, this._lastPlayheadTimeUpdatedTime = null, t3.on("playbackheartbeat", this._checkIfRebuffering.bind(this)), t3.on("playbackheartbeatend", this._cleanupRebufferTracker.bind(this)), t3.on("seeking", function() {
|
53652
|
+
a3._cleanupRebufferTracker(null, { viewer_time: K.now() });
|
53653
|
+
}));
|
53654
|
+
}
|
53655
|
+
return Z(e3, [{ key: "_checkIfRebuffering", value: function(e4, t3) {
|
53656
|
+
if (this.pm.seekingTracker.isSeeking || this.pm.adTracker.isAdBreak || !this.pm.playbackHeartbeat._playheadShouldBeProgressing)
|
53657
|
+
this._cleanupRebufferTracker(e4, t3);
|
53658
|
+
else if (null !== this._lastCheckedTime)
|
53659
|
+
if (this._lastPlayheadTime === this.pm.data.player_playhead_time) {
|
53660
|
+
var a3 = t3.viewer_time - this._lastPlayheadTimeUpdatedTime;
|
53661
|
+
"number" == typeof this.pm.sustainedRebufferThreshold && a3 >= this.pm.sustainedRebufferThreshold && (this._rebuffering || (this._rebuffering = true, this.pm.emit("rebufferstart", { viewer_time: this._lastPlayheadTimeUpdatedTime }))), this._lastCheckedTime = t3.viewer_time;
|
53662
|
+
} else
|
53663
|
+
this._cleanupRebufferTracker(e4, t3, true);
|
53664
|
+
else
|
53665
|
+
this._prepareRebufferTrackerState(t3.viewer_time);
|
53666
|
+
} }, { key: "_clearRebufferTrackerState", value: function() {
|
53667
|
+
this._lastCheckedTime = null, this._lastPlayheadTime = null, this._lastPlayheadTimeUpdatedTime = null;
|
53668
|
+
} }, { key: "_prepareRebufferTrackerState", value: function(e4) {
|
53669
|
+
this._lastCheckedTime = e4, this._lastPlayheadTime = this.pm.data.player_playhead_time, this._lastPlayheadTimeUpdatedTime = e4;
|
53670
|
+
} }, { key: "_cleanupRebufferTracker", value: function(e4, t3) {
|
53671
|
+
var a3 = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
|
53672
|
+
if (this._rebuffering)
|
53673
|
+
this._rebuffering = false, this.pm.emit("rebufferend", { viewer_time: t3.viewer_time });
|
53674
|
+
else {
|
53675
|
+
if (null === this._lastCheckedTime)
|
53676
|
+
return;
|
53677
|
+
var r2 = this.pm.data.player_playhead_time - this._lastPlayheadTime, n2 = t3.viewer_time - this._lastPlayheadTimeUpdatedTime;
|
53678
|
+
"number" == typeof this.pm.minimumRebufferDuration && r2 > 0 && n2 - r2 > this.pm.minimumRebufferDuration && (this._lastCheckedTime = null, this.pm.emit("rebufferstart", { viewer_time: this._lastPlayheadTimeUpdatedTime }), this.pm.emit("rebufferend", { viewer_time: this._lastPlayheadTimeUpdatedTime + n2 - r2 }));
|
53679
|
+
}
|
53680
|
+
a3 ? this._prepareRebufferTrackerState(t3.viewer_time) : this._clearRebufferTrackerState();
|
53681
|
+
} }]), e3;
|
53682
|
+
}(), Le = Ie, Ce = function() {
|
53683
|
+
function e3(t3) {
|
53684
|
+
var a3 = this;
|
53685
|
+
X(this, e3), ee(this, "NAVIGATION_START", void 0), ee(this, "pm", void 0), this.pm = t3, t3.on("viewinit", function() {
|
53686
|
+
var e4 = t3.data, r2 = e4.view_id;
|
53687
|
+
if (!e4.view_program_changed) {
|
53688
|
+
var n2 = function(e5, n3) {
|
53689
|
+
var i3 = n3.viewer_time;
|
53690
|
+
("playing" === e5.type && void 0 === t3.data.view_time_to_first_frame || "adplaying" === e5.type && (void 0 === t3.data.view_time_to_first_frame || a3._inPrerollPosition())) && a3.calculateTimeToFirstFrame(i3 || K.now(), r2);
|
53691
|
+
};
|
53692
|
+
t3.one("playing", n2), t3.one("adplaying", n2), t3.one("viewend", function() {
|
53693
|
+
t3.off("playing", n2), t3.off("adplaying", n2);
|
53694
|
+
});
|
53695
|
+
}
|
53696
|
+
});
|
53697
|
+
}
|
53698
|
+
return Z(e3, [{ key: "_inPrerollPosition", value: function() {
|
53699
|
+
return void 0 === this.pm.data.view_content_playback_time || this.pm.data.view_content_playback_time <= 1e3;
|
53700
|
+
} }, { key: "calculateTimeToFirstFrame", value: function(e4, t3) {
|
53701
|
+
t3 === this.pm.data.view_id && (this.pm.watchTimeTracker._updateWatchTime(null, { viewer_time: e4 }), this.pm.data.view_time_to_first_frame = this.pm.data.view_watch_time, (this.pm.data.player_autoplay_on || this.pm.data.video_is_autoplay) && this.NAVIGATION_START && (this.pm.data.view_aggregate_startup_time = this.pm.data.view_start + this.pm.data.view_watch_time - this.NAVIGATION_START));
|
53702
|
+
} }]), e3;
|
53703
|
+
}(), je = function e3(t3) {
|
53704
|
+
var a3 = this;
|
53705
|
+
X(this, e3), ee(this, "_lastPlayerHeight", void 0), ee(this, "_lastPlayerWidth", void 0), ee(this, "_lastPlayheadPosition", void 0), ee(this, "_lastSourceHeight", void 0), ee(this, "_lastSourceWidth", void 0), t3.on("viewinit", function() {
|
53706
|
+
a3._lastPlayheadPosition = -1;
|
53707
|
+
});
|
53708
|
+
["pause", "rebufferstart", "seeking", "error", "adbreakstart", "hb"].forEach(function(e4) {
|
53709
|
+
t3.on(e4, function() {
|
53710
|
+
if (a3._lastPlayheadPosition >= 0 && t3.data.player_playhead_time >= 0 && a3._lastPlayerWidth >= 0 && a3._lastSourceWidth > 0 && a3._lastPlayerHeight >= 0 && a3._lastSourceHeight > 0) {
|
53711
|
+
var e5 = t3.data.player_playhead_time - a3._lastPlayheadPosition;
|
53712
|
+
if (e5 < 0)
|
53713
|
+
return void (a3._lastPlayheadPosition = -1);
|
53714
|
+
var r2 = Math.min(a3._lastPlayerWidth / a3._lastSourceWidth, a3._lastPlayerHeight / a3._lastSourceHeight), n2 = Math.max(0, r2 - 1), i3 = Math.max(0, 1 - r2);
|
53715
|
+
t3.data.view_max_upscale_percentage = Math.max(t3.data.view_max_upscale_percentage || 0, n2), t3.data.view_max_downscale_percentage = Math.max(t3.data.view_max_downscale_percentage || 0, i3), de(t3.data, "view_total_content_playback_time", e5), de(t3.data, "view_total_upscaling", n2 * e5), de(t3.data, "view_total_downscaling", i3 * e5);
|
53716
|
+
}
|
53717
|
+
a3._lastPlayheadPosition = -1;
|
53718
|
+
});
|
53719
|
+
}), ["playing", "hb"].forEach(function(e4) {
|
53720
|
+
t3.on(e4, function() {
|
53721
|
+
a3._lastPlayheadPosition = t3.data.player_playhead_time, a3._lastPlayerWidth = t3.data.player_width, a3._lastPlayerHeight = t3.data.player_height, a3._lastSourceWidth = t3.data.video_source_width, a3._lastSourceHeight = t3.data.video_source_height;
|
53722
|
+
});
|
53723
|
+
});
|
53724
|
+
}, He = function e3(t3) {
|
53725
|
+
var a3 = this;
|
53726
|
+
X(this, e3), ee(this, "isSeeking", void 0), this.isSeeking = false;
|
53727
|
+
var r2 = -1, n2 = function() {
|
53728
|
+
var e4 = K.now(), n3 = (t3.data.viewer_time || e4) - (r2 || e4);
|
53729
|
+
de(t3.data, "view_seek_duration", n3), t3.data.view_max_seek_time = Math.max(t3.data.view_max_seek_time || 0, n3), a3.isSeeking = false, r2 = -1;
|
53730
|
+
};
|
53731
|
+
t3.on("seeking", function(e4, i3) {
|
53732
|
+
Object.assign(t3.data, i3), a3.isSeeking && i3.viewer_time - r2 <= 2e3 ? r2 = i3.viewer_time : (a3.isSeeking && n2(), a3.isSeeking = true, r2 = i3.viewer_time, de(t3.data, "view_seek_count", 1), t3.send("seeking"));
|
53733
|
+
}), t3.on("seeked", function() {
|
53734
|
+
n2();
|
53735
|
+
}), t3.on("viewend", function() {
|
53736
|
+
a3.isSeeking && (n2(), t3.send("seeked")), a3.isSeeking = false, r2 = -1;
|
53737
|
+
});
|
53738
|
+
}, Me = function(e3, t3) {
|
53739
|
+
e3.push(t3), e3.sort(function(e4, t4) {
|
53740
|
+
return e4.viewer_time - t4.viewer_time;
|
53741
|
+
});
|
53742
|
+
}, Ue = ["adbreakstart", "adrequest", "adresponse", "adplay", "adplaying", "adpause", "adended", "adbreakend", "aderror", "adclicked", "adskipped"], Be = function() {
|
53743
|
+
function e3(t3) {
|
53744
|
+
var a3 = this;
|
53745
|
+
X(this, e3), ee(this, "_adHasPlayed", void 0), ee(this, "_adRequests", void 0), ee(this, "_adResponses", void 0), ee(this, "_currentAdRequestNumber", void 0), ee(this, "_currentAdResponseNumber", void 0), ee(this, "_prerollPlayTime", void 0), ee(this, "_wouldBeNewAdPlay", void 0), ee(this, "isAdBreak", void 0), ee(this, "pm", void 0), this.pm = t3, t3.on("viewinit", function() {
|
53746
|
+
a3.isAdBreak = false, a3._currentAdRequestNumber = 0, a3._currentAdResponseNumber = 0, a3._adRequests = [], a3._adResponses = [], a3._adHasPlayed = false, a3._wouldBeNewAdPlay = true, a3._prerollPlayTime = void 0;
|
53747
|
+
}), Ue.forEach(function(e4) {
|
53748
|
+
return t3.on(e4, a3._updateAdData.bind(a3));
|
53749
|
+
});
|
53750
|
+
var r2 = function() {
|
53751
|
+
a3.isAdBreak = false;
|
53752
|
+
};
|
53753
|
+
t3.on("adbreakstart", function() {
|
53754
|
+
a3.isAdBreak = true;
|
53755
|
+
}), t3.on("play", r2), t3.on("playing", r2), t3.on("viewend", r2), t3.on("adrequest", function(e4, r3) {
|
53756
|
+
r3 = Object.assign({ ad_request_id: "generatedAdRequestId" + a3._currentAdRequestNumber++ }, r3), Me(a3._adRequests, r3), de(t3.data, "view_ad_request_count"), a3.inPrerollPosition() && (t3.data.view_preroll_requested = true, a3._adHasPlayed || de(t3.data, "view_preroll_request_count"));
|
53757
|
+
}), t3.on("adresponse", function(e4, r3) {
|
53758
|
+
r3 = Object.assign({ ad_request_id: "generatedAdRequestId" + a3._currentAdResponseNumber++ }, r3), Me(a3._adResponses, r3);
|
53759
|
+
var n2 = a3.findAdRequest(r3.ad_request_id);
|
53760
|
+
n2 && de(t3.data, "view_ad_request_time", Math.max(0, r3.viewer_time - n2.viewer_time));
|
53761
|
+
}), t3.on("adplay", function(e4, r3) {
|
53762
|
+
a3._adHasPlayed = true, a3._wouldBeNewAdPlay && (a3._wouldBeNewAdPlay = false, de(t3.data, "view_ad_played_count")), a3.inPrerollPosition() && !t3.data.view_preroll_played && (t3.data.view_preroll_played = true, a3._adRequests.length > 0 && (t3.data.view_preroll_request_time = Math.max(0, r3.viewer_time - a3._adRequests[0].viewer_time)), t3.data.view_start && (t3.data.view_startup_preroll_request_time = Math.max(0, r3.viewer_time - t3.data.view_start)), a3._prerollPlayTime = r3.viewer_time);
|
53763
|
+
}), t3.on("adplaying", function(e4, r3) {
|
53764
|
+
a3.inPrerollPosition() && void 0 === t3.data.view_preroll_load_time && void 0 !== a3._prerollPlayTime && (t3.data.view_preroll_load_time = r3.viewer_time - a3._prerollPlayTime, t3.data.view_startup_preroll_load_time = r3.viewer_time - a3._prerollPlayTime);
|
53765
|
+
}), t3.on("adclicked", function(e4, r3) {
|
53766
|
+
a3._wouldBeNewAdPlay || de(t3.data, "view_ad_clicked_count");
|
53767
|
+
}), t3.on("adskipped", function(e4, r3) {
|
53768
|
+
a3._wouldBeNewAdPlay || de(t3.data, "view_ad_skipped_count");
|
53769
|
+
}), t3.on("adended", function() {
|
53770
|
+
a3._wouldBeNewAdPlay = true;
|
53771
|
+
}), t3.on("aderror", function() {
|
53772
|
+
a3._wouldBeNewAdPlay = true;
|
53773
|
+
});
|
53774
|
+
}
|
53775
|
+
return Z(e3, [{ key: "inPrerollPosition", value: function() {
|
53776
|
+
return void 0 === this.pm.data.view_content_playback_time || this.pm.data.view_content_playback_time <= 1e3;
|
53777
|
+
} }, { key: "findAdRequest", value: function(e4) {
|
53778
|
+
for (var t3 = 0; t3 < this._adRequests.length; t3++)
|
53779
|
+
if (this._adRequests[t3].ad_request_id === e4)
|
53780
|
+
return this._adRequests[t3];
|
53781
|
+
} }, { key: "_updateAdData", value: function(e4, t3) {
|
53782
|
+
if (this.inPrerollPosition()) {
|
53783
|
+
if (!this.pm.data.view_preroll_ad_tag_hostname && t3.ad_tag_url) {
|
53784
|
+
var a3 = j(oe(t3.ad_tag_url), 2), r2 = a3[0], n2 = a3[1];
|
53785
|
+
this.pm.data.view_preroll_ad_tag_domain = n2, this.pm.data.view_preroll_ad_tag_hostname = r2;
|
53786
|
+
}
|
53787
|
+
if (!this.pm.data.view_preroll_ad_asset_hostname && t3.ad_asset_url) {
|
53788
|
+
var i3 = j(oe(t3.ad_asset_url), 2), o2 = i3[0], s2 = i3[1];
|
53789
|
+
this.pm.data.view_preroll_ad_asset_domain = s2, this.pm.data.view_preroll_ad_asset_hostname = o2;
|
53790
|
+
}
|
53791
|
+
}
|
53792
|
+
this.pm.data.ad_asset_url = null == t3 ? void 0 : t3.ad_asset_url, this.pm.data.ad_tag_url = null == t3 ? void 0 : t3.ad_tag_url, this.pm.data.ad_creative_id = null == t3 ? void 0 : t3.ad_creative_id, this.pm.data.ad_id = null == t3 ? void 0 : t3.ad_id, this.pm.data.ad_universal_id = null == t3 ? void 0 : t3.ad_universal_id;
|
53793
|
+
} }]), e3;
|
53794
|
+
}(), Fe = _2(h()), We = function e3(t3) {
|
53795
|
+
X(this, e3);
|
53796
|
+
var a3, r2, n2 = function() {
|
53797
|
+
t3.disableRebufferTracking || a3 && (de(t3.data, "view_waiting_rebuffer_duration", K.now() - a3), a3 = false, Fe.default.clearInterval(r2));
|
53798
|
+
}, i3 = false, o2 = function() {
|
53799
|
+
i3 = false, n2();
|
53800
|
+
};
|
53801
|
+
t3.on("waiting", function() {
|
53802
|
+
i3 && (t3.disableRebufferTracking || (de(t3.data, "view_waiting_rebuffer_count", 1), a3 = K.now(), r2 = Fe.default.setInterval(function() {
|
53803
|
+
if (a3) {
|
53804
|
+
var e4 = K.now();
|
53805
|
+
de(t3.data, "view_waiting_rebuffer_duration", e4 - a3), a3 = e4;
|
53806
|
+
}
|
53807
|
+
}, 250)));
|
53808
|
+
}), t3.on("playing", function() {
|
53809
|
+
n2(), i3 = true;
|
53810
|
+
}), t3.on("pause", o2), t3.on("seeking", o2);
|
53811
|
+
}, Ve = function e3(t3) {
|
53812
|
+
var a3 = this;
|
53813
|
+
X(this, e3), ee(this, "lastWallClockTime", void 0);
|
53814
|
+
var r2 = function() {
|
53815
|
+
a3.lastWallClockTime = K.now(), t3.on("before*", n2);
|
53816
|
+
}, n2 = function(e4) {
|
53817
|
+
var r3 = K.now(), n3 = a3.lastWallClockTime;
|
53818
|
+
a3.lastWallClockTime = r3, r3 - n3 > 3e4 && (t3.emit("devicesleep", { viewer_time: n3 }), Object.assign(t3.data, { viewer_time: n3 }), t3.send("devicesleep"), t3.emit("devicewake", { viewer_time: r3 }), Object.assign(t3.data, { viewer_time: r3 }), t3.send("devicewake"));
|
53819
|
+
};
|
53820
|
+
t3.one("playbackheartbeat", r2), t3.on("playbackheartbeatend", function() {
|
53821
|
+
t3.off("before*", n2), t3.one("playbackheartbeat", r2);
|
53822
|
+
});
|
53823
|
+
}, Ge = _2(h()), Qe = _2(w()), Je = _2(T()), ze = "muxData", Ke = function() {
|
53824
|
+
var e3;
|
53825
|
+
try {
|
53826
|
+
e3 = Qe.default.parse(Je.default.get(ze) || "");
|
53827
|
+
} catch (t3) {
|
53828
|
+
e3 = {};
|
53829
|
+
}
|
53830
|
+
return e3;
|
53831
|
+
}, Ye = function(e3) {
|
53832
|
+
try {
|
53833
|
+
Je.default.set(ze, Qe.default.stringify(e3), { expires: 365 });
|
53834
|
+
} catch (e4) {
|
53835
|
+
}
|
53836
|
+
}, Xe = function() {
|
53837
|
+
var e3 = Ke();
|
53838
|
+
return e3.mux_viewer_id = e3.mux_viewer_id || M(), e3.msn = e3.msn || Math.random(), Ye(e3), { mux_viewer_id: e3.mux_viewer_id, mux_sample_number: e3.msn };
|
53839
|
+
};
|
53840
|
+
function $e(e3, t3) {
|
53841
|
+
var a3 = t3.beaconCollectionDomain, r2 = t3.beaconDomain;
|
53842
|
+
if (a3)
|
53843
|
+
return "https://" + a3;
|
53844
|
+
var n2 = r2 || "litix.io";
|
53845
|
+
return (e3 = e3 || "inferred").match(/^[a-z0-9]+$/) ? "https://" + e3 + "." + n2 : "https://img.litix.io/a.gif";
|
53846
|
+
}
|
53847
|
+
var Ze = _2(h()), et = function() {
|
53848
|
+
var e3;
|
53849
|
+
switch (tt()) {
|
53850
|
+
case "cellular":
|
53851
|
+
e3 = "cellular";
|
53852
|
+
break;
|
53853
|
+
case "ethernet":
|
53854
|
+
e3 = "wired";
|
53855
|
+
break;
|
53856
|
+
case "wifi":
|
53857
|
+
e3 = "wifi";
|
53858
|
+
break;
|
53859
|
+
case void 0:
|
53860
|
+
break;
|
53861
|
+
default:
|
53862
|
+
e3 = "other";
|
53863
|
+
}
|
53864
|
+
return e3;
|
53865
|
+
}, tt = function() {
|
53866
|
+
var e3 = Ze.default.navigator, t3 = e3 && (e3.connection || e3.mozConnection || e3.webkitConnection);
|
53867
|
+
return t3 && t3.type;
|
53868
|
+
};
|
53869
|
+
et.getConnectionFromAPI = tt;
|
53870
|
+
var at = et, rt = it({ a: "env", b: "beacon", c: "custom", d: "ad", e: "event", f: "experiment", i: "internal", m: "mux", n: "response", p: "player", q: "request", r: "retry", s: "session", t: "timestamp", u: "viewer", v: "video", w: "page", x: "view", y: "sub" }), nt = it({ ad: "ad", ag: "aggregate", ap: "api", al: "application", ar: "architecture", as: "asset", au: "autoplay", av: "average", bi: "bitrate", br: "break", bw: "browser", by: "bytes", bz: "business", ca: "cached", cb: "cancel", cc: "codec", cd: "code", cg: "category", ch: "changed", ck: "clicked", cl: "canceled", cn: "config", co: "count", ce: "counter", cp: "complete", cr: "creative", ct: "content", cu: "current", cx: "connection", cz: "context", dg: "downscaling", dm: "domain", dn: "cdn", do: "downscale", dr: "drm", dp: "dropped", du: "duration", dv: "device", ec: "encoding", ed: "edge", en: "end", eg: "engine", em: "embed", er: "error", ep: "experiments", es: "errorcode", et: "errortext", ee: "event", ev: "events", ex: "expires", ez: "exception", fa: "failed", fi: "first", fm: "family", ft: "format", fp: "fps", fq: "frequency", fr: "frame", fs: "fullscreen", ha: "has", hb: "holdback", he: "headers", ho: "host", hn: "hostname", ht: "height", id: "id", ii: "init", in: "instance", ip: "ip", is: "is", ke: "key", la: "language", lb: "labeled", le: "level", li: "live", ld: "loaded", lo: "load", ls: "lists", lt: "latency", ma: "max", md: "media", me: "message", mf: "manifest", mi: "mime", ml: "midroll", mm: "min", mn: "manufacturer", mo: "model", mx: "mux", ne: "newest", nm: "name", no: "number", on: "on", os: "os", pa: "paused", pb: "playback", pd: "producer", pe: "percentage", pf: "played", pg: "program", ph: "playhead", pi: "plugin", pl: "preroll", pn: "playing", po: "poster", pr: "preload", ps: "position", pt: "part", py: "property", ra: "rate", rd: "requested", re: "rebuffer", rf: "rendition", rm: "remote", ro: "ratio", rp: "response", rq: "request", rs: "requests", sa: "sample", sd: "skipped", se: "session", sk: "seek", sm: "stream", so: "source", sq: "sequence", sr: "series", st: "start", su: "startup", sv: "server", sw: "software", sy: "severity", ta: "tag", tc: "tech", te: "text", tg: "target", th: "throughput", ti: "time", tl: "total", to: "to", tt: "title", ty: "type", ug: "upscaling", un: "universal", up: "upscale", ur: "url", us: "user", va: "variant", vd: "viewed", vi: "video", ve: "version", vw: "view", vr: "viewer", wd: "width", wa: "watch", wt: "waiting" });
|
53871
|
+
function it(e3) {
|
53872
|
+
var t3 = {};
|
53873
|
+
for (var a3 in e3)
|
53874
|
+
e3.hasOwnProperty(a3) && (t3[e3[a3]] = a3);
|
53875
|
+
return t3;
|
53876
|
+
}
|
53877
|
+
function ot(e3) {
|
53878
|
+
var t3 = {}, a3 = {};
|
53879
|
+
return Object.keys(e3).forEach(function(r2) {
|
53880
|
+
var n2 = false;
|
53881
|
+
if (e3.hasOwnProperty(r2) && void 0 !== e3[r2]) {
|
53882
|
+
var i3 = r2.split("_"), o2 = i3[0], s2 = rt[o2];
|
53883
|
+
s2 || (G.info("Data key word `" + i3[0] + "` not expected in " + r2), s2 = o2 + "_"), i3.splice(1).forEach(function(e4) {
|
53884
|
+
"url" === e4 && (n2 = true), nt[e4] ? s2 += nt[e4] : Number(e4) && Math.floor(Number(e4)) === Number(e4) ? s2 += e4 : (G.info("Data key word `" + e4 + "` not expected in " + r2), s2 += "_" + e4 + "_");
|
53885
|
+
}), n2 ? a3[s2] = e3[r2] : t3[s2] = e3[r2];
|
53886
|
+
}
|
53887
|
+
}), Object.assign(t3, a3);
|
53888
|
+
}
|
53889
|
+
var st = _2(h()), ut = { maxBeaconSize: 300, maxQueueLength: 3600, baseTimeBetweenBeacons: 1e4, maxPayloadKBSize: 500 }, dt = ["hb", "requestcompleted", "requestfailed", "requestcanceled"], lt = "https://img.litix.io", ct = function(e3) {
|
53890
|
+
var t3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
53891
|
+
this._beaconUrl = e3 || lt, this._eventQueue = [], this._postInFlight = false, this._failureCount = 0, this._sendTimeout = false, this._options = Object.assign({}, ut, t3);
|
53892
|
+
};
|
53893
|
+
ct.prototype.queueEvent = function(e3, t3) {
|
53894
|
+
var a3 = Object.assign({}, t3);
|
53895
|
+
return (this._eventQueue.length <= this._options.maxQueueLength || "eventrateexceeded" === e3) && (this._eventQueue.push(a3), this._sendTimeout || this._startBeaconSending(), this._eventQueue.length <= this._options.maxQueueLength);
|
53896
|
+
}, ct.prototype.flushEvents = function() {
|
53897
|
+
var e3 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
|
53898
|
+
e3 && 1 === this._eventQueue.length ? this._eventQueue.pop() : (this._eventQueue.length && this._sendBeaconQueue(), this._startBeaconSending());
|
53899
|
+
}, ct.prototype.destroy = function() {
|
53900
|
+
var e3 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
|
53901
|
+
this.destroyed = true, e3 ? this._clearBeaconQueue() : this.flushEvents(), st.default.clearTimeout(this._sendTimeout);
|
53902
|
+
}, ct.prototype._clearBeaconQueue = function() {
|
53903
|
+
var e3 = this._eventQueue.length > this._options.maxBeaconSize ? this._eventQueue.length - this._options.maxBeaconSize : 0, t3 = this._eventQueue.slice(e3);
|
53904
|
+
e3 > 0 && Object.assign(t3[t3.length - 1], ot({ mux_view_message: "event queue truncated" }));
|
53905
|
+
var a3 = this._createPayload(t3);
|
53906
|
+
ft(this._beaconUrl, a3, true, function() {
|
53907
|
+
});
|
53908
|
+
}, ct.prototype._sendBeaconQueue = function() {
|
53909
|
+
var e3 = this;
|
53910
|
+
if (!this._postInFlight) {
|
53911
|
+
var t3 = this._eventQueue.slice(0, this._options.maxBeaconSize);
|
53912
|
+
this._eventQueue = this._eventQueue.slice(this._options.maxBeaconSize), this._postInFlight = true;
|
53913
|
+
var a3 = this._createPayload(t3), r2 = K.now();
|
53914
|
+
ft(this._beaconUrl, a3, false, function(a4, n2) {
|
53915
|
+
n2 ? (e3._eventQueue = t3.concat(e3._eventQueue), e3._failureCount += 1, G.info("Error sending beacon: " + n2)) : e3._failureCount = 0, e3._roundTripTime = K.now() - r2, e3._postInFlight = false;
|
53916
|
+
});
|
53917
|
+
}
|
53918
|
+
}, ct.prototype._getNextBeaconTime = function() {
|
53919
|
+
if (!this._failureCount)
|
53920
|
+
return this._options.baseTimeBetweenBeacons;
|
53921
|
+
var e3 = Math.pow(2, this._failureCount - 1);
|
53922
|
+
return (1 + (e3 *= Math.random())) * this._options.baseTimeBetweenBeacons;
|
53923
|
+
}, ct.prototype._startBeaconSending = function() {
|
53924
|
+
var e3 = this;
|
53925
|
+
st.default.clearTimeout(this._sendTimeout), !this.destroyed && (this._sendTimeout = st.default.setTimeout(function() {
|
53926
|
+
e3._eventQueue.length && e3._sendBeaconQueue(), e3._startBeaconSending();
|
53927
|
+
}, this._getNextBeaconTime()));
|
53928
|
+
}, ct.prototype._createPayload = function(e3) {
|
53929
|
+
var t3 = this, a3 = { transmission_timestamp: Math.round(K.now()) };
|
53930
|
+
this._roundTripTime && (a3.rtt_ms = Math.round(this._roundTripTime));
|
53931
|
+
var r2, n2, i3, o2 = function() {
|
53932
|
+
r2 = JSON.stringify({ metadata: a3, events: n2 || e3 }), i3 = r2.length / 1024;
|
53933
|
+
}, s2 = function() {
|
53934
|
+
return i3 <= t3._options.maxPayloadKBSize;
|
53935
|
+
};
|
53936
|
+
return o2(), s2() || (G.info("Payload size is too big (" + i3 + " kb). Removing unnecessary events."), n2 = e3.filter(function(e4) {
|
53937
|
+
return -1 === dt.indexOf(e4.e);
|
53938
|
+
}), o2()), s2() || (G.info("Payload size still too big (" + i3 + " kb). Cropping fields.."), n2.forEach(function(e4) {
|
53939
|
+
for (var t4 in e4) {
|
53940
|
+
var a4 = e4[t4];
|
53941
|
+
"string" == typeof a4 && a4.length > 51200 && (e4[t4] = a4.substring(0, 51200));
|
53942
|
+
}
|
53943
|
+
}), o2()), r2;
|
53944
|
+
};
|
53945
|
+
var pt = function(e3) {
|
53946
|
+
return e3.length <= 57344;
|
53947
|
+
}, ft = function(e3, t3, a3, r2) {
|
53948
|
+
if (a3 && navigator && navigator.sendBeacon && navigator.sendBeacon(e3, t3))
|
53949
|
+
r2();
|
53950
|
+
else if (st.default.fetch)
|
53951
|
+
st.default.fetch(e3, { method: "POST", body: t3, headers: { "Content-Type": "text/plain" }, keepalive: pt(t3) }).then(function(e4) {
|
53952
|
+
return r2(null, e4.ok ? null : "Error");
|
53953
|
+
}).catch(function(e4) {
|
53954
|
+
return r2(null, e4);
|
53955
|
+
});
|
53956
|
+
else {
|
53957
|
+
if (st.default.XMLHttpRequest) {
|
53958
|
+
var n2 = new st.default.XMLHttpRequest();
|
53959
|
+
return n2.onreadystatechange = function() {
|
53960
|
+
if (4 === n2.readyState)
|
53961
|
+
return r2(null, 200 !== n2.status ? "error" : void 0);
|
53962
|
+
}, n2.open("POST", e3), n2.setRequestHeader("Content-Type", "text/plain"), void n2.send(t3);
|
53963
|
+
}
|
53964
|
+
r2();
|
53965
|
+
}
|
53966
|
+
}, _t = ct, ht = ["env_key", "view_id", "view_sequence_number", "player_sequence_number", "beacon_domain", "player_playhead_time", "viewer_time", "mux_api_version", "event", "video_id", "player_instance_id", "player_error_code", "player_error_message", "player_error_context", "player_error_severity", "player_error_business_exception"], vt = ["adplay", "adplaying", "adpause", "adfirstquartile", "admidpoint", "adthirdquartile", "adended", "adresponse", "adrequest"], mt = ["ad_id", "ad_creative_id", "ad_universal_id"], yt = ["viewstart", "error", "ended", "viewend"], gt = function() {
|
53967
|
+
function e3(t3, a3) {
|
53968
|
+
var r2, n2, i3, o2, s2, u2, d2, l2, c2, p2, f2, _3, h2, v2, m2, y2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
53969
|
+
X(this, e3), ee(this, "mux", void 0), ee(this, "envKey", void 0), ee(this, "options", void 0), ee(this, "eventQueue", void 0), ee(this, "sampleRate", void 0), ee(this, "disableCookies", void 0), ee(this, "respectDoNotTrack", void 0), ee(this, "previousBeaconData", void 0), ee(this, "lastEventTime", void 0), ee(this, "rateLimited", void 0), ee(this, "pageLevelData", void 0), ee(this, "viewerData", void 0), this.mux = t3, this.envKey = a3, this.options = y2, this.previousBeaconData = null, this.lastEventTime = 0, this.rateLimited = false, this.eventQueue = new _t($e(this.envKey, this.options)), this.sampleRate = null !== (h2 = this.options.sampleRate) && void 0 !== h2 ? h2 : 1, this.disableCookies = null !== (v2 = this.options.disableCookies) && void 0 !== v2 && v2, this.respectDoNotTrack = null !== (m2 = this.options.respectDoNotTrack) && void 0 !== m2 && m2, this.previousBeaconData = null, this.lastEventTime = 0, this.rateLimited = false, this.pageLevelData = { mux_api_version: this.mux.API_VERSION, mux_embed: this.mux.NAME, mux_embed_version: this.mux.VERSION, viewer_application_name: null === (r2 = this.options.platform) || void 0 === r2 ? void 0 : r2.name, viewer_application_version: null === (n2 = this.options.platform) || void 0 === n2 ? void 0 : n2.version, viewer_application_engine: null === (i3 = this.options.platform) || void 0 === i3 ? void 0 : i3.layout, viewer_device_name: null === (o2 = this.options.platform) || void 0 === o2 ? void 0 : o2.product, viewer_device_category: "", viewer_device_manufacturer: null === (s2 = this.options.platform) || void 0 === s2 ? void 0 : s2.manufacturer, viewer_os_family: null === (d2 = this.options.platform) || void 0 === d2 || null === (u2 = d2.os) || void 0 === u2 ? void 0 : u2.family, viewer_os_architecture: null === (c2 = this.options.platform) || void 0 === c2 || null === (l2 = c2.os) || void 0 === l2 ? void 0 : l2.architecture, viewer_os_version: null === (f2 = this.options.platform) || void 0 === f2 || null === (p2 = f2.os) || void 0 === p2 ? void 0 : p2.version, viewer_connection_type: at(), page_url: null === Ge.default || void 0 === Ge.default || null === (_3 = Ge.default.location) || void 0 === _3 ? void 0 : _3.href }, this.viewerData = this.disableCookies ? {} : Xe();
|
53970
|
+
}
|
53971
|
+
return Z(e3, [{ key: "send", value: function(e4, t3) {
|
53972
|
+
if (e4 && null != t3 && t3.view_id) {
|
53973
|
+
if (this.respectDoNotTrack && J())
|
53974
|
+
return G.info("Not sending `" + e4 + "` because Do Not Track is enabled");
|
53975
|
+
if (!t3 || "object" != typeof t3)
|
53976
|
+
return G.error("A data object was expected in send() but was not provided");
|
53977
|
+
var a3 = this.disableCookies ? {} : function() {
|
53978
|
+
var e5 = Ke(), t4 = K.now();
|
53979
|
+
return e5.session_start && (e5.sst = e5.session_start, delete e5.session_start), e5.session_id && (e5.sid = e5.session_id, delete e5.session_id), e5.session_expires && (e5.sex = e5.session_expires, delete e5.session_expires), (!e5.sex || e5.sex < t4) && (e5.sid = M(), e5.sst = t4), e5.sex = t4 + 15e5, Ye(e5), { session_id: e5.sid, session_start: e5.sst, session_expires: e5.sex };
|
53980
|
+
}(), r2 = ce(le({}, this.pageLevelData, t3, a3, this.viewerData), { event: e4, env_key: this.envKey });
|
53981
|
+
r2.user_id && (r2.viewer_user_id = r2.user_id, delete r2.user_id);
|
53982
|
+
var n2, i3 = (null !== (n2 = r2.mux_sample_number) && void 0 !== n2 ? n2 : 0) >= this.sampleRate, o2 = ot(this._deduplicateBeaconData(e4, r2));
|
53983
|
+
if (this.lastEventTime = this.mux.utils.now(), i3)
|
53984
|
+
return G.info("Not sending event due to sample rate restriction", e4, r2, o2);
|
53985
|
+
if (this.envKey || G.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL", e4, r2, o2), !this.rateLimited) {
|
53986
|
+
if (G.info("Sending event", e4, r2, o2), this.rateLimited = !this.eventQueue.queueEvent(e4, o2), this.mux.WINDOW_UNLOADING && "viewend" === e4)
|
53987
|
+
this.eventQueue.destroy(true);
|
53988
|
+
else if (this.mux.WINDOW_HIDDEN && "hb" === e4 ? this.eventQueue.flushEvents(true) : yt.indexOf(e4) >= 0 && this.eventQueue.flushEvents(), this.rateLimited)
|
53989
|
+
return r2.event = "eventrateexceeded", o2 = ot(r2), this.eventQueue.queueEvent(r2.event, o2), G.error("Beaconing disabled due to rate limit.");
|
53990
|
+
}
|
53991
|
+
}
|
53992
|
+
} }, { key: "destroy", value: function() {
|
53993
|
+
this.eventQueue.destroy(false);
|
53994
|
+
} }, { key: "_deduplicateBeaconData", value: function(e4, t3) {
|
53995
|
+
var a3 = this, r2 = {}, n2 = t3.view_id;
|
53996
|
+
if ("-1" === n2 || "viewstart" === e4 || "viewend" === e4 || !this.previousBeaconData || this.mux.utils.now() - this.lastEventTime >= 6e5)
|
53997
|
+
r2 = le({}, t3), n2 && (this.previousBeaconData = r2), n2 && "viewend" === e4 && (this.previousBeaconData = null);
|
53998
|
+
else {
|
53999
|
+
var i3 = 0 === e4.indexOf("request");
|
54000
|
+
Object.entries(t3).forEach(function(t4) {
|
54001
|
+
var n3 = j(t4, 2), o2 = n3[0], s2 = n3[1];
|
54002
|
+
a3.previousBeaconData && (s2 !== a3.previousBeaconData[o2] || ht.indexOf(o2) > -1 || a3.objectHasChanged(i3, o2, s2, a3.previousBeaconData[o2]) || a3.eventRequiresKey(e4, o2)) && (r2[o2] = s2, a3.previousBeaconData[o2] = s2);
|
54003
|
+
});
|
54004
|
+
}
|
54005
|
+
return r2;
|
54006
|
+
} }, { key: "objectHasChanged", value: function(e4, t3, a3, r2) {
|
54007
|
+
return !(!e4 || 0 !== t3.indexOf("request_")) && ("request_response_headers" === t3 || "object" != typeof a3 || "object" != typeof r2 || Object.keys(a3 || {}).length !== Object.keys(r2 || {}).length);
|
54008
|
+
} }, { key: "eventRequiresKey", value: function(e4, t3) {
|
54009
|
+
return !!("renditionchange" === e4 && 0 === t3.indexOf("video_source_") || mt.includes(t3) && vt.includes(e4));
|
54010
|
+
} }]), e3;
|
54011
|
+
}(), bt = function e3(t3) {
|
54012
|
+
X(this, e3);
|
54013
|
+
var a3 = 0, r2 = 0, n2 = 0, i3 = 0, o2 = 0, s2 = 0, u2 = 0;
|
54014
|
+
t3.on("requestcompleted", function(e4, s3) {
|
54015
|
+
var u3, d2, l2 = s3.request_start, c2 = s3.request_response_start, p2 = s3.request_response_end, f2 = s3.request_bytes_loaded;
|
54016
|
+
if (i3++, c2 ? (u3 = c2 - (null != l2 ? l2 : 0), d2 = (null != p2 ? p2 : 0) - c2) : d2 = (null != p2 ? p2 : 0) - (null != l2 ? l2 : 0), d2 > 0 && f2 && f2 > 0) {
|
54017
|
+
var _3 = f2 / d2 * 8e3;
|
54018
|
+
o2++, r2 += f2, n2 += d2, t3.data.view_min_request_throughput = Math.min(t3.data.view_min_request_throughput || 1 / 0, _3), t3.data.view_average_request_throughput = r2 / n2 * 8e3, t3.data.view_request_count = i3, u3 > 0 && (a3 += u3, t3.data.view_max_request_latency = Math.max(t3.data.view_max_request_latency || 0, u3), t3.data.view_average_request_latency = a3 / o2);
|
54019
|
+
}
|
54020
|
+
}), t3.on("requestfailed", function(e4, a4) {
|
54021
|
+
i3++, s2++, t3.data.view_request_count = i3, t3.data.view_request_failed_count = s2;
|
54022
|
+
}), t3.on("requestcanceled", function(e4, a4) {
|
54023
|
+
i3++, u2++, t3.data.view_request_count = i3, t3.data.view_request_canceled_count = u2;
|
54024
|
+
});
|
54025
|
+
}, wt = function e3(t3) {
|
54026
|
+
var a3 = this;
|
54027
|
+
X(this, e3), ee(this, "_lastEventTime", void 0), t3.on("before*", function(e4, r2) {
|
54028
|
+
var n2 = r2.viewer_time, i3 = K.now(), o2 = a3._lastEventTime;
|
54029
|
+
if (a3._lastEventTime = i3, o2 && i3 - o2 > 36e5) {
|
54030
|
+
var s2 = Object.keys(t3.data).reduce(function(e5, a4) {
|
54031
|
+
return 0 === a4.indexOf("video_") ? Object.assign(e5, ee({}, a4, t3.data[a4])) : e5;
|
54032
|
+
}, {});
|
54033
|
+
t3.mux.log.info("Received event after at least an hour inactivity, creating a new view"), t3.emit("viewinit", Object.assign({ viewer_time: n2 }, s2)), t3.playbackHeartbeat._playheadShouldBeProgressing && "play" !== e4.type && "adbreakstart" !== e4.type && (t3.emit("play", { viewer_time: n2 }), "playing" !== e4.type && t3.emit("playing", { viewer_time: n2 }));
|
54034
|
+
}
|
54035
|
+
});
|
54036
|
+
}, Tt = ["viewstart", "ended", "loadstart", "pause", "play", "playing", "ratechange", "waiting", "adplay", "adpause", "adended", "aderror", "adplaying", "adrequest", "adresponse", "adbreakstart", "adbreakend", "adfirstquartile", "admidpoint", "adthirdquartile", "rebufferstart", "rebufferend", "seeked", "error", "hb", "requestcompleted", "requestfailed", "requestcanceled", "renditionchange"], xt = function(e3) {
|
54037
|
+
!function(e4, t4) {
|
54038
|
+
if ("function" != typeof t4 && null !== t4)
|
54039
|
+
throw new TypeError("Super expression must either be null or a function");
|
54040
|
+
e4.prototype = Object.create(t4 && t4.prototype, { constructor: { value: e4, writable: true, configurable: true } }), t4 && te(e4, t4);
|
54041
|
+
}(a3, e3);
|
54042
|
+
var t3 = ne(a3);
|
54043
|
+
function a3(e4, r2, n2) {
|
54044
|
+
var i3;
|
54045
|
+
X(this, a3), ee(Y(i3 = t3.call(this)), "DOM_CONTENT_LOADED_EVENT_END", void 0), ee(Y(i3), "NAVIGATION_START", void 0), ee(Y(i3), "_destroyed", void 0), ee(Y(i3), "_heartBeatTimeout", void 0), ee(Y(i3), "adTracker", void 0), ee(Y(i3), "dashjs", void 0), ee(Y(i3), "data", void 0), ee(Y(i3), "disablePlayheadRebufferTracking", void 0), ee(Y(i3), "disableRebufferTracking", void 0), ee(Y(i3), "errorTracker", void 0), ee(Y(i3), "errorTranslator", void 0), ee(Y(i3), "getAdData", void 0), ee(Y(i3), "getPlayheadTime", void 0), ee(Y(i3), "getStateData", void 0), ee(Y(i3), "hlsjs", void 0), ee(Y(i3), "id", void 0), ee(Y(i3), "longResumeTracker", void 0), ee(Y(i3), "minimumRebufferDuration", void 0), ee(Y(i3), "mux", void 0), ee(Y(i3), "oldEmit", void 0), ee(Y(i3), "playbackEventDispatcher", void 0), ee(Y(i3), "playbackHeartbeat", void 0), ee(Y(i3), "playbackHeartbeatTime", void 0), ee(Y(i3), "playheadTime", void 0), ee(Y(i3), "seekingTracker", void 0), ee(Y(i3), "sustainedRebufferThreshold", void 0), ee(Y(i3), "watchTimeTracker", void 0), ee(Y(i3), "currentFragmentPDT", void 0), ee(Y(i3), "currentFragmentStart", void 0), i3.DOM_CONTENT_LOADED_EVENT_END = ue.domContentLoadedEventEnd(), i3.NAVIGATION_START = ue.navigationStart();
|
54046
|
+
i3.mux = e4, i3.id = r2, null != n2 && n2.beaconDomain && i3.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."), (n2 = Object.assign({ debug: false, minimumRebufferDuration: 250, sustainedRebufferThreshold: 1e3, playbackHeartbeatTime: 25, beaconDomain: "litix.io", sampleRate: 1, disableCookies: false, respectDoNotTrack: false, disableRebufferTracking: false, disablePlayheadRebufferTracking: false, errorTranslator: function(e5) {
|
54047
|
+
return e5;
|
54048
|
+
} }, n2)).data = n2.data || {}, n2.data.property_key && (n2.data.env_key = n2.data.property_key, delete n2.data.property_key), G.setLevel(n2.debug ? "debug" : "warn"), i3.getPlayheadTime = n2.getPlayheadTime, i3.getStateData = n2.getStateData || function() {
|
54049
|
+
return {};
|
54050
|
+
}, i3.getAdData = n2.getAdData || function() {
|
54051
|
+
}, i3.minimumRebufferDuration = n2.minimumRebufferDuration, i3.sustainedRebufferThreshold = n2.sustainedRebufferThreshold, i3.playbackHeartbeatTime = n2.playbackHeartbeatTime, i3.disableRebufferTracking = n2.disableRebufferTracking, i3.disableRebufferTracking && i3.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."), i3.disablePlayheadRebufferTracking = n2.disablePlayheadRebufferTracking, i3.errorTranslator = n2.errorTranslator, i3.playbackEventDispatcher = new gt(e4, n2.data.env_key, n2), i3.data = { player_instance_id: M(), mux_sample_rate: n2.sampleRate, beacon_domain: n2.beaconCollectionDomain || n2.beaconDomain }, i3.data.view_sequence_number = 1, i3.data.player_sequence_number = 1, i3.oldEmit = i3.emit, i3.emit = function(e5, t4) {
|
54052
|
+
t4 = Object.assign({ viewer_time: this.mux.utils.now() }, t4), this.oldEmit(e5, t4);
|
54053
|
+
};
|
54054
|
+
var o2 = function() {
|
54055
|
+
void 0 === this.data.view_start && (this.data.view_start = this.mux.utils.now(), this.emit("viewstart"));
|
54056
|
+
}.bind(Y(i3));
|
54057
|
+
i3.on("viewinit", function(e5, t4) {
|
54058
|
+
this._resetVideoData(), this._resetViewData(), this._resetErrorData(), this._updateStateData(), Object.assign(this.data, t4), this._initializeViewData(), this.one("play", o2), this.one("adbreakstart", o2);
|
54059
|
+
});
|
54060
|
+
var s2 = function(e5) {
|
54061
|
+
this.emit("viewend"), this.send("viewend"), this.emit("viewinit", e5);
|
54062
|
+
}.bind(Y(i3));
|
54063
|
+
if (i3.on("videochange", function(e5, t4) {
|
54064
|
+
s2(t4);
|
54065
|
+
}), i3.on("programchange", function(e5, t4) {
|
54066
|
+
this.data.player_is_paused && this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."), s2(Object.assign(t4, { view_program_changed: true })), o2(), this.emit("play"), this.emit("playing");
|
54067
|
+
}), i3.on("fragmentchange", function(e5, t4) {
|
54068
|
+
this.currentFragmentPDT = t4.currentFragmentPDT, this.currentFragmentStart = t4.currentFragmentStart;
|
54069
|
+
}), i3.on("destroy", i3.destroy), "undefined" != typeof window && "function" == typeof window.addEventListener && "function" == typeof window.removeEventListener) {
|
54070
|
+
var u2 = function() {
|
54071
|
+
var e5 = void 0 !== i3.data.view_start;
|
54072
|
+
i3.mux.WINDOW_HIDDEN = "hidden" === document.visibilityState, e5 && i3.mux.WINDOW_HIDDEN && (i3.data.player_is_paused || i3.emit("hb"));
|
54073
|
+
};
|
54074
|
+
window.addEventListener("visibilitychange", u2, false);
|
54075
|
+
var d2 = function(e5) {
|
54076
|
+
e5.persisted || i3.destroy();
|
54077
|
+
};
|
54078
|
+
window.addEventListener("pagehide", d2, false), i3.on("destroy", function() {
|
54079
|
+
window.removeEventListener("visibilitychange", u2), window.removeEventListener("pagehide", d2);
|
54080
|
+
});
|
54081
|
+
}
|
54082
|
+
i3.on("playerready", function(e5, t4) {
|
54083
|
+
Object.assign(this.data, t4);
|
54084
|
+
}), Tt.forEach(function(e5) {
|
54085
|
+
i3.on(e5, function(t4, a4) {
|
54086
|
+
0 !== e5.indexOf("ad") && this._updateStateData(), Object.assign(this.data, a4), this._sanitizeData();
|
54087
|
+
}), i3.on("after" + e5, function() {
|
54088
|
+
("error" !== e5 || this.errorTracker.viewErrored) && this.send(e5);
|
54089
|
+
});
|
54090
|
+
}), i3.on("viewend", function(e5, t4) {
|
54091
|
+
Object.assign(i3.data, t4);
|
54092
|
+
});
|
54093
|
+
return i3.one("playerready", function(e5) {
|
54094
|
+
var t4 = this.mux.utils.now();
|
54095
|
+
this.data.player_init_time && (this.data.player_startup_time = t4 - this.data.player_init_time), !this.mux.PLAYER_TRACKED && this.NAVIGATION_START && (this.mux.PLAYER_TRACKED = true, (this.data.player_init_time || this.DOM_CONTENT_LOADED_EVENT_END) && (this.data.page_load_time = Math.min(this.data.player_init_time || 1 / 0, this.DOM_CONTENT_LOADED_EVENT_END || 1 / 0) - this.NAVIGATION_START)), this.send("playerready"), delete this.data.player_startup_time, delete this.data.page_load_time;
|
54096
|
+
}), i3.longResumeTracker = new wt(Y(i3)), i3.errorTracker = new Se(Y(i3)), new Ve(Y(i3)), i3.seekingTracker = new He(Y(i3)), i3.playheadTime = new Re(Y(i3)), i3.playbackHeartbeat = new qe(Y(i3)), new je(Y(i3)), i3.watchTimeTracker = new Ae(Y(i3)), new Oe(Y(i3)), i3.adTracker = new Be(Y(i3)), new Le(Y(i3)), new Ne(Y(i3)), new Ce(Y(i3)), new We(Y(i3)), new bt(Y(i3)), n2.hlsjs && i3.addHLSJS(n2), n2.dashjs && i3.addDashJS(n2), i3.emit("viewinit", n2.data), i3;
|
54097
|
+
}
|
54098
|
+
return Z(a3, [{ key: "destroy", value: function() {
|
54099
|
+
this._destroyed || (this._destroyed = true, void 0 !== this.data.view_start && (this.emit("viewend"), this.send("viewend")), this.playbackEventDispatcher.destroy(), this.removeHLSJS(), this.removeDashJS(), window.clearTimeout(this._heartBeatTimeout));
|
54100
|
+
} }, { key: "send", value: function(e4) {
|
54101
|
+
if (this.data.view_id) {
|
54102
|
+
var t4 = Object.assign({}, this.data);
|
54103
|
+
if (void 0 === t4.video_source_is_live && (t4.player_source_duration === 1 / 0 || t4.video_source_duration === 1 / 0 ? t4.video_source_is_live = true : (t4.player_source_duration > 0 || t4.video_source_duration > 0) && (t4.video_source_is_live = false)), t4.video_source_is_live || ["player_program_time", "player_manifest_newest_program_time", "player_live_edge_program_time", "player_program_time", "video_holdback", "video_part_holdback", "video_target_duration", "video_part_target_duration"].forEach(function(e5) {
|
54104
|
+
t4[e5] = void 0;
|
54105
|
+
}), t4.video_source_url = t4.video_source_url || t4.player_source_url, t4.video_source_url) {
|
54106
|
+
var a4 = j(oe(t4.video_source_url), 2), r2 = a4[0], n2 = a4[1];
|
54107
|
+
t4.video_source_domain = n2, t4.video_source_hostname = r2;
|
54108
|
+
}
|
54109
|
+
delete t4.ad_request_id, this.playbackEventDispatcher.send(e4, t4), this.data.view_sequence_number++, this.data.player_sequence_number++, this._restartHeartBeat(), "viewend" === e4 && delete this.data.view_id;
|
54110
|
+
}
|
54111
|
+
} }, { key: "_updateStateData", value: function() {
|
54112
|
+
Object.assign(this.data, this.getStateData()), this.playheadTime._updatePlayheadTime(), this._sanitizeData();
|
54113
|
+
} }, { key: "_sanitizeData", value: function() {
|
54114
|
+
var e4 = this;
|
54115
|
+
["player_width", "player_height", "video_source_width", "video_source_height", "player_playhead_time", "video_source_bitrate"].forEach(function(t4) {
|
54116
|
+
var a4 = parseInt(e4.data[t4], 10);
|
54117
|
+
e4.data[t4] = isNaN(a4) ? void 0 : a4;
|
54118
|
+
});
|
54119
|
+
["player_source_url", "video_source_url"].forEach(function(t4) {
|
54120
|
+
if (e4.data[t4]) {
|
54121
|
+
var a4 = e4.data[t4].toLowerCase();
|
54122
|
+
(0 === a4.indexOf("data:") || 0 === a4.indexOf("blob:")) && (e4.data[t4] = "MSE style URL");
|
54123
|
+
}
|
54124
|
+
});
|
54125
|
+
} }, { key: "_resetVideoData", value: function() {
|
54126
|
+
var e4 = this;
|
54127
|
+
Object.keys(this.data).forEach(function(t4) {
|
54128
|
+
0 === t4.indexOf("video_") && delete e4.data[t4];
|
54129
|
+
});
|
54130
|
+
} }, { key: "_resetViewData", value: function() {
|
54131
|
+
var e4 = this;
|
54132
|
+
Object.keys(this.data).forEach(function(t4) {
|
54133
|
+
0 === t4.indexOf("view_") && delete e4.data[t4];
|
54134
|
+
}), this.data.view_sequence_number = 1;
|
54135
|
+
} }, { key: "_resetErrorData", value: function() {
|
54136
|
+
delete this.data.player_error_code, delete this.data.player_error_message, delete this.data.player_error_context, delete this.data.player_error_severity, delete this.data.player_error_business_exception;
|
54137
|
+
} }, { key: "_initializeViewData", value: function() {
|
54138
|
+
var e4 = this, t4 = this.data.view_id = M(), a4 = function() {
|
54139
|
+
t4 === e4.data.view_id && de(e4.data, "player_view_count", 1);
|
54140
|
+
};
|
54141
|
+
this.data.player_is_paused ? this.one("play", a4) : a4();
|
54142
|
+
} }, { key: "_restartHeartBeat", value: function() {
|
54143
|
+
var e4 = this;
|
54144
|
+
window.clearTimeout(this._heartBeatTimeout), this._heartBeatTimeout = window.setTimeout(function() {
|
54145
|
+
e4.data.player_is_paused || e4.emit("hb");
|
54146
|
+
}, 1e4);
|
54147
|
+
} }, { key: "addHLSJS", value: function(e4) {
|
54148
|
+
e4.hlsjs ? this.hlsjs ? this.mux.log.warn("An instance of HLS.js is already being monitored for this player.") : (this.hlsjs = e4.hlsjs, function(e5, t4, a4) {
|
54149
|
+
var r2 = arguments.length > 4 ? arguments[4] : void 0, n2 = e5.log, i3 = e5.utils.secondsToMs, o2 = function(e6) {
|
54150
|
+
var t5, a5 = parseInt(r2.version);
|
54151
|
+
return 1 === a5 && null !== e6.programDateTime && (t5 = e6.programDateTime), 0 === a5 && null !== e6.pdt && (t5 = e6.pdt), t5;
|
54152
|
+
};
|
54153
|
+
if (ue.exists()) {
|
54154
|
+
var s2 = function(a5, r3) {
|
54155
|
+
return e5.emit(t4, a5, r3);
|
54156
|
+
}, u2 = function(e6, t5) {
|
54157
|
+
var a5 = t5.levels, r3 = t5.audioTracks, n3 = t5.url, i4 = t5.stats, o3 = t5.networkDetails, u3 = t5.sessionData, d3 = {}, l3 = {};
|
54158
|
+
a5.forEach(function(e7, t6) {
|
54159
|
+
d3[t6] = { width: e7.width, height: e7.height, bitrate: e7.bitrate, attrs: e7.attrs };
|
54160
|
+
}), r3.forEach(function(e7, t6) {
|
54161
|
+
l3[t6] = { name: e7.name, language: e7.lang, bitrate: e7.bitrate };
|
54162
|
+
});
|
54163
|
+
var c3 = me(i4), p3 = c3.bytesLoaded, f3 = c3.requestStart, _4 = c3.responseStart, h3 = c3.responseEnd;
|
54164
|
+
s2("requestcompleted", ce(le({}, ve(u3)), { request_event_type: e6, request_bytes_loaded: p3, request_start: f3, request_response_start: _4, request_response_end: h3, request_type: "manifest", request_hostname: ie(n3), request_response_headers: ye(o3), request_rendition_lists: { media: d3, audio: l3, video: {} } }));
|
54165
|
+
};
|
54166
|
+
a4.on(r2.Events.MANIFEST_LOADED, u2);
|
54167
|
+
var d2 = function(e6, t5) {
|
54168
|
+
var a5 = t5.details, r3 = t5.level, n3 = t5.networkDetails, u3 = t5.stats, d3 = me(u3), l3 = d3.bytesLoaded, c3 = d3.requestStart, p3 = d3.responseStart, f3 = d3.responseEnd, _4 = a5.fragments[a5.fragments.length - 1], h3 = o2(_4) + i3(_4.duration);
|
54169
|
+
s2("requestcompleted", { request_event_type: e6, request_bytes_loaded: l3, request_start: c3, request_response_start: p3, request_response_end: f3, request_current_level: r3, request_type: "manifest", request_hostname: ie(a5.url), request_response_headers: ye(n3), video_holdback: a5.holdBack && i3(a5.holdBack), video_part_holdback: a5.partHoldBack && i3(a5.partHoldBack), video_part_target_duration: a5.partTarget && i3(a5.partTarget), video_target_duration: a5.targetduration && i3(a5.targetduration), video_source_is_live: a5.live, player_manifest_newest_program_time: isNaN(h3) ? void 0 : h3 });
|
54170
|
+
};
|
54171
|
+
a4.on(r2.Events.LEVEL_LOADED, d2);
|
54172
|
+
var l2 = function(e6, t5) {
|
54173
|
+
var a5 = t5.details, r3 = t5.networkDetails, n3 = t5.stats, i4 = me(n3), o3 = i4.bytesLoaded, u3 = i4.requestStart, d3 = i4.responseStart, l3 = i4.responseEnd;
|
54174
|
+
s2("requestcompleted", { request_event_type: e6, request_bytes_loaded: o3, request_start: u3, request_response_start: d3, request_response_end: l3, request_type: "manifest", request_hostname: ie(a5.url), request_response_headers: ye(r3) });
|
54175
|
+
};
|
54176
|
+
a4.on(r2.Events.AUDIO_TRACK_LOADED, l2);
|
54177
|
+
var c2 = function(e6, t5) {
|
54178
|
+
var r3 = t5.stats, n3 = t5.networkDetails, i4 = t5.frag;
|
54179
|
+
r3 = r3 || i4.stats;
|
54180
|
+
var o3 = me(r3), u3 = o3.bytesLoaded, d3 = o3.requestStart, l3 = o3.responseStart, c3 = o3.responseEnd, p3 = n3 ? ye(n3) : void 0, f3 = { request_event_type: e6, request_bytes_loaded: u3, request_start: d3, request_response_start: l3, request_response_end: c3, request_hostname: n3 ? ie(n3.responseURL) : void 0, request_id: p3 ? he(p3) : void 0, request_response_headers: p3, request_media_duration: i4.duration, request_url: null == n3 ? void 0 : n3.responseURL };
|
54181
|
+
"main" === i4.type ? (f3.request_type = "media", f3.request_current_level = i4.level, f3.request_video_width = (a4.levels[i4.level] || {}).width, f3.request_video_height = (a4.levels[i4.level] || {}).height, f3.request_labeled_bitrate = (a4.levels[i4.level] || {}).bitrate) : f3.request_type = i4.type, s2("requestcompleted", f3);
|
54182
|
+
};
|
54183
|
+
a4.on(r2.Events.FRAG_LOADED, c2);
|
54184
|
+
var p2 = function(e6, t5) {
|
54185
|
+
var a5 = t5.frag, r3 = a5.start, n3 = { currentFragmentPDT: o2(a5), currentFragmentStart: i3(r3) };
|
54186
|
+
s2("fragmentchange", n3);
|
54187
|
+
};
|
54188
|
+
a4.on(r2.Events.FRAG_CHANGED, p2);
|
54189
|
+
var f2 = function(e6, t5) {
|
54190
|
+
var a5 = t5.type, n3 = t5.details, i4 = t5.response, o3 = t5.fatal, u3 = t5.frag, d3 = t5.networkDetails, l3 = (null == u3 ? void 0 : u3.url) || t5.url || "", c3 = d3 ? ye(d3) : void 0;
|
54191
|
+
if ((n3 === r2.ErrorDetails.MANIFEST_LOAD_ERROR || n3 === r2.ErrorDetails.MANIFEST_LOAD_TIMEOUT || n3 === r2.ErrorDetails.FRAG_LOAD_ERROR || n3 === r2.ErrorDetails.FRAG_LOAD_TIMEOUT || n3 === r2.ErrorDetails.LEVEL_LOAD_ERROR || n3 === r2.ErrorDetails.LEVEL_LOAD_TIMEOUT || n3 === r2.ErrorDetails.AUDIO_TRACK_LOAD_ERROR || n3 === r2.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT || n3 === r2.ErrorDetails.SUBTITLE_LOAD_ERROR || n3 === r2.ErrorDetails.SUBTITLE_LOAD_TIMEOUT || n3 === r2.ErrorDetails.KEY_LOAD_ERROR || n3 === r2.ErrorDetails.KEY_LOAD_TIMEOUT) && s2("requestfailed", { request_error: n3, request_url: l3, request_hostname: ie(l3), request_id: c3 ? he(c3) : void 0, request_type: n3 === r2.ErrorDetails.FRAG_LOAD_ERROR || n3 === r2.ErrorDetails.FRAG_LOAD_TIMEOUT ? "media" : n3 === r2.ErrorDetails.AUDIO_TRACK_LOAD_ERROR || n3 === r2.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT ? "audio" : n3 === r2.ErrorDetails.SUBTITLE_LOAD_ERROR || n3 === r2.ErrorDetails.SUBTITLE_LOAD_TIMEOUT ? "subtitle" : n3 === r2.ErrorDetails.KEY_LOAD_ERROR || n3 === r2.ErrorDetails.KEY_LOAD_TIMEOUT ? "encryption" : "manifest", request_error_code: null == i4 ? void 0 : i4.code, request_error_text: null == i4 ? void 0 : i4.text }), o3) {
|
54192
|
+
var p3, f3 = "".concat(l3 ? "url: ".concat(l3, "\n") : "") + "".concat(i4 && (i4.code || i4.text) ? "response: ".concat(i4.code, ", ").concat(i4.text, "\n") : "") + "".concat(t5.reason ? "failure reason: ".concat(t5.reason, "\n") : "") + "".concat(t5.level ? "level: ".concat(t5.level, "\n") : "") + "".concat(t5.parent ? "parent stream controller: ".concat(t5.parent, "\n") : "") + "".concat(t5.buffer ? "buffer length: ".concat(t5.buffer, "\n") : "") + "".concat(t5.error ? "error: ".concat(t5.error, "\n") : "") + "".concat(t5.event ? "event: ".concat(t5.event, "\n") : "") + "".concat(t5.err ? "error message: ".concat(null === (p3 = t5.err) || void 0 === p3 ? void 0 : p3.message, "\n") : "");
|
54193
|
+
s2("error", { player_error_code: a5, player_error_message: n3, player_error_context: f3 });
|
54194
|
+
}
|
54195
|
+
};
|
54196
|
+
a4.on(r2.Events.ERROR, f2);
|
54197
|
+
var _3 = function(e6, t5) {
|
54198
|
+
var a5 = t5.frag, r3 = a5 && a5._url || "";
|
54199
|
+
s2("requestcanceled", { request_event_type: e6, request_url: r3, request_type: "media", request_hostname: ie(r3) });
|
54200
|
+
};
|
54201
|
+
a4.on(r2.Events.FRAG_LOAD_EMERGENCY_ABORTED, _3);
|
54202
|
+
var h2 = function(e6, t5) {
|
54203
|
+
var r3 = t5.level, i4 = a4.levels[r3];
|
54204
|
+
if (i4 && i4.attrs && i4.attrs.BANDWIDTH) {
|
54205
|
+
var o3, u3 = i4.attrs.BANDWIDTH, d3 = parseFloat(i4.attrs["FRAME-RATE"]);
|
54206
|
+
isNaN(d3) || (o3 = d3), u3 ? s2("renditionchange", { video_source_fps: o3, video_source_bitrate: u3, video_source_width: i4.width, video_source_height: i4.height, video_source_rendition_name: i4.name, video_source_codec: null == i4 ? void 0 : i4.videoCodec }) : n2.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js");
|
54207
|
+
}
|
54208
|
+
};
|
54209
|
+
a4.on(r2.Events.LEVEL_SWITCHED, h2), a4._stopMuxMonitor = function() {
|
54210
|
+
a4.off(r2.Events.MANIFEST_LOADED, u2), a4.off(r2.Events.LEVEL_LOADED, d2), a4.off(r2.Events.AUDIO_TRACK_LOADED, l2), a4.off(r2.Events.FRAG_LOADED, c2), a4.off(r2.Events.FRAG_CHANGED, p2), a4.off(r2.Events.ERROR, f2), a4.off(r2.Events.FRAG_LOAD_EMERGENCY_ABORTED, _3), a4.off(r2.Events.LEVEL_SWITCHED, h2), a4.off(r2.Events.DESTROYING, a4._stopMuxMonitor), delete a4._stopMuxMonitor;
|
54211
|
+
}, a4.on(r2.Events.DESTROYING, a4._stopMuxMonitor);
|
54212
|
+
} else
|
54213
|
+
n2.warn("performance timing not supported. Not tracking HLS.js.");
|
54214
|
+
}(this.mux, this.id, e4.hlsjs, {}, e4.Hls || window.Hls)) : this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.");
|
54215
|
+
} }, { key: "removeHLSJS", value: function() {
|
54216
|
+
this.hlsjs && (function(e4) {
|
54217
|
+
e4 && "function" == typeof e4._stopMuxMonitor && e4._stopMuxMonitor();
|
54218
|
+
}(this.hlsjs), this.hlsjs = void 0);
|
54219
|
+
} }, { key: "addDashJS", value: function(e4) {
|
54220
|
+
e4.dashjs ? this.dashjs ? this.mux.log.warn("An instance of Dash.js is already being monitored for this player.") : (this.dashjs = e4.dashjs, function(e5, t4, a4) {
|
54221
|
+
var r2 = e5.log;
|
54222
|
+
if (a4 && a4.on) {
|
54223
|
+
var n2 = Te(a4), i3 = function(a5, r3) {
|
54224
|
+
return e5.emit(t4, a5, r3);
|
54225
|
+
}, o2 = function(e6) {
|
54226
|
+
var t5 = e6.type, a5 = (e6.data || {}).url;
|
54227
|
+
i3("requestcompleted", { request_event_type: t5, request_start: 0, request_response_start: 0, request_response_end: 0, request_bytes_loaded: -1, request_type: "manifest", request_hostname: ie(a5), request_url: a5 });
|
54228
|
+
};
|
54229
|
+
a4.on("manifestLoaded", o2);
|
54230
|
+
var s2 = {}, u2 = function(e6) {
|
54231
|
+
if ("function" != typeof e6.getRequests)
|
54232
|
+
return null;
|
54233
|
+
var t5 = e6.getRequests({ state: "executed" });
|
54234
|
+
return 0 === t5.length ? null : t5[t5.length - 1];
|
54235
|
+
}, d2 = function(e6) {
|
54236
|
+
var t5 = e6.type, a5 = e6.fragmentModel, r3 = e6.chunk, n3 = u2(a5);
|
54237
|
+
l2({ type: t5, request: n3, chunk: r3 });
|
54238
|
+
}, l2 = function(e6) {
|
54239
|
+
var t5 = e6.type, r3 = e6.chunk, n3 = e6.request, o3 = (r3 || {}).mediaInfo || {}, u3 = o3.type, d3 = o3.bitrateList, l3 = {};
|
54240
|
+
(d3 = d3 || []).forEach(function(e7, t6) {
|
54241
|
+
l3[t6] = {}, l3[t6].width = e7.width, l3[t6].height = e7.height, l3[t6].bitrate = e7.bandwidth, l3[t6].attrs = {};
|
54242
|
+
}), "video" === u3 ? s2.video = l3 : "audio" === u3 ? s2.audio = l3 : s2.media = l3;
|
54243
|
+
var c3 = ge(n3, a4), p3 = c3.requestStart, f3 = c3.requestResponseStart, _4 = c3.requestResponseEnd, h3 = c3.requestResponseHeaders, v3 = c3.requestMediaDuration, m3 = c3.requestHostname, y2 = c3.requestUrl, g2 = c3.requestId;
|
54244
|
+
i3("requestcompleted", { request_event_type: t5, request_start: p3, request_response_start: f3, request_response_end: _4, request_bytes_loaded: -1, request_type: u3 + "_init", request_response_headers: h3, request_hostname: m3, request_id: g2, request_url: y2, request_media_duration: v3, request_rendition_lists: s2 });
|
54245
|
+
};
|
54246
|
+
n2 >= 4 ? a4.on("initFragmentLoaded", l2) : a4.on("initFragmentLoaded", d2);
|
54247
|
+
var c2 = function(e6) {
|
54248
|
+
var t5 = e6.type, a5 = e6.fragmentModel, r3 = e6.chunk, n3 = u2(a5);
|
54249
|
+
p2({ type: t5, request: n3, chunk: r3 });
|
54250
|
+
}, p2 = function(e6) {
|
54251
|
+
var t5 = e6.type, r3 = e6.chunk, n3 = e6.request, o3 = r3 || {}, s3 = o3.mediaInfo, u3 = o3.start, d3 = (s3 || {}).type, l3 = ge(n3, a4), c3 = l3.requestStart, p3 = l3.requestResponseStart, f3 = l3.requestResponseEnd, _4 = l3.requestBytesLoaded, h3 = l3.requestResponseHeaders, v3 = l3.requestMediaDuration, m3 = l3.requestHostname, y2 = l3.requestUrl, g2 = l3.requestId, b2 = be(d3, a4), w2 = b2.currentLevel, T2 = b2.renditionWidth, x2 = b2.renditionHeight, k2 = b2.renditionBitrate;
|
54252
|
+
i3("requestcompleted", { request_event_type: t5, request_start: c3, request_response_start: p3, request_response_end: f3, request_bytes_loaded: _4, request_type: d3, request_response_headers: h3, request_hostname: m3, request_id: g2, request_url: y2, request_media_start_time: u3, request_media_duration: v3, request_current_level: w2, request_labeled_bitrate: k2, request_video_width: T2, request_video_height: x2 });
|
54253
|
+
};
|
54254
|
+
n2 >= 4 ? a4.on("mediaFragmentLoaded", p2) : a4.on("mediaFragmentLoaded", c2);
|
54255
|
+
var f2 = { video: void 0, audio: void 0, totalBitrate: void 0 }, _3 = function() {
|
54256
|
+
if (f2.video && "number" == typeof f2.video.bitrate) {
|
54257
|
+
if (!f2.video.width || !f2.video.height)
|
54258
|
+
return void r2.warn("have bitrate info for video but missing width/height");
|
54259
|
+
var e6 = f2.video.bitrate;
|
54260
|
+
if (f2.audio && "number" == typeof f2.audio.bitrate && (e6 += f2.audio.bitrate), e6 !== f2.totalBitrate)
|
54261
|
+
return f2.totalBitrate = e6, { video_source_bitrate: e6, video_source_height: f2.video.height, video_source_width: f2.video.width, video_source_codec: we(f2.video.codec) };
|
54262
|
+
}
|
54263
|
+
}, h2 = function(e6, t5, n3) {
|
54264
|
+
if ("number" == typeof e6.newQuality) {
|
54265
|
+
var o3 = e6.mediaType;
|
54266
|
+
if ("audio" === o3 || "video" === o3) {
|
54267
|
+
var s3 = a4.getBitrateInfoListFor(o3).find(function(t6) {
|
54268
|
+
return t6.qualityIndex === e6.newQuality;
|
54269
|
+
});
|
54270
|
+
if (!s3 || "number" != typeof s3.bitrate)
|
54271
|
+
return void r2.warn("missing bitrate info for ".concat(o3));
|
54272
|
+
f2[o3] = ce(le({}, s3), { codec: a4.getCurrentTrackFor(o3).codec });
|
54273
|
+
var u3 = _3();
|
54274
|
+
u3 && i3("renditionchange", u3);
|
54275
|
+
}
|
54276
|
+
} else
|
54277
|
+
r2.warn("missing evt.newQuality in qualityChangeRendered event", e6);
|
54278
|
+
};
|
54279
|
+
a4.on("qualityChangeRendered", h2);
|
54280
|
+
var v2 = function(e6) {
|
54281
|
+
var t5 = e6.request, a5 = e6.mediaType;
|
54282
|
+
i3("requestcanceled", { request_event_type: (t5 = t5 || {}).type + "_" + t5.action, request_url: t5.url, request_type: a5, request_hostname: ie(t5.url) });
|
54283
|
+
};
|
54284
|
+
a4.on("fragmentLoadingAbandoned", v2);
|
54285
|
+
var m2 = function(e6) {
|
54286
|
+
var t5, a5, r3 = e6.error, n3 = (null == r3 || null === (t5 = r3.data) || void 0 === t5 ? void 0 : t5.request) || {}, o3 = (null == r3 || null === (a5 = r3.data) || void 0 === a5 ? void 0 : a5.response) || {};
|
54287
|
+
27 === (null == r3 ? void 0 : r3.code) && i3("requestfailed", { request_error: n3.type + "_" + n3.action, request_url: n3.url, request_hostname: ie(n3.url), request_type: n3.mediaType, request_error_code: o3.status, request_error_text: o3.statusText });
|
54288
|
+
var s3 = "".concat(null != n3 && n3.url ? "url: ".concat(n3.url, "\n") : "") + "".concat(null != o3 && o3.status || null != o3 && o3.statusText ? "response: ".concat(null == o3 ? void 0 : o3.status, ", ").concat(null == o3 ? void 0 : o3.statusText, "\n") : "");
|
54289
|
+
i3("error", { player_error_code: null == r3 ? void 0 : r3.code, player_error_message: null == r3 ? void 0 : r3.message, player_error_context: s3 });
|
54290
|
+
};
|
54291
|
+
a4.on("error", m2), a4._stopMuxMonitor = function() {
|
54292
|
+
a4.off("manifestLoaded", o2), a4.off("initFragmentLoaded", l2), a4.off("mediaFragmentLoaded", p2), a4.off("qualityChangeRendered", h2), a4.off("error", m2), a4.off("fragmentLoadingAbandoned", v2), delete a4._stopMuxMonitor;
|
54293
|
+
};
|
54294
|
+
} else
|
54295
|
+
r2.warn("Invalid dash.js player reference. Monitoring blocked.");
|
54296
|
+
}(this.mux, this.id, e4.dashjs)) : this.mux.log.warn("You must pass a valid dashjs instance in order to track it.");
|
54297
|
+
} }, { key: "removeDashJS", value: function() {
|
54298
|
+
this.dashjs && (function(e4) {
|
54299
|
+
e4 && "function" == typeof e4._stopMuxMonitor && e4._stopMuxMonitor();
|
54300
|
+
}(this.dashjs), this.dashjs = void 0);
|
54301
|
+
} }]), a3;
|
54302
|
+
}(Ee), kt = xt;
|
54303
|
+
m();
|
54304
|
+
var Et = _2(L());
|
54305
|
+
var Dt = ["loadstart", "pause", "play", "playing", "seeking", "seeked", "timeupdate", "ratechange", "stalled", "waiting", "error", "ended"], qt = { 1: "MEDIA_ERR_ABORTED", 2: "MEDIA_ERR_NETWORK", 3: "MEDIA_ERR_DECODE", 4: "MEDIA_ERR_SRC_NOT_SUPPORTED" };
|
54306
|
+
var St, At = _2(h());
|
54307
|
+
At.default && At.default.WeakMap && (St = /* @__PURE__ */ new WeakMap());
|
54308
|
+
var Ot = "#EXT-X-TARGETDURATION", Rt = "#EXT-X-PART-INF", Pt = "#EXT-X-SERVER-CONTROL", Nt = "#EXTINF", It = "#EXT-X-PROGRAM-DATE-TIME", Lt = "#EXT-X-VERSION", Ct = "#EXT-X-SESSION-DATA", jt = function(e3) {
|
54309
|
+
return this.buffer = "", this.manifest = { segments: [], serverControl: {}, sessionData: {} }, this.currentUri = {}, this.process(e3), this.manifest;
|
54310
|
+
};
|
54311
|
+
jt.prototype.process = function(e3) {
|
54312
|
+
var t3;
|
54313
|
+
for (this.buffer += e3, t3 = this.buffer.indexOf("\n"); t3 > -1; t3 = this.buffer.indexOf("\n"))
|
54314
|
+
this.processLine(this.buffer.substring(0, t3)), this.buffer = this.buffer.substring(t3 + 1);
|
54315
|
+
}, jt.prototype.processLine = function(e3) {
|
54316
|
+
var t3 = e3.indexOf(":"), a3 = Vt(e3, t3), r2 = a3[0], n2 = 2 === a3.length ? Ut(a3[1]) : void 0;
|
54317
|
+
if ("#" !== r2[0])
|
54318
|
+
this.currentUri.uri = r2, this.manifest.segments.push(this.currentUri), this.manifest.targetDuration && !("duration" in this.currentUri) && (this.currentUri.duration = this.manifest.targetDuration), this.currentUri = {};
|
54319
|
+
else
|
54320
|
+
switch (r2) {
|
54321
|
+
case Ot:
|
54322
|
+
if (!isFinite(n2) || n2 < 0)
|
54323
|
+
return;
|
54324
|
+
this.manifest.targetDuration = n2, this.setHoldBack();
|
54325
|
+
break;
|
54326
|
+
case Rt:
|
54327
|
+
Ht(this.manifest, a3), this.manifest.partInf.partTarget && (this.manifest.partTargetDuration = this.manifest.partInf.partTarget), this.setHoldBack();
|
54328
|
+
break;
|
54329
|
+
case Pt:
|
54330
|
+
Ht(this.manifest, a3), this.setHoldBack();
|
54331
|
+
break;
|
54332
|
+
case Nt:
|
54333
|
+
0 === n2 ? this.currentUri.duration = 0.01 : n2 > 0 && (this.currentUri.duration = n2);
|
54334
|
+
break;
|
54335
|
+
case It:
|
54336
|
+
var i3 = n2, o2 = new Date(i3);
|
54337
|
+
this.manifest.dateTimeString || (this.manifest.dateTimeString = i3, this.manifest.dateTimeObject = o2), this.currentUri.dateTimeString = i3, this.currentUri.dateTimeObject = o2;
|
54338
|
+
break;
|
54339
|
+
case Lt:
|
54340
|
+
Ht(this.manifest, a3);
|
54341
|
+
break;
|
54342
|
+
case Ct:
|
54343
|
+
var s2 = Gt(a3[1]), u2 = ve(s2);
|
54344
|
+
Object.assign(this.manifest.sessionData, u2);
|
54345
|
+
}
|
54346
|
+
}, jt.prototype.setHoldBack = function() {
|
54347
|
+
var e3 = this.manifest, t3 = e3.serverControl, a3 = e3.targetDuration, r2 = e3.partTargetDuration;
|
54348
|
+
if (t3) {
|
54349
|
+
var n2 = "holdBack", i3 = "partHoldBack", o2 = a3 && 3 * a3, s2 = r2 && 2 * r2;
|
54350
|
+
a3 && !t3.hasOwnProperty(n2) && (t3[n2] = o2), o2 && t3[n2] < o2 && (t3[n2] = o2), r2 && !t3.hasOwnProperty(i3) && (t3[i3] = 3 * r2), r2 && t3[i3] < s2 && (t3[i3] = s2);
|
54351
|
+
}
|
54352
|
+
};
|
54353
|
+
var Ht = function(e3, t3) {
|
54354
|
+
var a3, r2 = Mt(t3[0].replace("#EXT-X-", ""));
|
54355
|
+
Wt(t3[1]) ? (a3 = {}, a3 = Object.assign(Ft(t3[1]), a3)) : a3 = Ut(t3[1]), e3[r2] = a3;
|
54356
|
+
}, Mt = function(e3) {
|
54357
|
+
return e3.toLowerCase().replace(/-(\w)/g, function(e4) {
|
54358
|
+
return e4[1].toUpperCase();
|
54359
|
+
});
|
54360
|
+
}, Ut = function(e3) {
|
54361
|
+
if ("yes" === e3.toLowerCase() || "no" === e3.toLowerCase())
|
54362
|
+
return "yes" === e3.toLowerCase();
|
54363
|
+
var t3 = -1 !== e3.indexOf(":") ? e3 : parseFloat(e3);
|
54364
|
+
return isNaN(t3) ? e3 : t3;
|
54365
|
+
}, Bt = function(e3) {
|
54366
|
+
var t3 = {}, a3 = e3.split("=");
|
54367
|
+
a3.length > 1 && (t3[Mt(a3[0])] = Ut(a3[1]));
|
54368
|
+
return t3;
|
54369
|
+
}, Ft = function(e3) {
|
54370
|
+
for (var t3 = e3.split(","), a3 = {}, r2 = 0; t3.length > r2; r2++) {
|
54371
|
+
var n2 = t3[r2], i3 = Bt(n2);
|
54372
|
+
a3 = Object.assign(i3, a3);
|
54373
|
+
}
|
54374
|
+
return a3;
|
54375
|
+
}, Wt = function(e3) {
|
54376
|
+
return e3.indexOf("=") > -1;
|
54377
|
+
}, Vt = function(e3, t3) {
|
54378
|
+
return -1 === t3 ? [e3] : [e3.substring(0, t3), e3.substring(t3 + 1)];
|
54379
|
+
}, Gt = function(e3) {
|
54380
|
+
var t3 = {};
|
54381
|
+
if (e3) {
|
54382
|
+
var a3 = e3.search(",");
|
54383
|
+
return [e3.slice(0, a3), e3.slice(a3 + 1)].forEach(function(e4, a4) {
|
54384
|
+
for (var r2 = e4.replace(/['"]+/g, "").split("="), n2 = 0; n2 < r2.length; n2++)
|
54385
|
+
"DATA-ID" === r2[n2] && (t3["DATA-ID"] = r2[1 - n2]), "VALUE" === r2[n2] && (t3.VALUE = r2[1 - n2]);
|
54386
|
+
}), { data: t3 };
|
54387
|
+
}
|
54388
|
+
}, Qt = jt, Jt = { safeCall: function(e3, t3, a3, r2) {
|
54389
|
+
var n2 = r2;
|
54390
|
+
if (e3 && "function" == typeof e3[t3])
|
54391
|
+
try {
|
54392
|
+
n2 = e3[t3].apply(e3, a3);
|
54393
|
+
} catch (e4) {
|
54394
|
+
G.info("safeCall error", e4);
|
54395
|
+
}
|
54396
|
+
return n2;
|
54397
|
+
}, safeIncrement: de, getComputedStyle: function(e3, t3) {
|
54398
|
+
return e3 && t3 && At.default && "function" == typeof At.default.getComputedStyle ? (St && St.has(e3) && (a3 = St.get(e3)), a3 || (a3 = At.default.getComputedStyle(e3, null), St && St.set(e3, a3)), a3.getPropertyValue(t3)) : "";
|
54399
|
+
var a3;
|
54400
|
+
}, secondsToMs: function(e3) {
|
54401
|
+
return Math.floor(1e3 * e3);
|
54402
|
+
}, assign: Object.assign, headersStringToObject: _e, cdnHeadersToRequestId: he, extractHostnameAndDomain: oe, extractHostname: ie, manifestParser: Qt, generateShortID: U, generateUUID: M, now: K.now }, zt = { PLAYER_READY: "playerready", VIEW_INIT: "viewinit", VIDEO_CHANGE: "videochange", PLAY: "play", PAUSE: "pause", PLAYING: "playing", TIME_UPDATE: "timeupdate", SEEKING: "seeking", SEEKED: "seeked", REBUFFER_START: "rebufferstart", REBUFFER_END: "rebufferend", ERROR: "error", ENDED: "ended", RENDITION_CHANGE: "renditionchange", ORIENTATION_CHANGE: "orientationchange", AD_REQUEST: "adrequest", AD_RESPONSE: "adresponse", AD_BREAK_START: "adbreakstart", AD_PLAY: "adplay", AD_PLAYING: "adplaying", AD_PAUSE: "adpause", AD_FIRST_QUARTILE: "adfirstquartile", AD_MID_POINT: "admidpoint", AD_THIRD_QUARTILE: "adthirdquartile", AD_ENDED: "adended", AD_BREAK_END: "adbreakend", AD_ERROR: "aderror", REQUEST_COMPLETED: "requestcompleted", REQUEST_FAILED: "requestfailed", REQUEST_CANCELLED: "requestcanceled" }, Kt = {}, Yt = function(e3) {
|
54403
|
+
var t3 = arguments;
|
54404
|
+
"string" == typeof e3 ? Yt.hasOwnProperty(e3) ? H.default.setTimeout(function() {
|
54405
|
+
t3 = Array.prototype.splice.call(t3, 1), Yt[e3].apply(null, t3);
|
54406
|
+
}, 0) : G.warn("`" + e3 + "` is an unknown task") : "function" == typeof e3 ? H.default.setTimeout(function() {
|
54407
|
+
e3(Yt);
|
54408
|
+
}, 0) : G.warn("`" + e3 + "` is invalid.");
|
54409
|
+
}, Xt = { loaded: K.now(), NAME: "mux-embed", VERSION: "5.2.1", API_VERSION: "2.1", PLAYER_TRACKED: false, monitor: function(e3, t3) {
|
54410
|
+
return function(e4, t4, a3) {
|
54411
|
+
var r2 = j(F(t4), 3), n2 = r2[0], i3 = r2[1], o2 = r2[2], s2 = e4.log, u2 = e4.utils.getComputedStyle, d2 = e4.utils.secondsToMs;
|
54412
|
+
if (!n2)
|
54413
|
+
return s2.error("No element was found with the `" + i3 + "` query selector.");
|
54414
|
+
if ("video" !== o2 && "audio" !== o2)
|
54415
|
+
return s2.error("The element of `" + i3 + "` was not a media element.");
|
54416
|
+
n2.mux && (n2.mux.destroy(), delete n2.mux, s2.warn("Already monitoring this video element, replacing existing event listeners")), (a3 = Object.assign({ automaticErrorTracking: true }, a3)).data = Object.assign({ player_software: "HTML5 Video Element", player_mux_plugin_name: "VideoElementMonitor", player_mux_plugin_version: e4.VERSION }, a3.data), a3.getPlayheadTime = function() {
|
54417
|
+
return d2(n2.currentTime);
|
54418
|
+
}, a3.getStateData = function() {
|
54419
|
+
var e5, t5 = this.hlsjs && this.hlsjs.url, r3 = this.dashjs && v("function" === this.dashjs.getSource) && this.dashjs.getSource(), i4 = { player_is_paused: n2.paused, player_playhead_time: d2(n2.currentTime), player_width: parseInt(u2(n2, "width")), player_height: parseInt(u2(n2, "height")), player_autoplay_on: n2.autoplay, player_preload_on: n2.preload, player_language_code: n2.lang, player_is_fullscreen: Et.default && !!(Et.default.fullscreenElement || Et.default.webkitFullscreenElement || Et.default.mozFullScreenElement || Et.default.msFullscreenElement), video_poster_url: n2.poster, video_source_url: t5 || r3 || n2.currentSrc, video_source_duration: d2(n2.duration), video_source_height: n2.videoHeight, video_source_width: n2.videoWidth, view_dropped_frame_count: null == n2 || null === (e5 = n2.getVideoPlaybackQuality) || void 0 === e5 ? void 0 : e5.call(n2).droppedVideoFrames }, o3 = a3.getPlayheadTime();
|
54420
|
+
if (n2.getStartDate && o3 > 0) {
|
54421
|
+
var s3 = n2.getStartDate();
|
54422
|
+
if (s3 && "function" == typeof s3.getTime && s3.getTime()) {
|
54423
|
+
var l3 = s3.getTime();
|
54424
|
+
if (i4.player_program_time = l3 + o3, n2.seekable.length > 0) {
|
54425
|
+
var c2 = l3 + n2.seekable.end(n2.seekable.length - 1);
|
54426
|
+
i4.player_live_edge_program_time = c2;
|
54427
|
+
}
|
54428
|
+
}
|
54429
|
+
}
|
54430
|
+
return i4;
|
54431
|
+
}, n2.mux = n2.mux || {}, n2.mux.deleted = false, n2.mux.emit = function(t5, a4) {
|
54432
|
+
e4.emit(i3, t5, a4);
|
54433
|
+
};
|
54434
|
+
var l2 = function() {
|
54435
|
+
s2.error("The monitor for this video element has already been destroyed.");
|
54436
|
+
};
|
54437
|
+
n2.mux.destroy = function() {
|
54438
|
+
Object.keys(n2.mux.listeners).forEach(function(e5) {
|
54439
|
+
n2.removeEventListener(e5, n2.mux.listeners[e5], false);
|
54440
|
+
}), delete n2.mux.listeners, n2.mux.destroy = l2, n2.mux.swapElement = l2, n2.mux.emit = l2, n2.mux.addHLSJS = l2, n2.mux.addDashJS = l2, n2.mux.removeHLSJS = l2, n2.mux.removeDashJS = l2, n2.mux.deleted = true, e4.emit(i3, "destroy");
|
54441
|
+
}, n2.mux.swapElement = function(t5) {
|
54442
|
+
var a4 = j(F(t5), 3), r3 = a4[0], i4 = a4[1], o3 = a4[2];
|
54443
|
+
return r3 ? "video" !== o3 && "audio" !== o3 ? e4.log.error("The element of `" + i4 + "` was not a media element.") : (r3.muxId = n2.muxId, delete n2.muxId, r3.mux = r3.mux || {}, r3.mux.listeners = Object.assign({}, n2.mux.listeners), delete n2.mux.listeners, Object.keys(r3.mux.listeners).forEach(function(e5) {
|
54444
|
+
n2.removeEventListener(e5, r3.mux.listeners[e5], false), r3.addEventListener(e5, r3.mux.listeners[e5], false);
|
54445
|
+
}), r3.mux.swapElement = n2.mux.swapElement, r3.mux.destroy = n2.mux.destroy, delete n2.mux, void (n2 = r3)) : e4.log.error("No element was found with the `" + i4 + "` query selector.");
|
54446
|
+
}, n2.mux.addHLSJS = function(t5) {
|
54447
|
+
e4.addHLSJS(i3, t5);
|
54448
|
+
}, n2.mux.addDashJS = function(t5) {
|
54449
|
+
e4.addDashJS(i3, t5);
|
54450
|
+
}, n2.mux.removeHLSJS = function() {
|
54451
|
+
e4.removeHLSJS(i3);
|
54452
|
+
}, n2.mux.removeDashJS = function() {
|
54453
|
+
e4.removeDashJS(i3);
|
54454
|
+
}, e4.init(i3, a3), e4.emit(i3, "playerready"), n2.paused || (e4.emit(i3, "play"), n2.readyState > 2 && e4.emit(i3, "playing")), n2.mux.listeners = {}, Dt.forEach(function(t5) {
|
54455
|
+
"error" === t5 && !a3.automaticErrorTracking || (n2.mux.listeners[t5] = function() {
|
54456
|
+
var a4 = {};
|
54457
|
+
if ("error" === t5) {
|
54458
|
+
if (!n2.error || 1 === n2.error.code)
|
54459
|
+
return;
|
54460
|
+
a4.player_error_code = n2.error.code, a4.player_error_message = qt[n2.error.code] || n2.error.message;
|
54461
|
+
}
|
54462
|
+
e4.emit(i3, t5, a4);
|
54463
|
+
}, n2.addEventListener(t5, n2.mux.listeners[t5], false));
|
54464
|
+
});
|
54465
|
+
}(Yt, e3, t3);
|
54466
|
+
}, destroyMonitor: function(e3) {
|
54467
|
+
var t3 = j(F(e3), 1)[0];
|
54468
|
+
t3 && t3.mux && "function" == typeof t3.mux.destroy ? t3.mux.destroy() : G.error("A video element monitor for `" + e3 + "` has not been initialized via `mux.monitor`.");
|
54469
|
+
}, addHLSJS: function(e3, t3) {
|
54470
|
+
var a3 = B(e3);
|
54471
|
+
Kt[a3] ? Kt[a3].addHLSJS(t3) : G.error("A monitor for `" + a3 + "` has not been initialized.");
|
54472
|
+
}, addDashJS: function(e3, t3) {
|
54473
|
+
var a3 = B(e3);
|
54474
|
+
Kt[a3] ? Kt[a3].addDashJS(t3) : G.error("A monitor for `" + a3 + "` has not been initialized.");
|
54475
|
+
}, removeHLSJS: function(e3) {
|
54476
|
+
var t3 = B(e3);
|
54477
|
+
Kt[t3] ? Kt[t3].removeHLSJS() : G.error("A monitor for `" + t3 + "` has not been initialized.");
|
54478
|
+
}, removeDashJS: function(e3) {
|
54479
|
+
var t3 = B(e3);
|
54480
|
+
Kt[t3] ? Kt[t3].removeDashJS() : G.error("A monitor for `" + t3 + "` has not been initialized.");
|
54481
|
+
}, init: function(e3, t3) {
|
54482
|
+
J() && t3 && t3.respectDoNotTrack && G.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");
|
54483
|
+
var a3 = B(e3);
|
54484
|
+
Kt[a3] = new kt(Yt, a3, t3);
|
54485
|
+
}, emit: function(e3, t3, a3) {
|
54486
|
+
var r2 = B(e3);
|
54487
|
+
Kt[r2] ? (Kt[r2].emit(t3, a3), "destroy" === t3 && delete Kt[r2]) : G.error("A monitor for `" + r2 + "` has not been initialized.");
|
54488
|
+
}, checkDoNotTrack: J, log: G, utils: Jt, events: zt, WINDOW_HIDDEN: false, WINDOW_UNLOADING: false };
|
54489
|
+
Object.assign(Yt, Xt), void 0 !== H.default && "function" == typeof H.default.addEventListener && H.default.addEventListener("pagehide", function(e3) {
|
54490
|
+
e3.persisted || (Yt.WINDOW_UNLOADING = true);
|
54491
|
+
}, false);
|
54492
|
+
var $t = Yt;
|
54493
|
+
/*!
|
54494
|
+
* JavaScript Cookie v2.1.3
|
54495
|
+
* https://github.com/js-cookie/js-cookie
|
54496
|
+
*
|
54497
|
+
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
54498
|
+
* Released under the MIT license
|
54499
|
+
*/
|
54500
|
+
var Zt = $t.utils.secondsToMs;
|
54501
|
+
function ea(e3, t3) {
|
54502
|
+
var a3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [], r2 = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : [], n2 = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : function() {
|
54503
|
+
return {};
|
54504
|
+
}, i3 = false;
|
54505
|
+
e3.on("adstart", function() {
|
54506
|
+
i3 = true;
|
54507
|
+
}), e3.on("adend", function() {
|
54508
|
+
i3 = false;
|
54509
|
+
}), e3.on("adserror", function() {
|
54510
|
+
i3 = false;
|
54511
|
+
});
|
54512
|
+
var o2 = function() {
|
54513
|
+
var r3 = Zt(t3.currentTime()), o3 = function a4() {
|
54514
|
+
var o4 = $t.utils.now(), s3 = Zt(t3.currentTime());
|
54515
|
+
if (i3) {
|
54516
|
+
if (s3 > r3) {
|
54517
|
+
var u2 = n2();
|
54518
|
+
u2.viewer_time = o4 - Math.max(0, s3 - r3), t3.off("timeupdate", a4), e3.mux.emit("adplaying", u2);
|
54519
|
+
}
|
54520
|
+
} else
|
54521
|
+
t3.off("timeupdate", a4);
|
54522
|
+
};
|
54523
|
+
t3.on("timeupdate", o3);
|
54524
|
+
var s2 = function e4() {
|
54525
|
+
t3.off("timeupdate", o3), a3.forEach(function(a4) {
|
54526
|
+
t3.off(a4, e4);
|
54527
|
+
});
|
54528
|
+
};
|
54529
|
+
a3.forEach(function(e4) {
|
54530
|
+
t3.on(e4, s2);
|
54531
|
+
});
|
54532
|
+
};
|
54533
|
+
r2.forEach(function(e4) {
|
54534
|
+
t3.on(e4, o2);
|
54535
|
+
});
|
54536
|
+
}
|
54537
|
+
function ta(e3) {
|
54538
|
+
if ("string" != typeof e3)
|
54539
|
+
return false;
|
54540
|
+
var t3 = e3.split(".").map(function(e4) {
|
54541
|
+
return parseInt(e4);
|
54542
|
+
}), a3 = t3[0], r2 = t3[1];
|
54543
|
+
return a3 > 2 || 2 === a3 && r2 >= 3;
|
54544
|
+
}
|
54545
|
+
var aa = $t.utils.manifestParser;
|
54546
|
+
function ra(e3, t3) {
|
54547
|
+
return function(e4) {
|
54548
|
+
if (Array.isArray(e4))
|
54549
|
+
return e4;
|
54550
|
+
}(e3) || function(e4, t4) {
|
54551
|
+
var a3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
|
54552
|
+
if (null == a3)
|
54553
|
+
return;
|
54554
|
+
var r2, n2, i3 = [], o2 = true, s2 = false;
|
54555
|
+
try {
|
54556
|
+
for (a3 = a3.call(e4); !(o2 = (r2 = a3.next()).done) && (i3.push(r2.value), !t4 || i3.length !== t4); o2 = true)
|
54557
|
+
;
|
54558
|
+
} catch (e5) {
|
54559
|
+
s2 = true, n2 = e5;
|
54560
|
+
} finally {
|
54561
|
+
try {
|
54562
|
+
o2 || null == a3.return || a3.return();
|
54563
|
+
} finally {
|
54564
|
+
if (s2)
|
54565
|
+
throw n2;
|
54566
|
+
}
|
54567
|
+
}
|
54568
|
+
return i3;
|
54569
|
+
}(e3, t3) || function(e4, t4) {
|
54570
|
+
if (!e4)
|
54571
|
+
return;
|
54572
|
+
if ("string" == typeof e4)
|
54573
|
+
return na(e4, t4);
|
54574
|
+
var a3 = Object.prototype.toString.call(e4).slice(8, -1);
|
54575
|
+
"Object" === a3 && e4.constructor && (a3 = e4.constructor.name);
|
54576
|
+
if ("Map" === a3 || "Set" === a3)
|
54577
|
+
return Array.from(e4);
|
54578
|
+
if ("Arguments" === a3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a3))
|
54579
|
+
return na(e4, t4);
|
54580
|
+
}(e3, t3) || function() {
|
54581
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
54582
|
+
}();
|
54583
|
+
}
|
54584
|
+
function na(e3, t3) {
|
54585
|
+
(null == t3 || t3 > e3.length) && (t3 = e3.length);
|
54586
|
+
for (var a3 = 0, r2 = new Array(t3); a3 < t3; a3++)
|
54587
|
+
r2[a3] = e3[a3];
|
54588
|
+
return r2;
|
54589
|
+
}
|
54590
|
+
var ia = $t.utils, oa = ia.assign, sa = ia.secondsToMs;
|
54591
|
+
function ua(e3, t3, a3) {
|
54592
|
+
var r2 = 0;
|
54593
|
+
return function() {
|
54594
|
+
var n2, i3 = t3.readyState;
|
54595
|
+
if (i3 >= 2) {
|
54596
|
+
if (r2 = r2 || $t.utils.now(), 4 !== i3)
|
54597
|
+
return;
|
54598
|
+
var o2 = e3(), s2 = o2.mux.utils.extractHostnameAndDomain, u2 = o2.mux.utils.headersStringToObject, d2 = $t.utils.now(), l2 = ra(s2(t3.responseURL), 1)[0], c2 = "arraybuffer" === t3.responseType ? t3.response.byteLength : t3.responseText.length, p2 = u2(t3.getAllResponseHeaders ? t3.getAllResponseHeaders() : ""), f2 = function(e4) {
|
54599
|
+
var t4 = e4["content-type"];
|
54600
|
+
return t4 ? t4.match(/^audio\/mpegurl/i) ? "manifest" : t4.match(/^audio.*/i) ? "audio" : t4.match(/^video.*/) ? "video" : t4.match(/^application\/x-mpegurl/i) || t4.match(/^application\/vnd.apple.mpegurl/i) || t4.match(/^application\/dash+xml/i) ? "manifest" : "unknown" : "unknown";
|
54601
|
+
}(p2);
|
54602
|
+
if (t3.status >= 200 && t3.status < 300) {
|
54603
|
+
var _3 = { request_start: a3, request_response_start: r2, request_response_end: d2, request_bytes_loaded: c2, request_hostname: l2, request_url: t3.responseURL, request_response_headers: p2, request_type: f2 };
|
54604
|
+
if ("manifest" === f2) {
|
54605
|
+
var h2, v2, m2, y2, g2, b2, w2, T2 = (n2 = t3.responseText, new aa(n2));
|
54606
|
+
if (T2) {
|
54607
|
+
h2 = T2.partTargetDuration, v2 = T2.targetDuration, m2 = T2.segments;
|
54608
|
+
var x2 = T2.serverControl;
|
54609
|
+
y2 = x2.partHoldBack, g2 = x2.holdBack, w2 = T2.sessionData;
|
54610
|
+
var k2 = m2[m2.length - 1];
|
54611
|
+
k2 && k2.dateTimeObject && (b2 = k2.dateTimeObject.getTime() + sa(k2.duration)), _3 = oa(_3, { video_holdback: g2 && sa(g2), video_part_holdback: y2 && sa(y2), video_part_target_duration: h2 && sa(h2), video_target_duration: v2 && sa(v2), player_manifest_newest_program_time: b2 }), w2 && (_3 = oa(_3, w2));
|
54612
|
+
}
|
54613
|
+
}
|
54614
|
+
o2.mux.emit("requestcompleted", _3);
|
54615
|
+
} else {
|
54616
|
+
var E2 = { request_hostname: ra(s2(t3.responseURL), 1)[0], request_url: t3.responseURL, request_type: f2 };
|
54617
|
+
o2.mux.emit("requestfailed", E2);
|
54618
|
+
}
|
54619
|
+
}
|
54620
|
+
};
|
54621
|
+
}
|
54622
|
+
function da(e3, t3) {
|
54623
|
+
var a3, r2 = function(t4) {
|
54624
|
+
return function(a4) {
|
54625
|
+
var r3 = $t.utils.now();
|
54626
|
+
try {
|
54627
|
+
t4(a4);
|
54628
|
+
} catch (e4) {
|
54629
|
+
}
|
54630
|
+
try {
|
54631
|
+
a4.onreadystatechange = function(t5, a5, r4) {
|
54632
|
+
var n2 = ua(e3, t5, a5);
|
54633
|
+
return function() {
|
54634
|
+
try {
|
54635
|
+
n2();
|
54636
|
+
} catch (e4) {
|
54637
|
+
}
|
54638
|
+
try {
|
54639
|
+
r4();
|
54640
|
+
} catch (e4) {
|
54641
|
+
}
|
54642
|
+
};
|
54643
|
+
}(a4, r3, a4.onreadystatechange || function() {
|
54644
|
+
});
|
54645
|
+
} catch (e4) {
|
54646
|
+
}
|
54647
|
+
};
|
54648
|
+
};
|
54649
|
+
"function" == typeof (null == t3 ? void 0 : t3.onRequest) ? t3.onRequest(function(e4) {
|
54650
|
+
return e4.beforeSend = r2(e4.beforeSend || function() {
|
54651
|
+
}), e4;
|
54652
|
+
}) : t3.beforeRequest = (a3 = t3.beforeRequest || function(e4) {
|
54653
|
+
return e4;
|
54654
|
+
}, function(e4) {
|
54655
|
+
var t4 = a3(e4);
|
54656
|
+
return t4 ? (t4.beforeSend = r2(t4.beforeSend || function() {
|
54657
|
+
}), t4) : e4;
|
54658
|
+
});
|
54659
|
+
}
|
54660
|
+
var la = function(e3) {
|
54661
|
+
var t3, a3 = function(e4) {
|
54662
|
+
for (var t4, a4 = e4.textTracks(), r2 = 0; r2 < a4.length; r2++)
|
54663
|
+
"segment-metadata" === a4[r2].label && (t4 = a4[r2]);
|
54664
|
+
return t4;
|
54665
|
+
}(e3);
|
54666
|
+
a3 && a3.on && a3.on("cuechange", function() {
|
54667
|
+
try {
|
54668
|
+
var a4 = e3.tech({ IWillNotUseThisInPlugins: true }), r2 = (a4.vhs || a4.hls).playlists.media().attributes.BANDWIDTH;
|
54669
|
+
t3 !== r2 && e3.mux.emit("renditionchange", { video_source_bitrate: r2 }), t3 = r2;
|
54670
|
+
} catch (t4) {
|
54671
|
+
e3.mux && e3.mux.log && e3.mux.log.warn && e3.mux.log.warn("Cannot retrieve BANDWIDTH information from player: ".concat(t4));
|
54672
|
+
}
|
54673
|
+
});
|
54674
|
+
};
|
54675
|
+
function ca(e3, t3) {
|
54676
|
+
return function(e4) {
|
54677
|
+
if (Array.isArray(e4))
|
54678
|
+
return e4;
|
54679
|
+
}(e3) || function(e4, t4) {
|
54680
|
+
var a3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
|
54681
|
+
if (null == a3)
|
54682
|
+
return;
|
54683
|
+
var r2, n2, i3 = [], o2 = true, s2 = false;
|
54684
|
+
try {
|
54685
|
+
for (a3 = a3.call(e4); !(o2 = (r2 = a3.next()).done) && (i3.push(r2.value), !t4 || i3.length !== t4); o2 = true)
|
54686
|
+
;
|
54687
|
+
} catch (e5) {
|
54688
|
+
s2 = true, n2 = e5;
|
54689
|
+
} finally {
|
54690
|
+
try {
|
54691
|
+
o2 || null == a3.return || a3.return();
|
54692
|
+
} finally {
|
54693
|
+
if (s2)
|
54694
|
+
throw n2;
|
54695
|
+
}
|
54696
|
+
}
|
54697
|
+
return i3;
|
54698
|
+
}(e3, t3) || function(e4, t4) {
|
54699
|
+
if (!e4)
|
54700
|
+
return;
|
54701
|
+
if ("string" == typeof e4)
|
54702
|
+
return pa(e4, t4);
|
54703
|
+
var a3 = Object.prototype.toString.call(e4).slice(8, -1);
|
54704
|
+
"Object" === a3 && e4.constructor && (a3 = e4.constructor.name);
|
54705
|
+
if ("Map" === a3 || "Set" === a3)
|
54706
|
+
return Array.from(e4);
|
54707
|
+
if ("Arguments" === a3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a3))
|
54708
|
+
return pa(e4, t4);
|
54709
|
+
}(e3, t3) || function() {
|
54710
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
54711
|
+
}();
|
54712
|
+
}
|
54713
|
+
function pa(e3, t3) {
|
54714
|
+
(null == t3 || t3 > e3.length) && (t3 = e3.length);
|
54715
|
+
for (var a3 = 0, r2 = new Array(t3); a3 < t3; a3++)
|
54716
|
+
r2[a3] = e3[a3];
|
54717
|
+
return r2;
|
54718
|
+
}
|
54719
|
+
var fa = /* @__PURE__ */ new Map();
|
54720
|
+
var _a, ha = $t.log, va = $t.utils.assign, ma = $t.utils.safeCall, ya = $t.utils.getComputedStyle, ga = $t.utils.secondsToMs, ba = ["loadstart", "pause", "play", "playing", "seeking", "seeked", "timeupdate", "ratechange", "stalled", "waiting", "error", "ended"];
|
54721
|
+
function wa(e3) {
|
54722
|
+
var a3 = e3;
|
54723
|
+
return function(e4) {
|
54724
|
+
var r2, n2;
|
54725
|
+
if (a3.IS_IE8)
|
54726
|
+
return false;
|
54727
|
+
var i3 = this, o2 = i3.id(), s2 = (null === (r2 = i3.tech) || void 0 === r2 || null === (n2 = r2.call(i3, true)) || void 0 === n2 ? void 0 : n2.el()) || i3.tag, u2 = _a && (_a.get(s2) || _a.get(i3.el()));
|
54728
|
+
(e4 = va({ automaticErrorTracking: true }, e4)).data = va({ player_software_name: "Video.js", player_software_version: a3.VERSION || "< 4.11", player_mux_plugin_name: "videojs-mux", player_mux_plugin_version: "4.19.0", player_init_time: u2 }, e4.data), e4.getPlayheadTime = function() {
|
54729
|
+
return ga(i3.currentTime());
|
54730
|
+
}, e4.getStateData = function() {
|
54731
|
+
var e5 = ma(i3, "videoHeight"), t3 = ma(i3, "videoWidth");
|
54732
|
+
if (void 0 === t3 || void 0 === e5) {
|
54733
|
+
var a4 = i3.el().firstChild;
|
54734
|
+
a4 && "VIDEO" === a4.nodeName.toUpperCase() && (e5 = a4.videoHeight, t3 = a4.videoWidth);
|
54735
|
+
}
|
54736
|
+
return { player_is_paused: ma(i3, "paused"), player_is_fullscreen: ma(i3, "isFullscreen"), player_autoplay_on: !!ma(i3, "autoplay"), player_preload_on: ma(i3, "preload"), player_width: parseInt(ya(i3.el(), "width"), 10), player_height: parseInt(ya(i3.el(), "height"), 10), player_language_code: ma(i3, "language"), video_poster_url: ma(i3, "poster"), video_source_url: ma(i3, "currentSrc"), video_source_mime_type: ma(i3, "currentType") && ma(i3, "currentType").toLowerCase(), video_source_duration: ga(ma(i3, "duration") || 0), video_source_is_live: i3.duration() === 1 / 0, video_source_height: e5, video_source_width: t3 };
|
54737
|
+
}, i3.mux = function() {
|
54738
|
+
ha.error("[videojs-mux] The plugin was initialized more than once.");
|
54739
|
+
}, i3.mux.emit = function(e5, t3) {
|
54740
|
+
$t.emit(o2, e5, t3);
|
54741
|
+
}, i3.mux.addHLSJS = function(e5) {
|
54742
|
+
$t.addHLSJS(o2, e5);
|
54743
|
+
}, i3.mux.log = ha, i3.mux.utils = $t.utils, $t.init(o2, e4);
|
54744
|
+
var d2 = false, l2 = function() {
|
54745
|
+
d2 || i3.mux.emit("playerready"), d2 = true;
|
54746
|
+
};
|
54747
|
+
i3.ready(function() {
|
54748
|
+
i3.addClass("vjs-mux"), t2().setTimeout(l2, 0);
|
54749
|
+
});
|
54750
|
+
var c2 = false;
|
54751
|
+
i3.one("play", l2), ba.forEach(function(t3) {
|
54752
|
+
("error" !== t3 || e4.automaticErrorTracking) && i3.on(t3, function() {
|
54753
|
+
if (!c2) {
|
54754
|
+
var e5 = {};
|
54755
|
+
if ("error" === t3) {
|
54756
|
+
var a4 = ma(i3, "error");
|
54757
|
+
if (a4) {
|
54758
|
+
if (1 === a4.code)
|
54759
|
+
return;
|
54760
|
+
e5 = { player_error_code: a4.code, player_error_message: a4.message, player_error_context: a4.status };
|
54761
|
+
}
|
54762
|
+
}
|
54763
|
+
i3.mux.emit(t3, e5);
|
54764
|
+
}
|
54765
|
+
});
|
54766
|
+
});
|
54767
|
+
var p2 = false;
|
54768
|
+
i3.on("play", function() {
|
54769
|
+
p2 = true;
|
54770
|
+
}), i3.on("pause", function() {
|
54771
|
+
p2 = false;
|
54772
|
+
}), i3.on("adstart", function() {
|
54773
|
+
c2 = true, p2 && i3.mux.emit("pause"), i3.mux.emit("adbreakstart");
|
54774
|
+
}), i3.on("adend", function() {
|
54775
|
+
i3.mux.emit("adbreakend"), c2 = false, ma(i3, "paused") || (i3.mux.emit("play"), p2 = true, i3.onceux && i3.mux.emit("playing"));
|
54776
|
+
}), i3.ima && function(e5) {
|
54777
|
+
var t3, a4, r3, n3, i4, o3, s3 = function(t4) {
|
54778
|
+
var a5 = "function" == typeof (t4 = t4 || {}).getAdData ? t4.getAdData() : {}, r4 = "function" == typeof t4.getAd ? t4.getAd() : {}, n4 = "function" == typeof r4.getMediaUrl ? r4.getMediaUrl() : a5.mediaUrl, i5 = null == a5 ? void 0 : a5.adId, o4 = null == a5 ? void 0 : a5.creativeId, s4 = null == a5 ? void 0 : a5.universalAdIdValue, u4 = e5.ima.settings || {}, d4 = {};
|
54779
|
+
return n4 && (d4.ad_asset_url = n4), u4.adTagUrl && (d4.ad_tag_url = u4.adTagUrl), i5 && (d4.ad_id = i5), o4 && (d4.ad_creative_id = o4), s4 && (d4.ad_universal_id = s4), d4;
|
54780
|
+
};
|
54781
|
+
try {
|
54782
|
+
var u3 = window.google.ima.AdEvent.Type;
|
54783
|
+
t3 = u3.LOADED, a4 = u3.STARTED, r3 = u3.COMPLETE, n3 = u3.PAUSED, i4 = u3.RESUMED, o3 = u3.SKIPPED;
|
54784
|
+
} catch (e6) {
|
54785
|
+
t3 = "loaded", a4 = "start", r3 = "complete", n3 = "pause", i4 = "resume", o3 = "skip";
|
54786
|
+
}
|
54787
|
+
var d3 = 0;
|
54788
|
+
e5.mux.triggerAdRequest = function() {
|
54789
|
+
d3++, e5.mux.emit("adrequest", s3());
|
54790
|
+
}, e5.on("adsready", function() {
|
54791
|
+
var u4 = e5.ima.addEventListener || function() {
|
54792
|
+
};
|
54793
|
+
u4(t3, function(t4) {
|
54794
|
+
var a5 = s3(t4);
|
54795
|
+
d3 > 0 && (d3--, e5.mux.emit("adresponse", a5)), e5.mux.emit("adplay", a5);
|
54796
|
+
}), u4(a4, function(t4) {
|
54797
|
+
var a5 = s3(t4);
|
54798
|
+
e5.mux.emit("adplaying", a5);
|
54799
|
+
}), u4(i4, function(t4) {
|
54800
|
+
var a5 = s3(t4);
|
54801
|
+
e5.mux.emit("adplay", a5), e5.mux.emit("adplaying", a5);
|
54802
|
+
}), u4(n3, function(t4) {
|
54803
|
+
var a5 = s3(t4);
|
54804
|
+
e5.mux.emit("adpause", a5);
|
54805
|
+
}), u4(r3, function(t4) {
|
54806
|
+
var a5 = s3(t4);
|
54807
|
+
e5.mux.emit("adended", a5);
|
54808
|
+
}), u4(o3, function(t4) {
|
54809
|
+
var a5 = s3(t4);
|
54810
|
+
e5.mux.emit("adended", a5);
|
54811
|
+
}), e5.on("adserror", function() {
|
54812
|
+
d3 > 0 && (d3--, e5.mux.emit("adresponse")), e5.mux.emit("aderror");
|
54813
|
+
});
|
54814
|
+
});
|
54815
|
+
}(i3), i3.onceux && function(e5) {
|
54816
|
+
ea(e5, e5, ["onceux-linearad-pause", "onceux-linearad-skipped", "onceux-linearad-complete", "adserror"], ["adstart", "onceux-linearad-resume"]), e5.on("adstart", function() {
|
54817
|
+
e5.mux.emit("adplay");
|
54818
|
+
}), e5.on("onceux-linearad-start", function(t3) {
|
54819
|
+
t3.linearAd && t3.linearAd.index > 0 && (e5.mux.emit("adplay"), e5.mux.emit("adplaying"));
|
54820
|
+
}), e5.on("onceux-linearad-resume", function() {
|
54821
|
+
e5.mux.emit("adplay");
|
54822
|
+
}), e5.on("onceux-linearad-pause", function() {
|
54823
|
+
e5.mux.emit("adpause");
|
54824
|
+
}), e5.on("onceux-linearad-complete", function() {
|
54825
|
+
e5.mux.emit("adended");
|
54826
|
+
}), e5.on("onceux-linearad-skipped", function() {
|
54827
|
+
e5.mux.emit("adended");
|
54828
|
+
});
|
54829
|
+
}(i3), i3.ima3 && "function" == typeof i3.ima3.ready && function(e5) {
|
54830
|
+
var t3 = function() {
|
54831
|
+
var t4 = e5.ima3.currentAd, a5 = e5.ima3.settings, r4 = {};
|
54832
|
+
return t4 && (r4.ad_asset_url = t4.mediaUrl), a5 && (r4.ad_tag_url = a5.serverUrl), r4;
|
54833
|
+
};
|
54834
|
+
if (ta(e5.ima3.version)) {
|
54835
|
+
var a4 = 0, r3 = function() {
|
54836
|
+
a4 > 0 && (a4--, e5.mux.emit("adresponse", t3()));
|
54837
|
+
};
|
54838
|
+
e5.on("ads-request", function() {
|
54839
|
+
a4++, e5.mux.emit("adrequest", t3());
|
54840
|
+
}), e5.on("ads-load", function() {
|
54841
|
+
r3(), e5.mux.emit("adplay", t3());
|
54842
|
+
}), e5.on("adserror", function() {
|
54843
|
+
r3(), e5.mux.emit("aderror");
|
54844
|
+
}), e5.on("ads-play", function() {
|
54845
|
+
e5.mux.emit("adplay", t3());
|
54846
|
+
}), e5.on("ads-pause", function() {
|
54847
|
+
e5.mux.emit("adpause", t3());
|
54848
|
+
}), e5.on("ads-ad-ended", function() {
|
54849
|
+
e5.mux.emit("adended", t3());
|
54850
|
+
});
|
54851
|
+
}
|
54852
|
+
e5.ima3.ready(function() {
|
54853
|
+
e5.ima3.adPlayer ? (ta(e5.ima3.version) || (e5.ima3.adPlayer.on("play", function() {
|
54854
|
+
e5.mux.emit("adplay");
|
54855
|
+
}), e5.ima3.adPlayer.on("pause", function() {
|
54856
|
+
e5.mux.emit("adpause");
|
54857
|
+
}), e5.ima3.adPlayer.on("ended", function() {
|
54858
|
+
e5.mux.emit("adended");
|
54859
|
+
})), ea(e5, e5.ima3.adPlayer, ["pause", "ended", "adserror"], ["play"], t3)) : (e5.mux.log("Legacy IMA3 plugin found, ad events may not track correctly."), e5.on("ads-ad-started", function() {
|
54860
|
+
e5.mux.emit("adplaying", t3());
|
54861
|
+
}), e5.on("ads-play", function() {
|
54862
|
+
e5.mux.emit("adplaying", t3());
|
54863
|
+
}));
|
54864
|
+
});
|
54865
|
+
}(i3), i3.FreeWheelPlugin && i3.FreeWheelPlugin.VERSION && function(e5) {
|
54866
|
+
var t3 = function(t4) {
|
54867
|
+
var a4 = e5.FreeWheelPlugin, r3 = {};
|
54868
|
+
switch (t4) {
|
54869
|
+
case "adplay":
|
54870
|
+
case "adplaying":
|
54871
|
+
case "adpause":
|
54872
|
+
r3.ad_asset_url = e5.currentSrc();
|
54873
|
+
}
|
54874
|
+
return a4 && (r3.ad_tag_url = "html5" === a4.tech.toLowerCase() ? a4.settings.Html5.serverUrl : a4.settings.Flash.serverUrl), r3;
|
54875
|
+
};
|
54876
|
+
e5.on("ads-request", function() {
|
54877
|
+
e5.mux.emit("adrequest", t3("adrequest"));
|
54878
|
+
}), e5.on("ads-load", function() {
|
54879
|
+
e5.mux.emit("adresponse", t3("adresponse"));
|
54880
|
+
}), e5.on("adserror", function() {
|
54881
|
+
e5.mux.emit("aderror");
|
54882
|
+
}), e5.on("ads-ad-started", function() {
|
54883
|
+
e5.mux.emit("adplay", t3("adplay")), e5.mux.emit("adplaying", t3("adplaying"));
|
54884
|
+
}), e5.on("ads-play", function() {
|
54885
|
+
e5.mux.emit("adplay", t3("adplay")), e5.mux.emit("adplaying", t3("adplaying"));
|
54886
|
+
}), e5.on("ads-pause", function() {
|
54887
|
+
e5.mux.emit("adpause", t3("adpause"));
|
54888
|
+
}), e5.on("ads-ad-ended", function() {
|
54889
|
+
e5.mux.emit("adended", t3("adended"));
|
54890
|
+
}), e5.on("adend", function() {
|
54891
|
+
e5.mux.emit("play");
|
54892
|
+
});
|
54893
|
+
}(i3), i3.on("dispose", function() {
|
54894
|
+
i3.mux.emit("destroy"), _a.delete(i3);
|
54895
|
+
});
|
54896
|
+
};
|
54897
|
+
}
|
54898
|
+
function Ta(e3) {
|
54899
|
+
(e3.registerPlugin || e3.plugin || function() {
|
54900
|
+
$t.log.error("No valid method to register videojs plugin available.");
|
54901
|
+
})("mux", wa(e3)), function(e4) {
|
54902
|
+
if (!fa.get(e4) && (fa.set(e4, "video.js ".concat(e4.VERSION, " initialized")), "function" == typeof e4.getTech))
|
54903
|
+
for (var t3 = (e4.getTech("Html5") || {}).sourceHandlers, a3 = e4.Vhs || e4.Hls, r2 = function(r3) {
|
54904
|
+
var n3 = t3[r3], i3 = n3.handleSource;
|
54905
|
+
n3.handleSource = function(t4, r4) {
|
54906
|
+
var n4 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
54907
|
+
a3 && a3.xhr && da(function() {
|
54908
|
+
return e4(r4.el());
|
54909
|
+
}, a3.xhr);
|
54910
|
+
var o2 = i3(t4, r4, n4);
|
54911
|
+
if (o2 && "function" == typeof o2.xhr)
|
54912
|
+
try {
|
54913
|
+
var s2 = ca(e4.VERSION.split("."), 2), u2 = s2[0], d2 = s2[1];
|
54914
|
+
u2 = parseInt(u2), d2 = parseInt(d2);
|
54915
|
+
var l2 = u2 >= 7 && d2 >= 4 ? o2.player().id() : o2.player_.el_.parentNode.id;
|
54916
|
+
la(e4(l2));
|
54917
|
+
} catch (e5) {
|
54918
|
+
}
|
54919
|
+
return o2;
|
54920
|
+
};
|
54921
|
+
}, n2 = 0; n2 < t3.length; n2++)
|
54922
|
+
r2(n2);
|
54923
|
+
}(e3);
|
54924
|
+
}
|
54925
|
+
_a = "undefined" != typeof WeakMap ? /* @__PURE__ */ new WeakMap() : /* @__PURE__ */ new Map(), i2().hook && i2().hook("beforesetup", function(e3, t3) {
|
54926
|
+
return _a.set(e3, $t.utils.now()), t3;
|
54927
|
+
}), Ta(i2());
|
54928
|
+
}(), n;
|
54929
|
+
}();
|
54930
|
+
});
|
54931
|
+
}();
|
54932
|
+
})(videojsMux);
|
54933
|
+
module$2.service("VJSAnalyticsPlugin", [function() {
|
54934
|
+
const Plugin2 = videojs$1.getPlugin("plugin");
|
54935
|
+
const plugin = videojs$1.extend(Plugin2, {
|
54936
|
+
constructor: function(player, options) {
|
54937
|
+
Plugin2.call(this, player, options);
|
54938
|
+
}
|
54939
|
+
});
|
54940
|
+
plugin.pluginName = "analytics";
|
54941
|
+
return plugin;
|
54942
|
+
}]);
|
52729
54943
|
module$2.run([
|
52730
54944
|
"VJSPlaylistPlugin",
|
52731
54945
|
"VJSHlsJsPlugin",
|
@@ -52739,7 +54953,8 @@
|
|
52739
54953
|
"VJSTransform",
|
52740
54954
|
"VJSSeekButtons",
|
52741
54955
|
"VJSSourceSelector",
|
52742
|
-
|
54956
|
+
"VJSAnalyticsPlugin",
|
54957
|
+
function(VJSPlaylistPlugin, VJSHlsJsPlugin, VJSManualHlsPlugin, VJSContentFitPlugin, VJSCropperPlugin, VJSElementWrapperPlugin, VJSAutoplaySupportPlugin, VJSResponsiveScrubbing, VJSPostMessagesPlugin, VJSTransform, VJSSeekButtons, VJSSourceSelector, VJSAnalyticsPlugin) {
|
52743
54958
|
videojs$1.registerPlugin(VJSPlaylistPlugin.pluginName, VJSPlaylistPlugin);
|
52744
54959
|
videojs$1.registerPlugin(VJSHlsJsPlugin.pluginName, VJSHlsJsPlugin);
|
52745
54960
|
videojs$1.registerPlugin(VJSManualHlsPlugin.pluginName, VJSManualHlsPlugin);
|
@@ -52752,6 +54967,7 @@
|
|
52752
54967
|
videojs$1.registerPlugin(VJSTransform.pluginName, VJSTransform);
|
52753
54968
|
videojs$1.registerPlugin(VJSSeekButtons.pluginName, VJSSeekButtons);
|
52754
54969
|
videojs$1.registerPlugin(VJSSourceSelector.pluginName, VJSSourceSelector);
|
54970
|
+
videojs$1.registerPlugin(VJSAnalyticsPlugin.pluginName, VJSAnalyticsPlugin);
|
52755
54971
|
}
|
52756
54972
|
]);
|
52757
54973
|
module$2.factory("VJSFullscreenToggle", function() {
|
@@ -55911,7 +58127,6 @@
|
|
55911
58127
|
}, { "@vimeo/player": 1 }] }, {}, [2])(2);
|
55912
58128
|
});
|
55913
58129
|
var Youtube = { exports: {} };
|
55914
|
-
const require$$0 = /* @__PURE__ */ getAugmentedNamespace(video_es);
|
55915
58130
|
(function(module2, exports2) {
|
55916
58131
|
(function(root, factory) {
|
55917
58132
|
{
|
@@ -59997,7 +62212,6 @@
|
|
59997
62212
|
player.removeClass("vjs-ad-paused");
|
59998
62213
|
}
|
59999
62214
|
);
|
60000
|
-
tracker.trackAds();
|
60001
62215
|
let isLoop = false;
|
60002
62216
|
player.on("adstart", () => {
|
60003
62217
|
try {
|
@@ -60190,7 +62404,7 @@
|
|
60190
62404
|
let dashify = (str) => {
|
60191
62405
|
return str.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase());
|
60192
62406
|
};
|
60193
|
-
let
|
62407
|
+
let initPlayer = (id, options = {}) => {
|
60194
62408
|
let player = document.getElementById(id);
|
60195
62409
|
if (player) {
|
60196
62410
|
for (const [key, value] of Object.entries(options)) {
|
@@ -60202,7 +62416,32 @@
|
|
60202
62416
|
});
|
60203
62417
|
}
|
60204
62418
|
};
|
60205
|
-
|
62419
|
+
let bootstrap = (id, options = {}) => {
|
62420
|
+
if (options.adTagUrl) {
|
62421
|
+
loadIMASDK(
|
62422
|
+
() => {
|
62423
|
+
initPlayer(id, options);
|
62424
|
+
},
|
62425
|
+
() => {
|
62426
|
+
delete options.adTagUrl;
|
62427
|
+
initPlayer(id, options);
|
62428
|
+
}
|
62429
|
+
);
|
62430
|
+
} else {
|
62431
|
+
initPlayer(id, options);
|
62432
|
+
}
|
62433
|
+
};
|
62434
|
+
function loadIMASDK(success, fail) {
|
62435
|
+
if (window.google)
|
62436
|
+
return success();
|
62437
|
+
const script = document.createElement("script");
|
62438
|
+
script.src = "//imasdk.googleapis.com/js/sdkloader/ima3.js";
|
62439
|
+
script.async = true;
|
62440
|
+
script.onload = success;
|
62441
|
+
script.onerror = fail;
|
62442
|
+
document.head.appendChild(script);
|
62443
|
+
}
|
62444
|
+
window.streamEnginePlayer = bootstrap;
|
60206
62445
|
console.log(`Stream Engine Player version: ${packageJSON.version}`);
|
60207
62446
|
});
|
60208
62447
|
//# sourceMappingURL=stream-engine-player.umd.cjs.map
|