@eluvio/elv-player-js 2.0.49 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +17 -17
- package/dist/Analytics-BX8nHI9d.js +22 -0
- package/dist/{Analytics-BERz0XOY.mjs → Analytics-DmKEzqMa.mjs} +515 -466
- package/dist/dash.all.min-CF_-4Slr.js +26 -0
- package/dist/dash.all.min-CI5RcNnm.mjs +18364 -0
- package/dist/elv-player-js.cjs.js +1 -1
- package/dist/elv-player-js.css +1 -1
- package/dist/elv-player-js.es.js +1 -1
- package/dist/{hls-B5H4DmYt.mjs → hls-4X0sH40o.mjs} +159 -135
- package/dist/hls-AJQ_RujU.js +40 -0
- package/dist/{index-D2DLsakf.mjs → index-BlqfaZFd.mjs} +1366 -1330
- package/dist/index-BruQW3W6.js +379 -0
- package/dist/index-DbJqN5VS.js +23 -0
- package/dist/index-DboHaHhI.mjs +69161 -0
- package/lib/player/Player.js +12 -9
- package/lib/player/PlayerParameters.js +2 -1
- package/package.json +3 -5
- package/dist/Analytics-CrJ6Bi-J.js +0 -22
- package/dist/dash.all.min-BeiZatYH.mjs +0 -18361
- package/dist/dash.all.min-C6KmDBup.js +0 -26
- package/dist/hls-BVyq94RY.js +0 -40
- package/dist/index-CCsOge31.js +0 -23
- package/dist/index-CZGstMoE.js +0 -379
- package/dist/index-DeV-6N-Y.mjs +0 -68522
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
1
|
+
var pt = Object.create, Ue = Object.defineProperty, ft = Object.getOwnPropertyDescriptor, vt = Object.getOwnPropertyNames, mt = Object.getPrototypeOf, yt = Object.prototype.hasOwnProperty, Fe = function(a, e) {
|
|
2
2
|
return function() {
|
|
3
3
|
return a && (e = a(a = 0)), e;
|
|
4
4
|
};
|
|
5
|
-
},
|
|
5
|
+
}, N = function(a, e) {
|
|
6
6
|
return function() {
|
|
7
7
|
return e || a((e = { exports: {} }).exports, e), e.exports;
|
|
8
8
|
};
|
|
9
|
-
},
|
|
10
|
-
if (e && typeof e == "object" || typeof e == "function") for (var i =
|
|
11
|
-
return e[
|
|
12
|
-
}).bind(null, u), enumerable: !(r =
|
|
9
|
+
}, gt = function(a, e, t, r) {
|
|
10
|
+
if (e && typeof e == "object" || typeof e == "function") for (var i = vt(e), n = 0, o = i.length, u; n < o; n++) u = i[n], !yt.call(a, u) && u !== t && Ue(a, u, { get: (function(d) {
|
|
11
|
+
return e[d];
|
|
12
|
+
}).bind(null, u), enumerable: !(r = ft(e, u)) || r.enumerable });
|
|
13
13
|
return a;
|
|
14
14
|
}, C = function(a, e, t) {
|
|
15
|
-
return t = a != null ?
|
|
16
|
-
}, U =
|
|
15
|
+
return t = a != null ? pt(mt(a)) : {}, gt(!a || !a.__esModule ? Ue(t, "default", { value: a, enumerable: !0 }) : t, a);
|
|
16
|
+
}, U = N(function(a, e) {
|
|
17
17
|
var t;
|
|
18
18
|
typeof window < "u" ? t = window : typeof global < "u" ? t = global : typeof self < "u" ? t = self : t = {}, e.exports = t;
|
|
19
19
|
});
|
|
20
20
|
function Z(a, e) {
|
|
21
21
|
return e != null && typeof Symbol < "u" && e[Symbol.hasInstance] ? !!e[Symbol.hasInstance](a) : Z(a, e);
|
|
22
22
|
}
|
|
23
|
-
var $ =
|
|
23
|
+
var $ = Fe(function() {
|
|
24
24
|
$();
|
|
25
25
|
});
|
|
26
|
-
function
|
|
26
|
+
function We(a) {
|
|
27
27
|
"@swc/helpers - typeof";
|
|
28
28
|
return a && typeof Symbol < "u" && a.constructor === Symbol ? "symbol" : typeof a;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
31
|
-
}), Ge =
|
|
30
|
+
var Qe = Fe(function() {
|
|
31
|
+
}), Ge = N(function(a, e) {
|
|
32
32
|
var t = Array.prototype.slice;
|
|
33
33
|
e.exports = r;
|
|
34
34
|
function r(i, n) {
|
|
@@ -38,7 +38,7 @@ var Ve = Ue(function() {
|
|
|
38
38
|
o.childNodes && o.childNodes.length && (i = t.call(o.childNodes).concat(i));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
}),
|
|
41
|
+
}), bt = N(function(a, e) {
|
|
42
42
|
$(), e.exports = t;
|
|
43
43
|
function t(r, i) {
|
|
44
44
|
if (!Z(this, t)) return new t(r, i);
|
|
@@ -47,7 +47,7 @@ var Ve = Ue(function() {
|
|
|
47
47
|
t.prototype.nodeType = 8, t.prototype.nodeName = "#comment", t.prototype.toString = function() {
|
|
48
48
|
return "[object Comment]";
|
|
49
49
|
};
|
|
50
|
-
}),
|
|
50
|
+
}), wt = N(function(a, e) {
|
|
51
51
|
$(), e.exports = t;
|
|
52
52
|
function t(r, i) {
|
|
53
53
|
if (!Z(this, t)) return new t(r);
|
|
@@ -56,10 +56,10 @@ var Ve = Ue(function() {
|
|
|
56
56
|
t.prototype.type = "DOMTextNode", t.prototype.nodeType = 3, t.prototype.nodeName = "#text", t.prototype.toString = function() {
|
|
57
57
|
return this.data;
|
|
58
58
|
}, t.prototype.replaceData = function(r, i, n) {
|
|
59
|
-
var o = this.data, u = o.substring(0, r),
|
|
60
|
-
this.data = u + n +
|
|
59
|
+
var o = this.data, u = o.substring(0, r), d = o.substring(r + i, o.length);
|
|
60
|
+
this.data = u + n + d, this.length = this.data.length;
|
|
61
61
|
};
|
|
62
|
-
}),
|
|
62
|
+
}), Ve = N(function(a, e) {
|
|
63
63
|
e.exports = t;
|
|
64
64
|
function t(r) {
|
|
65
65
|
var i = this, n = r.type;
|
|
@@ -70,13 +70,13 @@ var Ve = Ue(function() {
|
|
|
70
70
|
});
|
|
71
71
|
i.parentNode && i.parentNode.dispatchEvent(r);
|
|
72
72
|
}
|
|
73
|
-
}),
|
|
73
|
+
}), Je = N(function(a, e) {
|
|
74
74
|
e.exports = t;
|
|
75
75
|
function t(r, i) {
|
|
76
76
|
var n = this;
|
|
77
77
|
n.listeners || (n.listeners = {}), n.listeners[r] || (n.listeners[r] = []), n.listeners[r].indexOf(i) === -1 && n.listeners[r].push(i);
|
|
78
78
|
}
|
|
79
|
-
}),
|
|
79
|
+
}), ze = N(function(a, e) {
|
|
80
80
|
e.exports = t;
|
|
81
81
|
function t(r, i) {
|
|
82
82
|
var n = this;
|
|
@@ -85,138 +85,138 @@ var Ve = Ue(function() {
|
|
|
85
85
|
u !== -1 && o.splice(u, 1);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
89
|
-
|
|
88
|
+
}), Tt = N(function(a, e) {
|
|
89
|
+
Qe(), e.exports = r;
|
|
90
90
|
var t = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"];
|
|
91
|
-
function r(
|
|
92
|
-
switch (
|
|
91
|
+
function r(l) {
|
|
92
|
+
switch (l.nodeType) {
|
|
93
93
|
case 3:
|
|
94
|
-
return v(
|
|
94
|
+
return v(l.data);
|
|
95
95
|
case 8:
|
|
96
|
-
return "<!--" +
|
|
96
|
+
return "<!--" + l.data + "-->";
|
|
97
97
|
default:
|
|
98
|
-
return i(
|
|
98
|
+
return i(l);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function i(
|
|
102
|
-
var s = [], _ =
|
|
103
|
-
return
|
|
101
|
+
function i(l) {
|
|
102
|
+
var s = [], _ = l.tagName;
|
|
103
|
+
return l.namespaceURI === "http://www.w3.org/1999/xhtml" && (_ = _.toLowerCase()), s.push("<" + _ + c(l) + u(l)), t.indexOf(_) > -1 ? s.push(" />") : (s.push(">"), l.childNodes.length ? s.push.apply(s, l.childNodes.map(r)) : l.textContent || l.innerText ? s.push(v(l.textContent || l.innerText)) : l.innerHTML && s.push(l.innerHTML), s.push("</" + _ + ">")), s.join("");
|
|
104
104
|
}
|
|
105
|
-
function n(
|
|
106
|
-
var _ =
|
|
107
|
-
return s === "style" && Object.keys(
|
|
105
|
+
function n(l, s) {
|
|
106
|
+
var _ = We(l[s]);
|
|
107
|
+
return s === "style" && Object.keys(l.style).length > 0 ? !0 : l.hasOwnProperty(s) && (_ === "string" || _ === "boolean" || _ === "number") && s !== "nodeName" && s !== "className" && s !== "tagName" && s !== "textContent" && s !== "innerText" && s !== "namespaceURI" && s !== "innerHTML";
|
|
108
108
|
}
|
|
109
|
-
function o(
|
|
110
|
-
if (typeof
|
|
109
|
+
function o(l) {
|
|
110
|
+
if (typeof l == "string") return l;
|
|
111
111
|
var s = "";
|
|
112
|
-
return Object.keys(
|
|
113
|
-
var y =
|
|
112
|
+
return Object.keys(l).forEach(function(_) {
|
|
113
|
+
var y = l[_];
|
|
114
114
|
_ = _.replace(/[A-Z]/g, function(f) {
|
|
115
115
|
return "-" + f.toLowerCase();
|
|
116
116
|
}), s += _ + ":" + y + ";";
|
|
117
117
|
}), s;
|
|
118
118
|
}
|
|
119
|
-
function u(
|
|
120
|
-
var s =
|
|
119
|
+
function u(l) {
|
|
120
|
+
var s = l.dataset, _ = [];
|
|
121
121
|
for (var y in s) _.push({ name: "data-" + y, value: s[y] });
|
|
122
|
-
return _.length ?
|
|
122
|
+
return _.length ? d(_) : "";
|
|
123
123
|
}
|
|
124
|
-
function l
|
|
124
|
+
function d(l) {
|
|
125
125
|
var s = [];
|
|
126
|
-
return
|
|
126
|
+
return l.forEach(function(_) {
|
|
127
127
|
var y = _.name, f = _.value;
|
|
128
128
|
y === "style" && (f = o(f)), s.push(y + '="' + b(f) + '"');
|
|
129
129
|
}), s.length ? " " + s.join(" ") : "";
|
|
130
130
|
}
|
|
131
|
-
function c(
|
|
131
|
+
function c(l) {
|
|
132
132
|
var s = [];
|
|
133
|
-
for (var _ in
|
|
134
|
-
for (var y in
|
|
135
|
-
var g =
|
|
133
|
+
for (var _ in l) n(l, _) && s.push({ name: _, value: l[_] });
|
|
134
|
+
for (var y in l._attributes) for (var f in l._attributes[y]) {
|
|
135
|
+
var g = l._attributes[y][f], p = (g.prefix ? g.prefix + ":" : "") + f;
|
|
136
136
|
s.push({ name: p, value: g.value });
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return l.className && s.push({ name: "class", value: l.className }), s.length ? d(s) : "";
|
|
139
139
|
}
|
|
140
|
-
function v(
|
|
140
|
+
function v(l) {
|
|
141
141
|
var s = "";
|
|
142
|
-
return typeof
|
|
142
|
+
return typeof l == "string" ? s = l : l && (s = l.toString()), s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
143
143
|
}
|
|
144
|
-
function b(
|
|
145
|
-
return v(
|
|
144
|
+
function b(l) {
|
|
145
|
+
return v(l).replace(/"/g, """);
|
|
146
146
|
}
|
|
147
|
-
}),
|
|
147
|
+
}), Ke = N(function(a, e) {
|
|
148
148
|
$();
|
|
149
|
-
var t = Ge(), r =
|
|
150
|
-
e.exports =
|
|
151
|
-
function
|
|
152
|
-
if (!Z(this,
|
|
153
|
-
var
|
|
154
|
-
this.tagName =
|
|
149
|
+
var t = Ge(), r = Ve(), i = Je(), n = ze(), o = Tt(), u = "http://www.w3.org/1999/xhtml";
|
|
150
|
+
e.exports = d;
|
|
151
|
+
function d(c, v, b) {
|
|
152
|
+
if (!Z(this, d)) return new d(c);
|
|
153
|
+
var l = b === void 0 ? u : b || null;
|
|
154
|
+
this.tagName = l === u ? String(c).toUpperCase() : c, this.nodeName = this.tagName, this.className = "", this.dataset = {}, this.childNodes = [], this.parentNode = null, this.style = {}, this.ownerDocument = v || null, this.namespaceURI = l, this._attributes = {}, this.tagName === "INPUT" && (this.type = "text");
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
d.prototype.type = "DOMElement", d.prototype.nodeType = 1, d.prototype.appendChild = function(c) {
|
|
157
157
|
return c.parentNode && c.parentNode.removeChild(c), this.childNodes.push(c), c.parentNode = this, c;
|
|
158
|
-
},
|
|
158
|
+
}, d.prototype.replaceChild = function(c, v) {
|
|
159
159
|
c.parentNode && c.parentNode.removeChild(c);
|
|
160
160
|
var b = this.childNodes.indexOf(v);
|
|
161
161
|
return v.parentNode = null, this.childNodes[b] = c, c.parentNode = this, v;
|
|
162
|
-
},
|
|
162
|
+
}, d.prototype.removeChild = function(c) {
|
|
163
163
|
var v = this.childNodes.indexOf(c);
|
|
164
164
|
return this.childNodes.splice(v, 1), c.parentNode = null, c;
|
|
165
|
-
},
|
|
165
|
+
}, d.prototype.insertBefore = function(c, v) {
|
|
166
166
|
c.parentNode && c.parentNode.removeChild(c);
|
|
167
167
|
var b = v == null ? -1 : this.childNodes.indexOf(v);
|
|
168
168
|
return b > -1 ? this.childNodes.splice(b, 0, c) : this.childNodes.push(c), c.parentNode = this, c;
|
|
169
|
-
},
|
|
170
|
-
var
|
|
171
|
-
if (_ > -1 && (
|
|
169
|
+
}, d.prototype.setAttributeNS = function(c, v, b) {
|
|
170
|
+
var l = null, s = v, _ = v.indexOf(":");
|
|
171
|
+
if (_ > -1 && (l = v.substr(0, _), s = v.substr(_ + 1)), this.tagName === "INPUT" && v === "type") this.type = b;
|
|
172
172
|
else {
|
|
173
173
|
var y = this._attributes[c] || (this._attributes[c] = {});
|
|
174
|
-
y[s] = { value: b, prefix:
|
|
174
|
+
y[s] = { value: b, prefix: l };
|
|
175
175
|
}
|
|
176
|
-
},
|
|
177
|
-
var b = this._attributes[c],
|
|
178
|
-
return this.tagName === "INPUT" && v === "type" ? this.type : typeof
|
|
179
|
-
},
|
|
176
|
+
}, d.prototype.getAttributeNS = function(c, v) {
|
|
177
|
+
var b = this._attributes[c], l = b && b[v] && b[v].value;
|
|
178
|
+
return this.tagName === "INPUT" && v === "type" ? this.type : typeof l != "string" ? null : l;
|
|
179
|
+
}, d.prototype.removeAttributeNS = function(c, v) {
|
|
180
180
|
var b = this._attributes[c];
|
|
181
181
|
b && delete b[v];
|
|
182
|
-
},
|
|
182
|
+
}, d.prototype.hasAttributeNS = function(c, v) {
|
|
183
183
|
var b = this._attributes[c];
|
|
184
184
|
return !!b && v in b;
|
|
185
|
-
},
|
|
185
|
+
}, d.prototype.setAttribute = function(c, v) {
|
|
186
186
|
return this.setAttributeNS(null, c, v);
|
|
187
|
-
},
|
|
187
|
+
}, d.prototype.getAttribute = function(c) {
|
|
188
188
|
return this.getAttributeNS(null, c);
|
|
189
|
-
},
|
|
189
|
+
}, d.prototype.removeAttribute = function(c) {
|
|
190
190
|
return this.removeAttributeNS(null, c);
|
|
191
|
-
},
|
|
191
|
+
}, d.prototype.hasAttribute = function(c) {
|
|
192
192
|
return this.hasAttributeNS(null, c);
|
|
193
|
-
},
|
|
194
|
-
},
|
|
193
|
+
}, d.prototype.removeEventListener = n, d.prototype.addEventListener = i, d.prototype.dispatchEvent = r, d.prototype.focus = function() {
|
|
194
|
+
}, d.prototype.toString = function() {
|
|
195
195
|
return o(this);
|
|
196
|
-
},
|
|
196
|
+
}, d.prototype.getElementsByClassName = function(c) {
|
|
197
197
|
var v = c.split(" "), b = [];
|
|
198
|
-
return t(this, function(
|
|
199
|
-
if (
|
|
200
|
-
var s =
|
|
198
|
+
return t(this, function(l) {
|
|
199
|
+
if (l.nodeType === 1) {
|
|
200
|
+
var s = l.className || "", _ = s.split(" ");
|
|
201
201
|
v.every(function(y) {
|
|
202
202
|
return _.indexOf(y) !== -1;
|
|
203
|
-
}) && b.push(
|
|
203
|
+
}) && b.push(l);
|
|
204
204
|
}
|
|
205
205
|
}), b;
|
|
206
|
-
},
|
|
206
|
+
}, d.prototype.getElementsByTagName = function(c) {
|
|
207
207
|
c = c.toLowerCase();
|
|
208
208
|
var v = [];
|
|
209
209
|
return t(this.childNodes, function(b) {
|
|
210
210
|
b.nodeType === 1 && (c === "*" || b.tagName.toLowerCase() === c) && v.push(b);
|
|
211
211
|
}), v;
|
|
212
|
-
},
|
|
212
|
+
}, d.prototype.contains = function(c) {
|
|
213
213
|
return t(this, function(v) {
|
|
214
214
|
return c === v;
|
|
215
215
|
}) || !1;
|
|
216
216
|
};
|
|
217
|
-
}),
|
|
217
|
+
}), kt = N(function(a, e) {
|
|
218
218
|
$();
|
|
219
|
-
var t =
|
|
219
|
+
var t = Ke();
|
|
220
220
|
e.exports = r;
|
|
221
221
|
function r(i) {
|
|
222
222
|
if (!Z(this, r)) return new r();
|
|
@@ -227,7 +227,7 @@ var Ve = Ue(function() {
|
|
|
227
227
|
return String(i);
|
|
228
228
|
}).join("");
|
|
229
229
|
};
|
|
230
|
-
}),
|
|
230
|
+
}), Et = N(function(a, e) {
|
|
231
231
|
e.exports = t;
|
|
232
232
|
function t(r) {
|
|
233
233
|
}
|
|
@@ -235,53 +235,53 @@ var Ve = Ue(function() {
|
|
|
235
235
|
this.type = r, this.bubbles = i, this.cancelable = n;
|
|
236
236
|
}, t.prototype.preventDefault = function() {
|
|
237
237
|
};
|
|
238
|
-
}),
|
|
238
|
+
}), xt = N(function(a, e) {
|
|
239
239
|
$();
|
|
240
|
-
var t = Ge(), r =
|
|
240
|
+
var t = Ge(), r = bt(), i = wt(), n = Ke(), o = kt(), u = Et(), d = Ve(), c = Je(), v = ze();
|
|
241
241
|
e.exports = b;
|
|
242
242
|
function b() {
|
|
243
243
|
if (!Z(this, b)) return new b();
|
|
244
244
|
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;
|
|
245
245
|
}
|
|
246
|
-
var
|
|
247
|
-
|
|
246
|
+
var l = b.prototype;
|
|
247
|
+
l.createTextNode = function(s) {
|
|
248
248
|
return new i(s, this);
|
|
249
|
-
},
|
|
249
|
+
}, l.createElementNS = function(s, _) {
|
|
250
250
|
var y = s === null ? null : String(s);
|
|
251
251
|
return new n(_, this, y);
|
|
252
|
-
},
|
|
252
|
+
}, l.createElement = function(s) {
|
|
253
253
|
return new n(s, this);
|
|
254
|
-
},
|
|
254
|
+
}, l.createDocumentFragment = function() {
|
|
255
255
|
return new o(this);
|
|
256
|
-
},
|
|
256
|
+
}, l.createEvent = function(s) {
|
|
257
257
|
return new u(s);
|
|
258
|
-
},
|
|
258
|
+
}, l.createComment = function(s) {
|
|
259
259
|
return new r(s, this);
|
|
260
|
-
},
|
|
260
|
+
}, l.getElementById = function(s) {
|
|
261
261
|
s = String(s);
|
|
262
262
|
var _ = t(this.childNodes, function(y) {
|
|
263
263
|
if (String(y.id) === s) return y;
|
|
264
264
|
});
|
|
265
265
|
return _ || null;
|
|
266
|
-
},
|
|
267
|
-
}),
|
|
268
|
-
var t =
|
|
266
|
+
}, l.getElementsByClassName = n.prototype.getElementsByClassName, l.getElementsByTagName = n.prototype.getElementsByTagName, l.contains = n.prototype.contains, l.removeEventListener = v, l.addEventListener = c, l.dispatchEvent = d;
|
|
267
|
+
}), Dt = N(function(a, e) {
|
|
268
|
+
var t = xt();
|
|
269
269
|
e.exports = new t();
|
|
270
|
-
}),
|
|
271
|
-
var t = typeof global < "u" ? global : typeof window < "u" ? window : {}, r =
|
|
270
|
+
}), Ye = N(function(a, e) {
|
|
271
|
+
var t = typeof global < "u" ? global : typeof window < "u" ? window : {}, r = Dt(), i;
|
|
272
272
|
typeof document < "u" ? i = document : (i = t["__GLOBAL_DOCUMENT_CACHE@4"], i || (i = t["__GLOBAL_DOCUMENT_CACHE@4"] = r)), e.exports = i;
|
|
273
273
|
});
|
|
274
|
-
function
|
|
274
|
+
function qt(a) {
|
|
275
275
|
if (Array.isArray(a)) return a;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Rt(a, e) {
|
|
278
278
|
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
279
279
|
if (t != null) {
|
|
280
280
|
var r = [], i = !0, n = !1, o, u;
|
|
281
281
|
try {
|
|
282
282
|
for (t = t.call(a); !(i = (o = t.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0) ;
|
|
283
|
-
} catch (
|
|
284
|
-
n = !0, u =
|
|
283
|
+
} catch (d) {
|
|
284
|
+
n = !0, u = d;
|
|
285
285
|
} finally {
|
|
286
286
|
try {
|
|
287
287
|
!i && t.return != null && t.return();
|
|
@@ -292,7 +292,7 @@ function At(a, e) {
|
|
|
292
292
|
return r;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function St() {
|
|
296
296
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
297
297
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
298
298
|
}
|
|
@@ -301,7 +301,7 @@ function De(a, e) {
|
|
|
301
301
|
for (var t = 0, r = new Array(e); t < e; t++) r[t] = a[t];
|
|
302
302
|
return r;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function Xe(a, e) {
|
|
305
305
|
if (a) {
|
|
306
306
|
if (typeof a == "string") return De(a, e);
|
|
307
307
|
var t = Object.prototype.toString.call(a).slice(8, -1);
|
|
@@ -309,62 +309,62 @@ function Ye(a, e) {
|
|
|
309
309
|
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return De(a, e);
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
return
|
|
312
|
+
function Q(a, e) {
|
|
313
|
+
return qt(a) || Rt(a, e) || Xe(a, e) || St();
|
|
314
314
|
}
|
|
315
|
-
var se = C(U()),
|
|
315
|
+
var se = C(U()), Le = C(U()), Ot = C(U()), At = { now: function() {
|
|
316
316
|
var a = Ot.default.performance, e = a && a.timing, t = e && e.navigationStart, r = typeof t == "number" && typeof a.now == "function" ? t + a.now() : Date.now();
|
|
317
317
|
return Math.round(r);
|
|
318
|
-
} },
|
|
318
|
+
} }, P = At, de = function() {
|
|
319
319
|
var a, e, t;
|
|
320
|
-
if (typeof ((a =
|
|
321
|
-
t = new Uint8Array(32),
|
|
320
|
+
if (typeof ((a = Le.default.crypto) === null || a === void 0 ? void 0 : a.getRandomValues) == "function") {
|
|
321
|
+
t = new Uint8Array(32), Le.default.crypto.getRandomValues(t);
|
|
322
322
|
for (var r = 0; r < 32; r++) t[r] = t[r] % 16;
|
|
323
323
|
} else {
|
|
324
324
|
t = [];
|
|
325
325
|
for (var i = 0; i < 32; i++) t[i] = Math.random() * 16 | 0;
|
|
326
326
|
}
|
|
327
327
|
var n = 0;
|
|
328
|
-
e = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(
|
|
329
|
-
var c =
|
|
328
|
+
e = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(d) {
|
|
329
|
+
var c = d === "x" ? t[n] : t[n] & 3 | 8;
|
|
330
330
|
return n++, c.toString(16);
|
|
331
331
|
});
|
|
332
|
-
var o =
|
|
332
|
+
var o = P.now(), u = o?.toString(16).substring(3);
|
|
333
333
|
return u ? e.substring(0, 28) + u : e;
|
|
334
|
-
},
|
|
334
|
+
}, Ze = function() {
|
|
335
335
|
return ("000000" + (Math.random() * Math.pow(36, 6) << 0).toString(36)).slice(-6);
|
|
336
336
|
}, H = function(a) {
|
|
337
|
-
if (a && typeof a.nodeName < "u") return a.muxId || (a.muxId =
|
|
337
|
+
if (a && typeof a.nodeName < "u") return a.muxId || (a.muxId = Ze()), a.muxId;
|
|
338
338
|
var e;
|
|
339
339
|
try {
|
|
340
340
|
e = document.querySelector(a);
|
|
341
341
|
} catch {
|
|
342
342
|
}
|
|
343
|
-
return e && !e.muxId && (e.muxId = a),
|
|
343
|
+
return e && !e.muxId && (e.muxId = a), e?.muxId || a;
|
|
344
344
|
}, he = function(a) {
|
|
345
345
|
var e;
|
|
346
346
|
a && typeof a.nodeName < "u" ? (e = a, a = H(e)) : e = document.querySelector(a);
|
|
347
347
|
var t = e && e.nodeName ? e.nodeName.toLowerCase() : "";
|
|
348
348
|
return [e, a, t];
|
|
349
349
|
};
|
|
350
|
-
function
|
|
350
|
+
function Pt(a) {
|
|
351
351
|
if (Array.isArray(a)) return De(a);
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Lt(a) {
|
|
354
354
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function It() {
|
|
357
357
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
358
358
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
359
359
|
}
|
|
360
360
|
function M(a) {
|
|
361
|
-
return
|
|
361
|
+
return Pt(a) || Lt(a) || Xe(a) || It();
|
|
362
362
|
}
|
|
363
|
-
var Y = { TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3, ERROR: 4
|
|
364
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 3, t, r, i, n, o, u = [console, a],
|
|
363
|
+
var Y = { TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3, ERROR: 4 }, Nt = function(a) {
|
|
364
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 3, t, r, i, n, o, u = [console, a], d = (t = console.trace).bind.apply(t, M(u)), c = (r = console.info).bind.apply(r, M(u)), v = (i = console.debug).bind.apply(i, M(u)), b = (n = console.warn).bind.apply(n, M(u)), l = (o = console.error).bind.apply(o, M(u)), s = e;
|
|
365
365
|
return { trace: function() {
|
|
366
366
|
for (var _ = arguments.length, y = new Array(_), f = 0; f < _; f++) y[f] = arguments[f];
|
|
367
|
-
if (!(s > Y.TRACE)) return
|
|
367
|
+
if (!(s > Y.TRACE)) return d.apply(void 0, M(y));
|
|
368
368
|
}, debug: function() {
|
|
369
369
|
for (var _ = arguments.length, y = new Array(_), f = 0; f < _; f++) y[f] = arguments[f];
|
|
370
370
|
if (!(s > Y.DEBUG)) return v.apply(void 0, M(y));
|
|
@@ -376,14 +376,14 @@ var Y = { TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3, ERROR: 4, SILENT: 5 }, It = func
|
|
|
376
376
|
if (!(s > Y.WARN)) return b.apply(void 0, M(y));
|
|
377
377
|
}, error: function() {
|
|
378
378
|
for (var _ = arguments.length, y = new Array(_), f = 0; f < _; f++) y[f] = arguments[f];
|
|
379
|
-
if (!(s > Y.ERROR)) return
|
|
379
|
+
if (!(s > Y.ERROR)) return l.apply(void 0, M(y));
|
|
380
380
|
}, get level() {
|
|
381
381
|
return s;
|
|
382
382
|
}, set level(_) {
|
|
383
383
|
_ !== this.level && (s = _ ?? e);
|
|
384
384
|
} };
|
|
385
|
-
},
|
|
386
|
-
function
|
|
385
|
+
}, q = Nt("[mux]"), we = C(U());
|
|
386
|
+
function qe() {
|
|
387
387
|
var a = we.default.doNotTrack || we.default.navigator && we.default.navigator.doNotTrack;
|
|
388
388
|
return a === "1";
|
|
389
389
|
}
|
|
@@ -395,14 +395,14 @@ $();
|
|
|
395
395
|
function I(a, e) {
|
|
396
396
|
if (!Z(a, e)) throw new TypeError("Cannot call a class as a function");
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Ct(a, e) {
|
|
399
399
|
for (var t = 0; t < e.length; t++) {
|
|
400
400
|
var r = e[t];
|
|
401
401
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(a, r.key, r);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
return e &&
|
|
404
|
+
function W(a, e, t) {
|
|
405
|
+
return e && Ct(a.prototype, e), a;
|
|
406
406
|
}
|
|
407
407
|
function m(a, e, t) {
|
|
408
408
|
return e in a ? Object.defineProperty(a, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[e] = t, a;
|
|
@@ -412,13 +412,13 @@ function te(a) {
|
|
|
412
412
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
413
413
|
}, te(a);
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function jt(a, e) {
|
|
416
416
|
for (; !Object.prototype.hasOwnProperty.call(a, e) && (a = te(a), a !== null); ) ;
|
|
417
417
|
return a;
|
|
418
418
|
}
|
|
419
419
|
function _e(a, e, t) {
|
|
420
420
|
return typeof Reflect < "u" && Reflect.get ? _e = Reflect.get : _e = function(r, i, n) {
|
|
421
|
-
var o =
|
|
421
|
+
var o = jt(r, i);
|
|
422
422
|
if (o) {
|
|
423
423
|
var u = Object.getOwnPropertyDescriptor(o, i);
|
|
424
424
|
return u.get ? u.get.call(n || r) : u.value;
|
|
@@ -430,11 +430,26 @@ function Re(a, e) {
|
|
|
430
430
|
return t.__proto__ = r, t;
|
|
431
431
|
}, Re(a, e);
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Ht(a, e) {
|
|
434
434
|
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
435
435
|
a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), e && Re(a, e);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function Mt(a, e) {
|
|
438
|
+
if (a == null) return {};
|
|
439
|
+
var t = {}, r = Object.keys(a), i, n;
|
|
440
|
+
for (n = 0; n < r.length; n++) i = r[n], !(e.indexOf(i) >= 0) && (t[i] = a[i]);
|
|
441
|
+
return t;
|
|
442
|
+
}
|
|
443
|
+
function Bt(a, e) {
|
|
444
|
+
if (a == null) return {};
|
|
445
|
+
var t = Mt(a, e), r, i;
|
|
446
|
+
if (Object.getOwnPropertySymbols) {
|
|
447
|
+
var n = Object.getOwnPropertySymbols(a);
|
|
448
|
+
for (i = 0; i < n.length; i++) r = n[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(a, r) && (t[r] = a[r]);
|
|
449
|
+
}
|
|
450
|
+
return t;
|
|
451
|
+
}
|
|
452
|
+
function Ut() {
|
|
438
453
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
439
454
|
if (typeof Proxy == "function") return !0;
|
|
440
455
|
try {
|
|
@@ -444,19 +459,19 @@ function Ht() {
|
|
|
444
459
|
return !1;
|
|
445
460
|
}
|
|
446
461
|
}
|
|
447
|
-
|
|
448
|
-
function
|
|
449
|
-
return e && (
|
|
462
|
+
Qe();
|
|
463
|
+
function Ft(a, e) {
|
|
464
|
+
return e && (We(e) === "object" || typeof e == "function") ? e : T(a);
|
|
450
465
|
}
|
|
451
|
-
function
|
|
452
|
-
var e =
|
|
466
|
+
function Wt(a) {
|
|
467
|
+
var e = Ut();
|
|
453
468
|
return function() {
|
|
454
469
|
var t = te(a), r;
|
|
455
470
|
if (e) {
|
|
456
471
|
var i = te(this).constructor;
|
|
457
472
|
r = Reflect.construct(t, arguments, i);
|
|
458
473
|
} else r = t.apply(this, arguments);
|
|
459
|
-
return
|
|
474
|
+
return Ft(this, r);
|
|
460
475
|
};
|
|
461
476
|
}
|
|
462
477
|
var B = function(a) {
|
|
@@ -465,7 +480,7 @@ var B = function(a) {
|
|
|
465
480
|
if (typeof a != "string" || a === "") return ["localhost"];
|
|
466
481
|
var e = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, t = a.match(e) || [], r = t[4], i;
|
|
467
482
|
return r && (i = (r.match(/[^\.]+\.[^\.]+$/) || [])[0]), [r, i];
|
|
468
|
-
}, Te = C(U()),
|
|
483
|
+
}, Te = C(U()), Qt = { exists: function() {
|
|
469
484
|
var a = Te.default.performance, e = a && a.timing;
|
|
470
485
|
return e !== void 0;
|
|
471
486
|
}, domContentLoadedEventEnd: function() {
|
|
@@ -474,8 +489,8 @@ var B = function(a) {
|
|
|
474
489
|
}, navigationStart: function() {
|
|
475
490
|
var a = Te.default.performance, e = a && a.timing;
|
|
476
491
|
return e && e.navigationStart;
|
|
477
|
-
} }, pe =
|
|
478
|
-
function
|
|
492
|
+
} }, pe = Qt;
|
|
493
|
+
function A(a, e, t) {
|
|
479
494
|
t = t === void 0 ? 1 : t, a[e] = a[e] || 0, a[e] += t;
|
|
480
495
|
}
|
|
481
496
|
function fe(a) {
|
|
@@ -489,7 +504,7 @@ function fe(a) {
|
|
|
489
504
|
}
|
|
490
505
|
return a;
|
|
491
506
|
}
|
|
492
|
-
function
|
|
507
|
+
function Gt(a, e) {
|
|
493
508
|
var t = Object.keys(a);
|
|
494
509
|
if (Object.getOwnPropertySymbols) {
|
|
495
510
|
var r = Object.getOwnPropertySymbols(a);
|
|
@@ -497,31 +512,31 @@ function Ft(a, e) {
|
|
|
497
512
|
}
|
|
498
513
|
return t;
|
|
499
514
|
}
|
|
500
|
-
function
|
|
501
|
-
return e = e ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(e)) :
|
|
515
|
+
function Oe(a, e) {
|
|
516
|
+
return e = e ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(e)) : Gt(Object(e)).forEach(function(t) {
|
|
502
517
|
Object.defineProperty(a, t, Object.getOwnPropertyDescriptor(e, t));
|
|
503
518
|
}), a;
|
|
504
519
|
}
|
|
505
|
-
var Vt = ["x-cdn", "content-type"],
|
|
506
|
-
function
|
|
520
|
+
var Vt = ["x-cdn", "content-type"], $e = ["x-request-id", "cf-ray", "x-amz-cf-id", "x-akamai-request-id"], Jt = Vt.concat($e);
|
|
521
|
+
function Ae(a) {
|
|
507
522
|
a = a || "";
|
|
508
523
|
var e = {}, t = a.trim().split(/[\r\n]+/);
|
|
509
524
|
return t.forEach(function(r) {
|
|
510
525
|
if (r) {
|
|
511
526
|
var i = r.split(": "), n = i.shift();
|
|
512
|
-
n && (
|
|
527
|
+
n && (Jt.indexOf(n.toLowerCase()) >= 0 || n.toLowerCase().indexOf("x-litix-") === 0) && (e[n] = i.join(": "));
|
|
513
528
|
}
|
|
514
529
|
}), e;
|
|
515
530
|
}
|
|
516
531
|
function ve(a) {
|
|
517
532
|
if (a) {
|
|
518
|
-
var e =
|
|
533
|
+
var e = $e.find(function(t) {
|
|
519
534
|
return a[t] !== void 0;
|
|
520
535
|
});
|
|
521
536
|
return e ? a[e] : void 0;
|
|
522
537
|
}
|
|
523
538
|
}
|
|
524
|
-
var
|
|
539
|
+
var zt = function(a) {
|
|
525
540
|
var e = {};
|
|
526
541
|
for (var t in a) {
|
|
527
542
|
var r = a[t], i = r["DATA-ID"].search("io.litix.data.");
|
|
@@ -531,13 +546,13 @@ var Wt = function(a) {
|
|
|
531
546
|
}
|
|
532
547
|
}
|
|
533
548
|
return e;
|
|
534
|
-
},
|
|
549
|
+
}, et = zt, ce = function(a) {
|
|
535
550
|
if (!a) return {};
|
|
536
551
|
var e = pe.navigationStart(), t = a.loading, r = t ? t.start : a.trequest, i = t ? t.first : a.tfirst, n = t ? t.end : a.tload;
|
|
537
552
|
return { bytesLoaded: a.total, requestStart: Math.round(e + r), responseStart: Math.round(e + i), responseEnd: Math.round(e + n) };
|
|
538
553
|
}, ne = function(a) {
|
|
539
|
-
if (!(!a || typeof a.getAllResponseHeaders != "function")) return
|
|
540
|
-
},
|
|
554
|
+
if (!(!a || typeof a.getAllResponseHeaders != "function")) return Ae(a.getAllResponseHeaders());
|
|
555
|
+
}, Kt = function(a, e, t) {
|
|
541
556
|
var r = arguments.length > 4 ? arguments[4] : void 0, i = a.log, n = a.utils.secondsToMs, o = function(f) {
|
|
542
557
|
var g = parseInt(r.version), p;
|
|
543
558
|
return g === 1 && f.programDateTime !== null && (p = f.programDateTime), g === 0 && f.pdt !== null && (p = f.pdt), p;
|
|
@@ -548,43 +563,43 @@ var Wt = function(a) {
|
|
|
548
563
|
}
|
|
549
564
|
var u = function(f, g) {
|
|
550
565
|
return a.emit(e, f, g);
|
|
551
|
-
},
|
|
552
|
-
var p = g.levels, h = g.audioTracks, w = g.url, k = g.stats, E = g.networkDetails, D = g.sessionData,
|
|
566
|
+
}, d = function(f, g) {
|
|
567
|
+
var p = g.levels, h = g.audioTracks, w = g.url, k = g.stats, E = g.networkDetails, D = g.sessionData, S = {}, L = {};
|
|
553
568
|
p.forEach(function(j, z) {
|
|
554
|
-
|
|
569
|
+
S[z] = { width: j.width, height: j.height, bitrate: j.bitrate, attrs: j.attrs };
|
|
555
570
|
}), h.forEach(function(j, z) {
|
|
556
|
-
|
|
571
|
+
L[z] = { name: j.name, language: j.lang, bitrate: j.bitrate };
|
|
557
572
|
});
|
|
558
|
-
var R = ce(k), x = R.bytesLoaded,
|
|
559
|
-
u("requestcompleted",
|
|
573
|
+
var R = ce(k), x = R.bytesLoaded, V = R.requestStart, ae = R.responseStart, re = R.responseEnd;
|
|
574
|
+
u("requestcompleted", Oe(fe({}, et(D)), { request_event_type: f, request_bytes_loaded: x, request_start: V, request_response_start: ae, request_response_end: re, request_type: "manifest", request_hostname: B(w), request_response_headers: ne(E), request_rendition_lists: { media: S, audio: L, video: {} } }));
|
|
560
575
|
};
|
|
561
|
-
t.on(r.Events.MANIFEST_LOADED,
|
|
576
|
+
t.on(r.Events.MANIFEST_LOADED, d);
|
|
562
577
|
var c = function(f, g) {
|
|
563
|
-
var p = g.details, h = g.level, w = g.networkDetails, k = g.stats, E = ce(k), D = E.bytesLoaded,
|
|
564
|
-
u("requestcompleted", { request_event_type: f, request_bytes_loaded: D, request_start:
|
|
578
|
+
var p = g.details, h = g.level, w = g.networkDetails, k = g.stats, E = ce(k), D = E.bytesLoaded, S = E.requestStart, L = E.responseStart, R = E.responseEnd, x = p.fragments[p.fragments.length - 1], V = o(x) + n(x.duration);
|
|
579
|
+
u("requestcompleted", { request_event_type: f, request_bytes_loaded: D, request_start: S, request_response_start: L, request_response_end: R, request_current_level: h, request_type: "manifest", request_hostname: B(p.url), request_response_headers: ne(w), video_holdback: p.holdBack && n(p.holdBack), video_part_holdback: p.partHoldBack && n(p.partHoldBack), video_part_target_duration: p.partTarget && n(p.partTarget), video_target_duration: p.targetduration && n(p.targetduration), video_source_is_live: p.live, player_manifest_newest_program_time: isNaN(V) ? void 0 : V });
|
|
565
580
|
};
|
|
566
581
|
t.on(r.Events.LEVEL_LOADED, c);
|
|
567
582
|
var v = function(f, g) {
|
|
568
|
-
var p = g.details, h = g.networkDetails, w = g.stats, k = ce(w), E = k.bytesLoaded, D = k.requestStart,
|
|
569
|
-
u("requestcompleted", { request_event_type: f, request_bytes_loaded: E, request_start: D, request_response_start:
|
|
583
|
+
var p = g.details, h = g.networkDetails, w = g.stats, k = ce(w), E = k.bytesLoaded, D = k.requestStart, S = k.responseStart, L = k.responseEnd;
|
|
584
|
+
u("requestcompleted", { request_event_type: f, request_bytes_loaded: E, request_start: D, request_response_start: S, request_response_end: L, request_type: "manifest", request_hostname: B(p.url), request_response_headers: ne(h) });
|
|
570
585
|
};
|
|
571
586
|
t.on(r.Events.AUDIO_TRACK_LOADED, v);
|
|
572
587
|
var b = function(f, g) {
|
|
573
588
|
var p = g.stats, h = g.networkDetails, w = g.frag;
|
|
574
589
|
p = p || w.stats;
|
|
575
|
-
var k = ce(p), E = k.bytesLoaded, D = k.requestStart,
|
|
590
|
+
var k = ce(p), E = k.bytesLoaded, D = k.requestStart, S = k.responseStart, L = k.responseEnd, R = h ? ne(h) : void 0, x = { request_event_type: f, request_bytes_loaded: E, request_start: D, request_response_start: S, request_response_end: L, request_hostname: h ? B(h.responseURL) : void 0, request_id: R ? ve(R) : void 0, request_response_headers: R, request_media_duration: w.duration, request_url: h?.responseURL };
|
|
576
591
|
w.type === "main" ? (x.request_type = "media", x.request_current_level = w.level, x.request_video_width = (t.levels[w.level] || {}).width, x.request_video_height = (t.levels[w.level] || {}).height, x.request_labeled_bitrate = (t.levels[w.level] || {}).bitrate) : x.request_type = w.type, u("requestcompleted", x);
|
|
577
592
|
};
|
|
578
593
|
t.on(r.Events.FRAG_LOADED, b);
|
|
579
|
-
var
|
|
594
|
+
var l = function(f, g) {
|
|
580
595
|
var p = g.frag, h = p.start, w = o(p), k = { currentFragmentPDT: w, currentFragmentStart: n(h) };
|
|
581
596
|
u("fragmentchange", k);
|
|
582
597
|
};
|
|
583
|
-
t.on(r.Events.FRAG_CHANGED,
|
|
598
|
+
t.on(r.Events.FRAG_CHANGED, l);
|
|
584
599
|
var s = function(f, g) {
|
|
585
|
-
var p = g.type, h = g.details, w = g.response, k = g.fatal, E = g.frag, D = g.networkDetails,
|
|
586
|
-
if ((h === r.ErrorDetails.MANIFEST_LOAD_ERROR || h === r.ErrorDetails.MANIFEST_LOAD_TIMEOUT || h === r.ErrorDetails.FRAG_LOAD_ERROR || h === r.ErrorDetails.FRAG_LOAD_TIMEOUT || h === r.ErrorDetails.LEVEL_LOAD_ERROR || h === r.ErrorDetails.LEVEL_LOAD_TIMEOUT || h === r.ErrorDetails.AUDIO_TRACK_LOAD_ERROR || h === r.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT || h === r.ErrorDetails.SUBTITLE_LOAD_ERROR || h === r.ErrorDetails.SUBTITLE_LOAD_TIMEOUT || h === r.ErrorDetails.KEY_LOAD_ERROR || h === r.ErrorDetails.KEY_LOAD_TIMEOUT) && u("requestfailed", { request_error: h, request_url:
|
|
587
|
-
var R, x = "".concat(
|
|
600
|
+
var p = g.type, h = g.details, w = g.response, k = g.fatal, E = g.frag, D = g.networkDetails, S = E?.url || g.url || "", L = D ? ne(D) : void 0;
|
|
601
|
+
if ((h === r.ErrorDetails.MANIFEST_LOAD_ERROR || h === r.ErrorDetails.MANIFEST_LOAD_TIMEOUT || h === r.ErrorDetails.FRAG_LOAD_ERROR || h === r.ErrorDetails.FRAG_LOAD_TIMEOUT || h === r.ErrorDetails.LEVEL_LOAD_ERROR || h === r.ErrorDetails.LEVEL_LOAD_TIMEOUT || h === r.ErrorDetails.AUDIO_TRACK_LOAD_ERROR || h === r.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT || h === r.ErrorDetails.SUBTITLE_LOAD_ERROR || h === r.ErrorDetails.SUBTITLE_LOAD_TIMEOUT || h === r.ErrorDetails.KEY_LOAD_ERROR || h === r.ErrorDetails.KEY_LOAD_TIMEOUT) && u("requestfailed", { request_error: h, request_url: S, request_hostname: B(S), request_id: L ? ve(L) : void 0, request_type: h === r.ErrorDetails.FRAG_LOAD_ERROR || h === r.ErrorDetails.FRAG_LOAD_TIMEOUT ? "media" : h === r.ErrorDetails.AUDIO_TRACK_LOAD_ERROR || h === r.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT ? "audio" : h === r.ErrorDetails.SUBTITLE_LOAD_ERROR || h === r.ErrorDetails.SUBTITLE_LOAD_TIMEOUT ? "subtitle" : h === r.ErrorDetails.KEY_LOAD_ERROR || h === r.ErrorDetails.KEY_LOAD_TIMEOUT ? "encryption" : "manifest", request_error_code: w?.code, request_error_text: w?.text }), k) {
|
|
602
|
+
var R, x = "".concat(S ? "url: ".concat(S, `
|
|
588
603
|
`) : "") + "".concat(w && (w.code || w.text) ? "response: ".concat(w.code, ", ").concat(w.text, `
|
|
589
604
|
`) : "") + "".concat(g.reason ? "failure reason: ".concat(g.reason, `
|
|
590
605
|
`) : "") + "".concat(g.level ? "level: ".concat(g.level, `
|
|
@@ -607,27 +622,27 @@ var Wt = function(a) {
|
|
|
607
622
|
var p = g.level, h = t.levels[p];
|
|
608
623
|
if (h && h.attrs && h.attrs.BANDWIDTH) {
|
|
609
624
|
var w = h.attrs.BANDWIDTH, k, E = parseFloat(h.attrs["FRAME-RATE"]);
|
|
610
|
-
isNaN(E) || (k = E), w ? u("renditionchange", { video_source_fps: k, video_source_bitrate: w, video_source_width: h.width, video_source_height: h.height, video_source_rendition_name: h.name, video_source_codec: h
|
|
625
|
+
isNaN(E) || (k = E), w ? u("renditionchange", { video_source_fps: k, video_source_bitrate: w, video_source_width: h.width, video_source_height: h.height, video_source_rendition_name: h.name, video_source_codec: h?.videoCodec }) : i.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js");
|
|
611
626
|
}
|
|
612
627
|
};
|
|
613
628
|
t.on(r.Events.LEVEL_SWITCHED, y), t._stopMuxMonitor = function() {
|
|
614
|
-
t.off(r.Events.MANIFEST_LOADED,
|
|
629
|
+
t.off(r.Events.MANIFEST_LOADED, d), t.off(r.Events.LEVEL_LOADED, c), t.off(r.Events.AUDIO_TRACK_LOADED, v), t.off(r.Events.FRAG_LOADED, b), t.off(r.Events.FRAG_CHANGED, l), t.off(r.Events.ERROR, s), t.off(r.Events.FRAG_LOAD_EMERGENCY_ABORTED, _), t.off(r.Events.LEVEL_SWITCHED, y), t.off(r.Events.DESTROYING, t._stopMuxMonitor), delete t._stopMuxMonitor;
|
|
615
630
|
}, t.on(r.Events.DESTROYING, t._stopMuxMonitor);
|
|
616
|
-
},
|
|
631
|
+
}, Yt = function(a) {
|
|
617
632
|
a && typeof a._stopMuxMonitor == "function" && a._stopMuxMonitor();
|
|
618
633
|
}, Ie = function(a, e) {
|
|
619
634
|
if (!a || !a.requestEndDate) return {};
|
|
620
|
-
var t = B(a.url), r = a.url, i = a.bytesLoaded, n = new Date(a.requestStartDate).getTime(), o = new Date(a.firstByteDate).getTime(), u = new Date(a.requestEndDate).getTime(),
|
|
621
|
-
c.length > 0 && (v =
|
|
635
|
+
var t = B(a.url), r = a.url, i = a.bytesLoaded, n = new Date(a.requestStartDate).getTime(), o = new Date(a.firstByteDate).getTime(), u = new Date(a.requestEndDate).getTime(), d = isNaN(a.duration) ? 0 : a.duration, c = typeof e.getMetricsFor == "function" ? e.getMetricsFor(a.mediaType).HttpList : e.getDashMetrics().getHttpRequests(a.mediaType), v;
|
|
636
|
+
c.length > 0 && (v = Ae(c[c.length - 1]._responseHeaders || ""));
|
|
622
637
|
var b = v ? ve(v) : void 0;
|
|
623
|
-
return { requestStart: n, requestResponseStart: o, requestResponseEnd: u, requestBytesLoaded: i, requestResponseHeaders: v, requestMediaDuration:
|
|
624
|
-
},
|
|
638
|
+
return { requestStart: n, requestResponseStart: o, requestResponseEnd: u, requestBytesLoaded: i, requestResponseHeaders: v, requestMediaDuration: d, requestHostname: t, requestUrl: r, requestId: b };
|
|
639
|
+
}, Xt = function(a, e) {
|
|
625
640
|
var t = e.getQualityFor(a), r = e.getCurrentTrackFor(a).bitrateList;
|
|
626
641
|
return r ? { currentLevel: t, renditionWidth: r[t].width || null, renditionHeight: r[t].height || null, renditionBitrate: r[t].bandwidth } : {};
|
|
627
|
-
},
|
|
642
|
+
}, Zt = function(a) {
|
|
628
643
|
var e;
|
|
629
644
|
return (e = a.match(/.*codecs\*?="(.*)"/)) === null || e === void 0 ? void 0 : e[1];
|
|
630
|
-
},
|
|
645
|
+
}, $t = function(a) {
|
|
631
646
|
try {
|
|
632
647
|
var e, t, r = (t = a.getVersion) === null || t === void 0 || (e = t.call(a)) === null || e === void 0 ? void 0 : e.split(".").map(function(i) {
|
|
633
648
|
return parseInt(i);
|
|
@@ -636,45 +651,45 @@ var Wt = function(a) {
|
|
|
636
651
|
} catch {
|
|
637
652
|
return !1;
|
|
638
653
|
}
|
|
639
|
-
},
|
|
654
|
+
}, ea = function(a, e, t) {
|
|
640
655
|
var r = a.log;
|
|
641
656
|
if (!t || !t.on) {
|
|
642
657
|
r.warn("Invalid dash.js player reference. Monitoring blocked.");
|
|
643
658
|
return;
|
|
644
659
|
}
|
|
645
|
-
var i =
|
|
660
|
+
var i = $t(t), n = function(p, h) {
|
|
646
661
|
return a.emit(e, p, h);
|
|
647
662
|
}, o = function(p) {
|
|
648
663
|
var h = p.type, w = p.data, k = (w || {}).url;
|
|
649
664
|
n("requestcompleted", { request_event_type: h, request_start: 0, request_response_start: 0, request_response_end: 0, request_bytes_loaded: -1, request_type: "manifest", request_hostname: B(k), request_url: k });
|
|
650
665
|
};
|
|
651
666
|
t.on("manifestLoaded", o);
|
|
652
|
-
var u = {},
|
|
667
|
+
var u = {}, d = function(p) {
|
|
653
668
|
if (typeof p.getRequests != "function") return null;
|
|
654
669
|
var h = p.getRequests({ state: "executed" });
|
|
655
670
|
return h.length === 0 ? null : h[h.length - 1];
|
|
656
671
|
}, c = function(p) {
|
|
657
|
-
var h = p.type, w = p.fragmentModel, k = p.chunk, E =
|
|
672
|
+
var h = p.type, w = p.fragmentModel, k = p.chunk, E = d(w);
|
|
658
673
|
v({ type: h, request: E, chunk: k });
|
|
659
674
|
}, v = function(p) {
|
|
660
|
-
var h = p.type, w = p.chunk, k = p.request, E = (w || {}).mediaInfo, D = E || {},
|
|
661
|
-
|
|
675
|
+
var h = p.type, w = p.chunk, k = p.request, E = (w || {}).mediaInfo, D = E || {}, S = D.type, L = D.bitrateList;
|
|
676
|
+
L = L || [];
|
|
662
677
|
var R = {};
|
|
663
|
-
|
|
678
|
+
L.forEach(function(ie, F) {
|
|
664
679
|
R[F] = {}, R[F].width = ie.width, R[F].height = ie.height, R[F].bitrate = ie.bandwidth, R[F].attrs = {};
|
|
665
|
-
}),
|
|
666
|
-
var x = Ie(k, t),
|
|
667
|
-
n("requestcompleted", { request_event_type: h, request_start:
|
|
680
|
+
}), S === "video" ? u.video = R : S === "audio" ? u.audio = R : u.media = R;
|
|
681
|
+
var x = Ie(k, t), V = x.requestStart, ae = x.requestResponseStart, re = x.requestResponseEnd, j = x.requestResponseHeaders, z = x.requestMediaDuration, ye = x.requestHostname, ge = x.requestUrl, be = x.requestId;
|
|
682
|
+
n("requestcompleted", { request_event_type: h, request_start: V, request_response_start: ae, request_response_end: re, request_bytes_loaded: -1, request_type: S + "_init", request_response_headers: j, request_hostname: ye, request_id: be, request_url: ge, request_media_duration: z, request_rendition_lists: u });
|
|
668
683
|
};
|
|
669
684
|
i >= 4 ? t.on("initFragmentLoaded", v) : t.on("initFragmentLoaded", c);
|
|
670
685
|
var b = function(p) {
|
|
671
|
-
var h = p.type, w = p.fragmentModel, k = p.chunk, E =
|
|
672
|
-
|
|
673
|
-
},
|
|
674
|
-
var h = p.type, w = p.chunk, k = p.request, E = w || {}, D = E.mediaInfo,
|
|
675
|
-
n("requestcompleted", { request_event_type: h, request_start:
|
|
686
|
+
var h = p.type, w = p.fragmentModel, k = p.chunk, E = d(w);
|
|
687
|
+
l({ type: h, request: E, chunk: k });
|
|
688
|
+
}, l = function(p) {
|
|
689
|
+
var h = p.type, w = p.chunk, k = p.request, E = w || {}, D = E.mediaInfo, S = E.start, L = D || {}, R = L.type, x = Ie(k, t), V = x.requestStart, ae = x.requestResponseStart, re = x.requestResponseEnd, j = x.requestBytesLoaded, z = x.requestResponseHeaders, ye = x.requestMediaDuration, ge = x.requestHostname, be = x.requestUrl, ie = x.requestId, F = Xt(R, t), lt = F.currentLevel, ct = F.renditionWidth, _t = F.renditionHeight, ht = F.renditionBitrate;
|
|
690
|
+
n("requestcompleted", { request_event_type: h, request_start: V, request_response_start: ae, request_response_end: re, request_bytes_loaded: j, request_type: R, request_response_headers: z, request_hostname: ge, request_id: ie, request_url: be, request_media_start_time: S, request_media_duration: ye, request_current_level: lt, request_labeled_bitrate: ht, request_video_width: ct, request_video_height: _t });
|
|
676
691
|
};
|
|
677
|
-
i >= 4 ? t.on("mediaFragmentLoaded",
|
|
692
|
+
i >= 4 ? t.on("mediaFragmentLoaded", l) : t.on("mediaFragmentLoaded", b);
|
|
678
693
|
var s = { video: void 0, audio: void 0, totalBitrate: void 0 }, _ = function() {
|
|
679
694
|
if (s.video && typeof s.video.bitrate == "number") {
|
|
680
695
|
if (!(s.video.width && s.video.height)) {
|
|
@@ -682,7 +697,7 @@ var Wt = function(a) {
|
|
|
682
697
|
return;
|
|
683
698
|
}
|
|
684
699
|
var p = s.video.bitrate;
|
|
685
|
-
if (s.audio && typeof s.audio.bitrate == "number" && (p += s.audio.bitrate), p !== s.totalBitrate) return s.totalBitrate = p, { video_source_bitrate: p, video_source_height: s.video.height, video_source_width: s.video.width, video_source_codec:
|
|
700
|
+
if (s.audio && typeof s.audio.bitrate == "number" && (p += s.audio.bitrate), p !== s.totalBitrate) return s.totalBitrate = p, { video_source_bitrate: p, video_source_height: s.video.height, video_source_width: s.video.width, video_source_codec: Zt(s.video.codec) };
|
|
686
701
|
}
|
|
687
702
|
}, y = function(p, h, w) {
|
|
688
703
|
if (typeof p.newQuality != "number") {
|
|
@@ -691,15 +706,15 @@ var Wt = function(a) {
|
|
|
691
706
|
}
|
|
692
707
|
var k = p.mediaType;
|
|
693
708
|
if (k === "audio" || k === "video") {
|
|
694
|
-
var E = t.getBitrateInfoListFor(k).find(function(
|
|
695
|
-
var
|
|
696
|
-
return
|
|
709
|
+
var E = t.getBitrateInfoListFor(k).find(function(S) {
|
|
710
|
+
var L = S.qualityIndex;
|
|
711
|
+
return L === p.newQuality;
|
|
697
712
|
});
|
|
698
713
|
if (!(E && typeof E.bitrate == "number")) {
|
|
699
714
|
r.warn("missing bitrate info for ".concat(k));
|
|
700
715
|
return;
|
|
701
716
|
}
|
|
702
|
-
s[k] =
|
|
717
|
+
s[k] = Oe(fe({}, E), { codec: t.getCurrentTrackFor(k).codec });
|
|
703
718
|
var D = _();
|
|
704
719
|
D && n("renditionchange", D);
|
|
705
720
|
}
|
|
@@ -712,23 +727,23 @@ var Wt = function(a) {
|
|
|
712
727
|
t.on("fragmentLoadingAbandoned", f);
|
|
713
728
|
var g = function(p) {
|
|
714
729
|
var h = p.error, w, k, E = (h == null || (w = h.data) === null || w === void 0 ? void 0 : w.request) || {}, D = (h == null || (k = h.data) === null || k === void 0 ? void 0 : k.response) || {};
|
|
715
|
-
|
|
716
|
-
var
|
|
717
|
-
`) : "") + "".concat(D != null && D.status || D != null && D.statusText ? "response: ".concat(D
|
|
730
|
+
h?.code === 27 && n("requestfailed", { request_error: E.type + "_" + E.action, request_url: E.url, request_hostname: B(E.url), request_type: E.mediaType, request_error_code: D.status, request_error_text: D.statusText });
|
|
731
|
+
var S = "".concat(E != null && E.url ? "url: ".concat(E.url, `
|
|
732
|
+
`) : "") + "".concat(D != null && D.status || D != null && D.statusText ? "response: ".concat(D?.status, ", ").concat(D?.statusText, `
|
|
718
733
|
`) : "");
|
|
719
|
-
n("error", { player_error_code: h
|
|
734
|
+
n("error", { player_error_code: h?.code, player_error_message: h?.message, player_error_context: S });
|
|
720
735
|
};
|
|
721
736
|
t.on("error", g), t._stopMuxMonitor = function() {
|
|
722
|
-
t.off("manifestLoaded", o), t.off("initFragmentLoaded", v), t.off("mediaFragmentLoaded",
|
|
737
|
+
t.off("manifestLoaded", o), t.off("initFragmentLoaded", v), t.off("mediaFragmentLoaded", l), t.off("qualityChangeRendered", y), t.off("error", g), t.off("fragmentLoadingAbandoned", f), delete t._stopMuxMonitor;
|
|
723
738
|
};
|
|
724
|
-
},
|
|
739
|
+
}, ta = function(a) {
|
|
725
740
|
a && typeof a._stopMuxMonitor == "function" && a._stopMuxMonitor();
|
|
726
|
-
},
|
|
741
|
+
}, Ne = 0, aa = (function() {
|
|
727
742
|
function a() {
|
|
728
743
|
I(this, a), m(this, "_listeners", void 0);
|
|
729
744
|
}
|
|
730
|
-
return
|
|
731
|
-
return t._eventEmitterGuid = t._eventEmitterGuid || ++
|
|
745
|
+
return W(a, [{ key: "on", value: function(e, t, r) {
|
|
746
|
+
return t._eventEmitterGuid = t._eventEmitterGuid || ++Ne, this._listeners = this._listeners || {}, this._listeners[e] = this._listeners[e] || [], r && (t = t.bind(r)), this._listeners[e].push(t), t;
|
|
732
747
|
} }, { key: "off", value: function(e, t) {
|
|
733
748
|
var r = this._listeners && this._listeners[e];
|
|
734
749
|
r && r.forEach(function(i, n) {
|
|
@@ -736,7 +751,7 @@ var Wt = function(a) {
|
|
|
736
751
|
});
|
|
737
752
|
} }, { key: "one", value: function(e, t, r) {
|
|
738
753
|
var i = this;
|
|
739
|
-
t._eventEmitterGuid = t._eventEmitterGuid || ++
|
|
754
|
+
t._eventEmitterGuid = t._eventEmitterGuid || ++Ne;
|
|
740
755
|
var n = function() {
|
|
741
756
|
i.off(e, n), t.apply(r || this, arguments);
|
|
742
757
|
};
|
|
@@ -745,15 +760,15 @@ var Wt = function(a) {
|
|
|
745
760
|
var r = this;
|
|
746
761
|
if (this._listeners) {
|
|
747
762
|
t = t || {};
|
|
748
|
-
var i = this._listeners["before
|
|
749
|
-
|
|
750
|
-
|
|
763
|
+
var i = this._listeners["before" + e] || [], n = this._listeners["before*"] || [], o = this._listeners[e] || [], u = this._listeners["after" + e] || [], d = function(c, v) {
|
|
764
|
+
c = c.slice(), c.forEach(function(b) {
|
|
765
|
+
b.call(r, { type: e }, v);
|
|
751
766
|
});
|
|
752
767
|
};
|
|
753
|
-
|
|
768
|
+
d(i, t), d(n, t), d(o, t), d(u, t);
|
|
754
769
|
}
|
|
755
770
|
} }]), a;
|
|
756
|
-
}(),
|
|
771
|
+
})(), ra = aa, ke = C(U()), ia = (function() {
|
|
757
772
|
function a(e) {
|
|
758
773
|
var t = this;
|
|
759
774
|
I(this, a), m(this, "_playbackHeartbeatInterval", void 0), m(this, "_playheadShouldBeProgressing", void 0), m(this, "pm", void 0), this.pm = e, this._playbackHeartbeatInterval = null, this._playheadShouldBeProgressing = !1, e.on("playing", function() {
|
|
@@ -766,7 +781,7 @@ var Wt = function(a) {
|
|
|
766
781
|
t._playbackHeartbeatInterval !== null && (ke.default.clearInterval(t._playbackHeartbeatInterval), e.emit("playbackheartbeatend", { viewer_time: i.viewer_time }), t._playbackHeartbeatInterval = null);
|
|
767
782
|
});
|
|
768
783
|
}
|
|
769
|
-
return
|
|
784
|
+
return W(a, [{ key: "_startPlaybackHeartbeatInterval", value: function() {
|
|
770
785
|
var e = this;
|
|
771
786
|
this._playbackHeartbeatInterval === null && (this.pm.emit("playbackheartbeat"), this._playbackHeartbeatInterval = ke.default.setInterval(function() {
|
|
772
787
|
e.pm.emit("playbackheartbeat");
|
|
@@ -774,7 +789,7 @@ var Wt = function(a) {
|
|
|
774
789
|
} }, { key: "_stopPlaybackHeartbeatInterval", value: function() {
|
|
775
790
|
this._playheadShouldBeProgressing = !1, this._playbackHeartbeatInterval !== null && (ke.default.clearInterval(this._playbackHeartbeatInterval), this.pm.emit("playbackheartbeatend"), this._playbackHeartbeatInterval = null);
|
|
776
791
|
} }]), a;
|
|
777
|
-
}(),
|
|
792
|
+
})(), na = ia, oa = function a(e) {
|
|
778
793
|
var t = this;
|
|
779
794
|
I(this, a), m(this, "viewErrored", void 0), e.on("viewinit", function() {
|
|
780
795
|
t.viewErrored = !1;
|
|
@@ -789,20 +804,20 @@ var Wt = function(a) {
|
|
|
789
804
|
var r, i, n, o, u;
|
|
790
805
|
(r = e.data) === null || r === void 0 || delete r.player_error_code, (i = e.data) === null || i === void 0 || delete i.player_error_message, (n = e.data) === null || n === void 0 || delete n.player_error_context, (o = e.data) === null || o === void 0 || delete o.player_error_severity, (u = e.data) === null || u === void 0 || delete u.player_error_business_exception;
|
|
791
806
|
});
|
|
792
|
-
},
|
|
807
|
+
}, sa = oa, ua = (function() {
|
|
793
808
|
function a(e) {
|
|
794
809
|
I(this, a), m(this, "_watchTimeTrackerLastCheckedTime", void 0), m(this, "pm", void 0), this.pm = e, this._watchTimeTrackerLastCheckedTime = null, e.on("playbackheartbeat", this._updateWatchTime.bind(this)), e.on("playbackheartbeatend", this._clearWatchTimeState.bind(this));
|
|
795
810
|
}
|
|
796
|
-
return
|
|
811
|
+
return W(a, [{ key: "_updateWatchTime", value: function(e, t) {
|
|
797
812
|
var r = t.viewer_time;
|
|
798
|
-
this._watchTimeTrackerLastCheckedTime === null && (this._watchTimeTrackerLastCheckedTime = r),
|
|
813
|
+
this._watchTimeTrackerLastCheckedTime === null && (this._watchTimeTrackerLastCheckedTime = r), A(this.pm.data, "view_watch_time", r - this._watchTimeTrackerLastCheckedTime), this._watchTimeTrackerLastCheckedTime = r;
|
|
799
814
|
} }, { key: "_clearWatchTimeState", value: function(e, t) {
|
|
800
815
|
this._updateWatchTime(e, t), this._watchTimeTrackerLastCheckedTime = null;
|
|
801
816
|
} }]), a;
|
|
802
|
-
}(),
|
|
817
|
+
})(), da = ua, la = (function() {
|
|
803
818
|
function a(e) {
|
|
804
819
|
var t = this;
|
|
805
|
-
I(this, a), m(this, "_playbackTimeTrackerLastPlayheadPosition", void 0), m(this, "_lastTime", void 0), m(this, "_isAdPlaying", void 0), m(this, "_callbackUpdatePlaybackTime", void 0), m(this, "pm", void 0), this.pm = e, this._playbackTimeTrackerLastPlayheadPosition = -1, this._lastTime =
|
|
820
|
+
I(this, a), m(this, "_playbackTimeTrackerLastPlayheadPosition", void 0), m(this, "_lastTime", void 0), m(this, "_isAdPlaying", void 0), m(this, "_callbackUpdatePlaybackTime", void 0), m(this, "pm", void 0), this.pm = e, this._playbackTimeTrackerLastPlayheadPosition = -1, this._lastTime = P.now(), this._isAdPlaying = !1, this._callbackUpdatePlaybackTime = null;
|
|
806
821
|
var r = this._startPlaybackTimeTracking.bind(this);
|
|
807
822
|
e.on("playing", r), e.on("adplaying", r), e.on("seeked", r);
|
|
808
823
|
var i = this._stopPlaybackTimeTracking.bind(this);
|
|
@@ -819,18 +834,18 @@ var Wt = function(a) {
|
|
|
819
834
|
}), e.on("adplay", function() {
|
|
820
835
|
t._isAdPlaying = !1;
|
|
821
836
|
}), e.on("viewinit", function() {
|
|
822
|
-
t._playbackTimeTrackerLastPlayheadPosition = -1, t._lastTime =
|
|
837
|
+
t._playbackTimeTrackerLastPlayheadPosition = -1, t._lastTime = P.now(), t._isAdPlaying = !1, t._callbackUpdatePlaybackTime = null;
|
|
823
838
|
});
|
|
824
839
|
}
|
|
825
|
-
return
|
|
840
|
+
return W(a, [{ key: "_startPlaybackTimeTracking", value: function() {
|
|
826
841
|
this._callbackUpdatePlaybackTime === null && (this._callbackUpdatePlaybackTime = this._updatePlaybackTime.bind(this), this._playbackTimeTrackerLastPlayheadPosition = this.pm.data.player_playhead_time, this.pm.on("playbackheartbeat", this._callbackUpdatePlaybackTime));
|
|
827
842
|
} }, { key: "_stopPlaybackTimeTracking", value: function() {
|
|
828
843
|
this._callbackUpdatePlaybackTime && (this._updatePlaybackTime(), this.pm.off("playbackheartbeat", this._callbackUpdatePlaybackTime), this._callbackUpdatePlaybackTime = null, this._playbackTimeTrackerLastPlayheadPosition = -1);
|
|
829
844
|
} }, { key: "_updatePlaybackTime", value: function() {
|
|
830
|
-
var e = this.pm.data.player_playhead_time, t =
|
|
831
|
-
this._playbackTimeTrackerLastPlayheadPosition >= 0 && e > this._playbackTimeTrackerLastPlayheadPosition ? r = e - this._playbackTimeTrackerLastPlayheadPosition : this._isAdPlaying && (r = t - this._lastTime), r > 0 && r <= 1e3 &&
|
|
845
|
+
var e = this.pm.data.player_playhead_time, t = P.now(), r = -1;
|
|
846
|
+
this._playbackTimeTrackerLastPlayheadPosition >= 0 && e > this._playbackTimeTrackerLastPlayheadPosition ? r = e - this._playbackTimeTrackerLastPlayheadPosition : this._isAdPlaying && (r = t - this._lastTime), r > 0 && r <= 1e3 && A(this.pm.data, "view_content_playback_time", r), this._playbackTimeTrackerLastPlayheadPosition = e, this._lastTime = t;
|
|
832
847
|
} }]), a;
|
|
833
|
-
}(),
|
|
848
|
+
})(), ca = la, _a = (function() {
|
|
834
849
|
function a(e) {
|
|
835
850
|
I(this, a), m(this, "pm", void 0), this.pm = e;
|
|
836
851
|
var t = this._updatePlayheadTime.bind(this);
|
|
@@ -838,7 +853,7 @@ var Wt = function(a) {
|
|
|
838
853
|
e.off("timeupdate", t);
|
|
839
854
|
});
|
|
840
855
|
}
|
|
841
|
-
return
|
|
856
|
+
return W(a, [{ key: "_updateMaxPlayheadPosition", value: function() {
|
|
842
857
|
this.pm.data.view_max_playhead_position = typeof this.pm.data.view_max_playhead_position > "u" ? this.pm.data.player_playhead_time : Math.max(this.pm.data.view_max_playhead_position, this.pm.data.player_playhead_time);
|
|
843
858
|
} }, { key: "_updatePlayheadTime", value: function(e, t) {
|
|
844
859
|
var r = this, i = function() {
|
|
@@ -850,33 +865,33 @@ var Wt = function(a) {
|
|
|
850
865
|
typeof n < "u" && (this.pm.data.player_playhead_time = n, i(), this._updateMaxPlayheadPosition());
|
|
851
866
|
}
|
|
852
867
|
} }]), a;
|
|
853
|
-
}(),
|
|
868
|
+
})(), ha = _a, Ce = 300 * 1e3, pa = function a(e) {
|
|
854
869
|
if (I(this, a), !e.disableRebufferTracking) {
|
|
855
870
|
var t, r = function(n, o) {
|
|
856
871
|
i(o), t = void 0;
|
|
857
872
|
}, i = function(n) {
|
|
858
873
|
if (t) {
|
|
859
874
|
var o = n.viewer_time - t;
|
|
860
|
-
|
|
875
|
+
A(e.data, "view_rebuffer_duration", o), t = n.viewer_time, e.data.view_rebuffer_duration > Ce && (e.emit("viewend"), e.send("viewend"), e.mux.log.warn("Ending view after rebuffering for longer than ".concat(Ce, "ms, future events will be ignored unless a programchange or videochange occurs.")));
|
|
861
876
|
}
|
|
862
877
|
e.data.view_watch_time >= 0 && e.data.view_rebuffer_count > 0 && (e.data.view_rebuffer_frequency = e.data.view_rebuffer_count / e.data.view_watch_time, e.data.view_rebuffer_percentage = e.data.view_rebuffer_duration / e.data.view_watch_time);
|
|
863
878
|
};
|
|
864
879
|
e.on("playbackheartbeat", function(n, o) {
|
|
865
880
|
return i(o);
|
|
866
881
|
}), e.on("rebufferstart", function(n, o) {
|
|
867
|
-
t || (
|
|
882
|
+
t || (A(e.data, "view_rebuffer_count", 1), t = o.viewer_time, e.one("rebufferend", r));
|
|
868
883
|
}), e.on("viewinit", function() {
|
|
869
884
|
t = void 0, e.off("rebufferend", r);
|
|
870
885
|
});
|
|
871
886
|
}
|
|
872
|
-
},
|
|
887
|
+
}, fa = pa, va = (function() {
|
|
873
888
|
function a(e) {
|
|
874
889
|
var t = this;
|
|
875
890
|
I(this, a), m(this, "_lastCheckedTime", void 0), m(this, "_lastPlayheadTime", void 0), m(this, "_lastPlayheadTimeUpdatedTime", void 0), m(this, "_rebuffering", void 0), m(this, "pm", void 0), this.pm = e, !(e.disableRebufferTracking || e.disablePlayheadRebufferTracking) && (this._lastCheckedTime = null, this._lastPlayheadTime = null, this._lastPlayheadTimeUpdatedTime = null, e.on("playbackheartbeat", this._checkIfRebuffering.bind(this)), e.on("playbackheartbeatend", this._cleanupRebufferTracker.bind(this)), e.on("seeking", function() {
|
|
876
|
-
t._cleanupRebufferTracker(null, { viewer_time:
|
|
891
|
+
t._cleanupRebufferTracker(null, { viewer_time: P.now() });
|
|
877
892
|
}));
|
|
878
893
|
}
|
|
879
|
-
return
|
|
894
|
+
return W(a, [{ key: "_checkIfRebuffering", value: function(e, t) {
|
|
880
895
|
if (this.pm.seekingTracker.isSeeking || this.pm.adTracker.isAdBreak || !this.pm.playbackHeartbeat._playheadShouldBeProgressing) {
|
|
881
896
|
this._cleanupRebufferTracker(e, t);
|
|
882
897
|
return;
|
|
@@ -905,15 +920,15 @@ var Wt = function(a) {
|
|
|
905
920
|
}
|
|
906
921
|
r ? this._prepareRebufferTrackerState(t.viewer_time) : this._clearRebufferTrackerState();
|
|
907
922
|
} }]), a;
|
|
908
|
-
}(),
|
|
923
|
+
})(), ma = va, ya = (function() {
|
|
909
924
|
function a(e) {
|
|
910
925
|
var t = this;
|
|
911
|
-
I(this, a), m(this, "
|
|
926
|
+
I(this, a), m(this, "pm", void 0), this.pm = e, e.on("viewinit", function() {
|
|
912
927
|
var r = e.data, i = r.view_id;
|
|
913
928
|
if (!r.view_program_changed) {
|
|
914
929
|
var n = function(o, u) {
|
|
915
|
-
var
|
|
916
|
-
(o.type === "playing" && typeof e.data.view_time_to_first_frame > "u" || o.type === "adplaying" && (typeof e.data.view_time_to_first_frame > "u" || t._inPrerollPosition())) && t.calculateTimeToFirstFrame(
|
|
930
|
+
var d = u.viewer_time;
|
|
931
|
+
(o.type === "playing" && typeof e.data.view_time_to_first_frame > "u" || o.type === "adplaying" && (typeof e.data.view_time_to_first_frame > "u" || t._inPrerollPosition())) && t.calculateTimeToFirstFrame(d || P.now(), i);
|
|
917
932
|
};
|
|
918
933
|
e.one("playing", n), e.one("adplaying", n), e.one("viewend", function() {
|
|
919
934
|
e.off("playing", n), e.off("adplaying", n);
|
|
@@ -921,12 +936,12 @@ var Wt = function(a) {
|
|
|
921
936
|
}
|
|
922
937
|
});
|
|
923
938
|
}
|
|
924
|
-
return
|
|
939
|
+
return W(a, [{ key: "_inPrerollPosition", value: function() {
|
|
925
940
|
return typeof this.pm.data.view_content_playback_time > "u" || this.pm.data.view_content_playback_time <= 1e3;
|
|
926
941
|
} }, { key: "calculateTimeToFirstFrame", value: function(e, t) {
|
|
927
|
-
t === this.pm.data.view_id && (this.pm.watchTimeTracker._updateWatchTime(null, { viewer_time: e }), 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.
|
|
942
|
+
t === this.pm.data.view_id && (this.pm.watchTimeTracker._updateWatchTime(null, { viewer_time: e }), 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.pm.pageLoadInitTime && (this.pm.data.view_aggregate_startup_time = this.pm.data.view_start + this.pm.data.view_watch_time - this.pm.pageLoadInitTime));
|
|
928
943
|
} }]), a;
|
|
929
|
-
}(),
|
|
944
|
+
})(), ga = ya, ba = function a(e) {
|
|
930
945
|
var t = this;
|
|
931
946
|
I(this, a), m(this, "_lastPlayerHeight", void 0), m(this, "_lastPlayerWidth", void 0), m(this, "_lastPlayheadPosition", void 0), m(this, "_lastSourceHeight", void 0), m(this, "_lastSourceWidth", void 0), e.on("viewinit", function() {
|
|
932
947
|
t._lastPlayheadPosition = -1;
|
|
@@ -940,8 +955,8 @@ var Wt = function(a) {
|
|
|
940
955
|
t._lastPlayheadPosition = -1;
|
|
941
956
|
return;
|
|
942
957
|
}
|
|
943
|
-
var u = Math.min(t._lastPlayerWidth / t._lastSourceWidth, t._lastPlayerHeight / t._lastSourceHeight),
|
|
944
|
-
e.data.view_max_upscale_percentage = Math.max(e.data.view_max_upscale_percentage || 0,
|
|
958
|
+
var u = Math.min(t._lastPlayerWidth / t._lastSourceWidth, t._lastPlayerHeight / t._lastSourceHeight), d = Math.max(0, u - 1), c = Math.max(0, 1 - u);
|
|
959
|
+
e.data.view_max_upscale_percentage = Math.max(e.data.view_max_upscale_percentage || 0, d), e.data.view_max_downscale_percentage = Math.max(e.data.view_max_downscale_percentage || 0, c), A(e.data, "view_total_content_playback_time", o), A(e.data, "view_total_upscaling", d * o), A(e.data, "view_total_downscaling", c * o);
|
|
945
960
|
}
|
|
946
961
|
t._lastPlayheadPosition = -1;
|
|
947
962
|
});
|
|
@@ -950,34 +965,34 @@ var Wt = function(a) {
|
|
|
950
965
|
t._lastPlayheadPosition = e.data.player_playhead_time, t._lastPlayerWidth = e.data.player_width, t._lastPlayerHeight = e.data.player_height, t._lastSourceWidth = e.data.video_source_width, t._lastSourceHeight = e.data.video_source_height;
|
|
951
966
|
});
|
|
952
967
|
});
|
|
953
|
-
},
|
|
968
|
+
}, wa = ba, Ta = 2e3, ka = function a(e) {
|
|
954
969
|
var t = this;
|
|
955
970
|
I(this, a), m(this, "isSeeking", void 0), this.isSeeking = !1;
|
|
956
971
|
var r = -1, i = function() {
|
|
957
|
-
var n =
|
|
958
|
-
|
|
972
|
+
var n = P.now(), o = (e.data.viewer_time || n) - (r || n);
|
|
973
|
+
A(e.data, "view_seek_duration", o), e.data.view_max_seek_time = Math.max(e.data.view_max_seek_time || 0, o), t.isSeeking = !1, r = -1;
|
|
959
974
|
};
|
|
960
975
|
e.on("seeking", function(n, o) {
|
|
961
|
-
if (Object.assign(e.data, o), t.isSeeking && o.viewer_time - r <=
|
|
976
|
+
if (Object.assign(e.data, o), t.isSeeking && o.viewer_time - r <= Ta) {
|
|
962
977
|
r = o.viewer_time;
|
|
963
978
|
return;
|
|
964
979
|
}
|
|
965
|
-
t.isSeeking && i(), t.isSeeking = !0, r = o.viewer_time,
|
|
980
|
+
t.isSeeking && i(), t.isSeeking = !0, r = o.viewer_time, A(e.data, "view_seek_count", 1), e.send("seeking");
|
|
966
981
|
}), e.on("seeked", function() {
|
|
967
982
|
i();
|
|
968
983
|
}), e.on("viewend", function() {
|
|
969
984
|
t.isSeeking && (i(), e.send("seeked")), t.isSeeking = !1, r = -1;
|
|
970
985
|
});
|
|
971
|
-
},
|
|
986
|
+
}, Ea = ka, je = function(a, e) {
|
|
972
987
|
a.push(e), a.sort(function(t, r) {
|
|
973
988
|
return t.viewer_time - r.viewer_time;
|
|
974
989
|
});
|
|
975
|
-
},
|
|
990
|
+
}, xa = ["adbreakstart", "adrequest", "adresponse", "adplay", "adplaying", "adpause", "adended", "adbreakend", "aderror", "adclicked", "adskipped"], Da = (function() {
|
|
976
991
|
function a(e) {
|
|
977
992
|
var t = this;
|
|
978
993
|
I(this, a), m(this, "_adHasPlayed", void 0), m(this, "_adRequests", void 0), m(this, "_adResponses", void 0), m(this, "_currentAdRequestNumber", void 0), m(this, "_currentAdResponseNumber", void 0), m(this, "_prerollPlayTime", void 0), m(this, "_wouldBeNewAdPlay", void 0), m(this, "isAdBreak", void 0), m(this, "pm", void 0), this.pm = e, e.on("viewinit", function() {
|
|
979
994
|
t.isAdBreak = !1, t._currentAdRequestNumber = 0, t._currentAdResponseNumber = 0, t._adRequests = [], t._adResponses = [], t._adHasPlayed = !1, t._wouldBeNewAdPlay = !0, t._prerollPlayTime = void 0;
|
|
980
|
-
}),
|
|
995
|
+
}), xa.forEach(function(i) {
|
|
981
996
|
return e.on(i, t._updateAdData.bind(t));
|
|
982
997
|
});
|
|
983
998
|
var r = function() {
|
|
@@ -986,78 +1001,78 @@ var Wt = function(a) {
|
|
|
986
1001
|
e.on("adbreakstart", function() {
|
|
987
1002
|
t.isAdBreak = !0;
|
|
988
1003
|
}), e.on("play", r), e.on("playing", r), e.on("viewend", r), e.on("adrequest", function(i, n) {
|
|
989
|
-
n = Object.assign({ ad_request_id: "generatedAdRequestId" + t._currentAdRequestNumber++ }, n), je(t._adRequests, n),
|
|
1004
|
+
n = Object.assign({ ad_request_id: "generatedAdRequestId" + t._currentAdRequestNumber++ }, n), je(t._adRequests, n), A(e.data, "view_ad_request_count"), t.inPrerollPosition() && (e.data.view_preroll_requested = !0, t._adHasPlayed || A(e.data, "view_preroll_request_count"));
|
|
990
1005
|
}), e.on("adresponse", function(i, n) {
|
|
991
1006
|
n = Object.assign({ ad_request_id: "generatedAdRequestId" + t._currentAdResponseNumber++ }, n), je(t._adResponses, n);
|
|
992
1007
|
var o = t.findAdRequest(n.ad_request_id);
|
|
993
|
-
o &&
|
|
1008
|
+
o && A(e.data, "view_ad_request_time", Math.max(0, n.viewer_time - o.viewer_time));
|
|
994
1009
|
}), e.on("adplay", function(i, n) {
|
|
995
|
-
t._adHasPlayed = !0, t._wouldBeNewAdPlay && (t._wouldBeNewAdPlay = !1,
|
|
1010
|
+
t._adHasPlayed = !0, t._wouldBeNewAdPlay && (t._wouldBeNewAdPlay = !1, A(e.data, "view_ad_played_count")), t.inPrerollPosition() && !e.data.view_preroll_played && (e.data.view_preroll_played = !0, t._adRequests.length > 0 && (e.data.view_preroll_request_time = Math.max(0, n.viewer_time - t._adRequests[0].viewer_time)), e.data.view_start && (e.data.view_startup_preroll_request_time = Math.max(0, n.viewer_time - e.data.view_start)), t._prerollPlayTime = n.viewer_time);
|
|
996
1011
|
}), e.on("adplaying", function(i, n) {
|
|
997
1012
|
t.inPrerollPosition() && typeof e.data.view_preroll_load_time > "u" && typeof t._prerollPlayTime < "u" && (e.data.view_preroll_load_time = n.viewer_time - t._prerollPlayTime, e.data.view_startup_preroll_load_time = n.viewer_time - t._prerollPlayTime);
|
|
998
1013
|
}), e.on("adclicked", function(i, n) {
|
|
999
|
-
t._wouldBeNewAdPlay ||
|
|
1014
|
+
t._wouldBeNewAdPlay || A(e.data, "view_ad_clicked_count");
|
|
1000
1015
|
}), e.on("adskipped", function(i, n) {
|
|
1001
|
-
t._wouldBeNewAdPlay ||
|
|
1016
|
+
t._wouldBeNewAdPlay || A(e.data, "view_ad_skipped_count");
|
|
1002
1017
|
}), e.on("adended", function() {
|
|
1003
1018
|
t._wouldBeNewAdPlay = !0;
|
|
1004
1019
|
}), e.on("aderror", function() {
|
|
1005
1020
|
t._wouldBeNewAdPlay = !0;
|
|
1006
1021
|
});
|
|
1007
1022
|
}
|
|
1008
|
-
return
|
|
1023
|
+
return W(a, [{ key: "inPrerollPosition", value: function() {
|
|
1009
1024
|
return typeof this.pm.data.view_content_playback_time > "u" || this.pm.data.view_content_playback_time <= 1e3;
|
|
1010
1025
|
} }, { key: "findAdRequest", value: function(e) {
|
|
1011
1026
|
for (var t = 0; t < this._adRequests.length; t++) if (this._adRequests[t].ad_request_id === e) return this._adRequests[t];
|
|
1012
1027
|
} }, { key: "_updateAdData", value: function(e, t) {
|
|
1013
1028
|
if (this.inPrerollPosition()) {
|
|
1014
1029
|
if (!this.pm.data.view_preroll_ad_tag_hostname && t.ad_tag_url) {
|
|
1015
|
-
var r =
|
|
1030
|
+
var r = Q(le(t.ad_tag_url), 2), i = r[0], n = r[1];
|
|
1016
1031
|
this.pm.data.view_preroll_ad_tag_domain = n, this.pm.data.view_preroll_ad_tag_hostname = i;
|
|
1017
1032
|
}
|
|
1018
1033
|
if (!this.pm.data.view_preroll_ad_asset_hostname && t.ad_asset_url) {
|
|
1019
|
-
var o =
|
|
1020
|
-
this.pm.data.view_preroll_ad_asset_domain =
|
|
1034
|
+
var o = Q(le(t.ad_asset_url), 2), u = o[0], d = o[1];
|
|
1035
|
+
this.pm.data.view_preroll_ad_asset_domain = d, this.pm.data.view_preroll_ad_asset_hostname = u;
|
|
1021
1036
|
}
|
|
1022
1037
|
}
|
|
1023
|
-
this.pm.data.ad_asset_url = t
|
|
1038
|
+
this.pm.data.ad_asset_url = t?.ad_asset_url, this.pm.data.ad_tag_url = t?.ad_tag_url, this.pm.data.ad_creative_id = t?.ad_creative_id, this.pm.data.ad_id = t?.ad_id, this.pm.data.ad_universal_id = t?.ad_universal_id;
|
|
1024
1039
|
} }]), a;
|
|
1025
|
-
}(),
|
|
1040
|
+
})(), qa = Da, He = C(U()), Ra = function a(e) {
|
|
1026
1041
|
I(this, a);
|
|
1027
1042
|
var t, r, i = function() {
|
|
1028
|
-
e.disableRebufferTracking || (
|
|
1043
|
+
e.disableRebufferTracking || (A(e.data, "view_waiting_rebuffer_count", 1), t = P.now(), r = He.default.setInterval(function() {
|
|
1029
1044
|
if (t) {
|
|
1030
|
-
var c =
|
|
1031
|
-
|
|
1045
|
+
var c = P.now();
|
|
1046
|
+
A(e.data, "view_waiting_rebuffer_duration", c - t), t = c;
|
|
1032
1047
|
}
|
|
1033
1048
|
}, 250));
|
|
1034
1049
|
}, n = function() {
|
|
1035
|
-
e.disableRebufferTracking || t && (
|
|
1050
|
+
e.disableRebufferTracking || t && (A(e.data, "view_waiting_rebuffer_duration", P.now() - t), t = !1, He.default.clearInterval(r));
|
|
1036
1051
|
}, o = !1, u = function() {
|
|
1037
1052
|
o = !0;
|
|
1038
|
-
},
|
|
1053
|
+
}, d = function() {
|
|
1039
1054
|
o = !1, n();
|
|
1040
1055
|
};
|
|
1041
1056
|
e.on("waiting", function() {
|
|
1042
1057
|
o && i();
|
|
1043
1058
|
}), e.on("playing", function() {
|
|
1044
1059
|
n(), u();
|
|
1045
|
-
}), e.on("pause",
|
|
1046
|
-
},
|
|
1060
|
+
}), e.on("pause", d), e.on("seeking", d);
|
|
1061
|
+
}, Sa = Ra, Oa = function a(e) {
|
|
1047
1062
|
var t = this;
|
|
1048
1063
|
I(this, a), m(this, "lastWallClockTime", void 0);
|
|
1049
1064
|
var r = function() {
|
|
1050
|
-
t.lastWallClockTime =
|
|
1065
|
+
t.lastWallClockTime = P.now(), e.on("before*", i);
|
|
1051
1066
|
}, i = function(n) {
|
|
1052
|
-
var o =
|
|
1067
|
+
var o = P.now(), u = t.lastWallClockTime;
|
|
1053
1068
|
t.lastWallClockTime = o, o - u > 3e4 && (e.emit("devicesleep", { viewer_time: u }), Object.assign(e.data, { viewer_time: u }), e.send("devicesleep"), e.emit("devicewake", { viewer_time: o }), Object.assign(e.data, { viewer_time: o }), e.send("devicewake"));
|
|
1054
1069
|
};
|
|
1055
1070
|
e.one("playbackheartbeat", r), e.on("playbackheartbeatend", function() {
|
|
1056
1071
|
e.off("before*", i), e.one("playbackheartbeat", r);
|
|
1057
1072
|
});
|
|
1058
|
-
},
|
|
1073
|
+
}, Aa = Oa, Ee = C(U()), tt = (function(a) {
|
|
1059
1074
|
return a();
|
|
1060
|
-
}(function() {
|
|
1075
|
+
})(function() {
|
|
1061
1076
|
var a = function() {
|
|
1062
1077
|
for (var t = 0, r = {}; t < arguments.length; t++) {
|
|
1063
1078
|
var i = arguments[t];
|
|
@@ -1071,8 +1086,8 @@ var Wt = function(a) {
|
|
|
1071
1086
|
if (typeof document < "u") {
|
|
1072
1087
|
if (arguments.length > 1) {
|
|
1073
1088
|
if (o = a({ path: "/" }, r.defaults, o), typeof o.expires == "number") {
|
|
1074
|
-
var
|
|
1075
|
-
|
|
1089
|
+
var d = /* @__PURE__ */ new Date();
|
|
1090
|
+
d.setMilliseconds(d.getMilliseconds() + o.expires * 864e5), o.expires = d;
|
|
1076
1091
|
}
|
|
1077
1092
|
try {
|
|
1078
1093
|
u = JSON.stringify(n), /^[\{\[]/.test(u) && (n = u);
|
|
@@ -1082,10 +1097,10 @@ var Wt = function(a) {
|
|
|
1082
1097
|
}
|
|
1083
1098
|
i || (u = {});
|
|
1084
1099
|
for (var c = document.cookie ? document.cookie.split("; ") : [], v = /(%[0-9A-Z]{2})+/g, b = 0; b < c.length; b++) {
|
|
1085
|
-
var
|
|
1100
|
+
var l = c[b].split("="), s = l.slice(1).join("=");
|
|
1086
1101
|
s.charAt(0) === '"' && (s = s.slice(1, -1));
|
|
1087
1102
|
try {
|
|
1088
|
-
var _ =
|
|
1103
|
+
var _ = l[0].replace(v, decodeURIComponent);
|
|
1089
1104
|
if (s = t.read ? t.read(s, _) : t(s, _) || s.replace(v, decodeURIComponent), this.json) try {
|
|
1090
1105
|
s = JSON.parse(s);
|
|
1091
1106
|
} catch {
|
|
@@ -1111,46 +1126,46 @@ var Wt = function(a) {
|
|
|
1111
1126
|
}
|
|
1112
1127
|
return e(function() {
|
|
1113
1128
|
});
|
|
1114
|
-
}),
|
|
1129
|
+
}), at = "muxData", Pa = function(a) {
|
|
1115
1130
|
return Object.entries(a).map(function(e) {
|
|
1116
|
-
var t =
|
|
1131
|
+
var t = Q(e, 2), r = t[0], i = t[1];
|
|
1117
1132
|
return "".concat(r, "=").concat(i);
|
|
1118
1133
|
}).join("&");
|
|
1119
|
-
},
|
|
1134
|
+
}, La = function(a) {
|
|
1120
1135
|
return a.split("&").reduce(function(e, t) {
|
|
1121
|
-
var r =
|
|
1136
|
+
var r = Q(t.split("="), 2), i = r[0], n = r[1], o = +n, u = n && o == n ? o : n;
|
|
1122
1137
|
return e[i] = u, e;
|
|
1123
1138
|
}, {});
|
|
1124
|
-
},
|
|
1139
|
+
}, rt = function() {
|
|
1125
1140
|
var a;
|
|
1126
1141
|
try {
|
|
1127
|
-
a =
|
|
1142
|
+
a = La(tt.get(at) || "");
|
|
1128
1143
|
} catch {
|
|
1129
1144
|
a = {};
|
|
1130
1145
|
}
|
|
1131
1146
|
return a;
|
|
1132
|
-
},
|
|
1147
|
+
}, it = function(a) {
|
|
1133
1148
|
try {
|
|
1134
|
-
|
|
1149
|
+
tt.set(at, Pa(a), { expires: 365 });
|
|
1135
1150
|
} catch {
|
|
1136
1151
|
}
|
|
1137
|
-
},
|
|
1138
|
-
var a =
|
|
1139
|
-
return a.mux_viewer_id = a.mux_viewer_id || de(), a.msn = a.msn || Math.random(),
|
|
1152
|
+
}, Ia = function() {
|
|
1153
|
+
var a = rt();
|
|
1154
|
+
return a.mux_viewer_id = a.mux_viewer_id || de(), a.msn = a.msn || Math.random(), it(a), { mux_viewer_id: a.mux_viewer_id, mux_sample_number: a.msn };
|
|
1140
1155
|
}, Na = function() {
|
|
1141
|
-
var a =
|
|
1142
|
-
return a.session_start && (a.sst = a.session_start, delete a.session_start), a.session_id && (a.sid = a.session_id, delete a.session_id), a.session_expires && (a.sex = a.session_expires, delete a.session_expires), (!a.sex || a.sex < e) && (a.sid = de(), a.sst = e), a.sex = e +
|
|
1156
|
+
var a = rt(), e = P.now();
|
|
1157
|
+
return a.session_start && (a.sst = a.session_start, delete a.session_start), a.session_id && (a.sid = a.session_id, delete a.session_id), a.session_expires && (a.sex = a.session_expires, delete a.session_expires), (!a.sex || a.sex < e) && (a.sid = de(), a.sst = e), a.sex = e + 1500 * 1e3, it(a), { session_id: a.sid, session_start: a.sst, session_expires: a.sex };
|
|
1143
1158
|
};
|
|
1144
|
-
function
|
|
1159
|
+
function Ca(a, e) {
|
|
1145
1160
|
var t = e.beaconCollectionDomain, r = e.beaconDomain;
|
|
1146
1161
|
if (t) return "https://" + t;
|
|
1147
1162
|
a = a || "inferred";
|
|
1148
1163
|
var i = r || "litix.io";
|
|
1149
1164
|
return a.match(/^[a-z0-9]+$/) ? "https://" + a + "." + i : "https://img.litix.io/a.gif";
|
|
1150
1165
|
}
|
|
1151
|
-
var
|
|
1166
|
+
var ja = C(U()), nt = function() {
|
|
1152
1167
|
var a;
|
|
1153
|
-
switch (
|
|
1168
|
+
switch (ot()) {
|
|
1154
1169
|
case "cellular":
|
|
1155
1170
|
a = "cellular";
|
|
1156
1171
|
break;
|
|
@@ -1166,38 +1181,38 @@ var Ia = C(U()), it = function() {
|
|
|
1166
1181
|
a = "other";
|
|
1167
1182
|
}
|
|
1168
1183
|
return a;
|
|
1169
|
-
},
|
|
1170
|
-
var a =
|
|
1184
|
+
}, ot = function() {
|
|
1185
|
+
var a = ja.default.navigator, e = a && (a.connection || a.mozConnection || a.webkitConnection);
|
|
1171
1186
|
return e && e.type;
|
|
1172
1187
|
};
|
|
1173
|
-
|
|
1174
|
-
var
|
|
1175
|
-
function
|
|
1188
|
+
nt.getConnectionFromAPI = ot;
|
|
1189
|
+
var Ha = nt, Ma = { 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" }, Ba = st(Ma), Ua = { ad: "ad", af: "affiliate", ag: "aggregate", ap: "api", al: "application", ao: "audio", ar: "architecture", as: "asset", au: "autoplay", av: "average", bi: "bitrate", bn: "brand", br: "break", bw: "browser", by: "bytes", bz: "business", ca: "cached", cb: "cancel", cc: "codec", cd: "code", cg: "category", ch: "changed", ci: "client", ck: "clicked", cl: "canceled", cm: "cmcd", cn: "config", co: "count", ce: "counter", cp: "complete", cq: "creator", cr: "creative", cs: "captions", ct: "content", cu: "current", cx: "connection", cz: "context", dg: "downscaling", dm: "domain", dn: "cdn", do: "downscale", dr: "drm", dp: "dropped", du: "duration", dv: "device", dy: "dynamic", eb: "enabled", 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", or: "origin", os: "os", pa: "paused", pb: "playback", pd: "producer", pe: "percentage", pf: "played", pg: "program", ph: "playhead", pi: "plugin", pl: "preroll", pn: "playing", po: "poster", pp: "pip", pr: "preload", ps: "position", pt: "part", pv: "previous", py: "property", px: "pop", pz: "plan", ra: "rate", rd: "requested", re: "rebuffer", rf: "rendition", rg: "range", rm: "remote", ro: "ratio", rp: "response", rq: "request", rs: "requests", sa: "sample", sd: "skipped", se: "session", sh: "shift", sk: "seek", sm: "stream", so: "source", sq: "sequence", sr: "series", ss: "status", 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" }, Me = st(Ua);
|
|
1190
|
+
function st(a) {
|
|
1176
1191
|
var e = {};
|
|
1177
1192
|
for (var t in a) a.hasOwnProperty(t) && (e[a[t]] = t);
|
|
1178
1193
|
return e;
|
|
1179
1194
|
}
|
|
1180
|
-
function
|
|
1195
|
+
function Se(a) {
|
|
1181
1196
|
var e = {}, t = {};
|
|
1182
1197
|
return Object.keys(a).forEach(function(r) {
|
|
1183
1198
|
var i = !1;
|
|
1184
1199
|
if (a.hasOwnProperty(r) && a[r] !== void 0) {
|
|
1185
|
-
var n = r.split("_"), o = n[0], u =
|
|
1186
|
-
u || (
|
|
1187
|
-
|
|
1200
|
+
var n = r.split("_"), o = n[0], u = Ba[o];
|
|
1201
|
+
u || (q.info("Data key word `" + n[0] + "` not expected in " + r), u = o + "_"), n.splice(1).forEach(function(d) {
|
|
1202
|
+
d === "url" && (i = !0), Me[d] ? u += Me[d] : Number.isInteger(Number(d)) ? u += d : (q.info("Data key word `" + d + "` not expected in " + r), u += "_" + d + "_");
|
|
1188
1203
|
}), i ? t[u] = a[r] : e[u] = a[r];
|
|
1189
1204
|
}
|
|
1190
1205
|
}), Object.assign(e, t);
|
|
1191
1206
|
}
|
|
1192
|
-
var X = C(U()),
|
|
1207
|
+
var X = C(U()), Fa = C(Ye()), Wa = { maxBeaconSize: 300, maxQueueLength: 3600, baseTimeBetweenBeacons: 1e4, maxPayloadKBSize: 500 }, Qa = 56 * 1024, Ga = ["hb", "requestcompleted", "requestfailed", "requestcanceled"], Va = "https://img.litix.io", G = function(a) {
|
|
1193
1208
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1194
|
-
this._beaconUrl = a || Va, this._eventQueue = [], this._postInFlight = !1, this._resendAfterPost = !1, this._failureCount = 0, this._sendTimeout = !1, this._options = Object.assign({},
|
|
1209
|
+
this._beaconUrl = a || Va, this._eventQueue = [], this._postInFlight = !1, this._resendAfterPost = !1, this._failureCount = 0, this._sendTimeout = !1, this._options = Object.assign({}, Wa, e);
|
|
1195
1210
|
};
|
|
1196
|
-
|
|
1211
|
+
G.prototype.queueEvent = function(a, e) {
|
|
1197
1212
|
var t = Object.assign({}, e);
|
|
1198
1213
|
return this._eventQueue.length <= this._options.maxQueueLength || a === "eventrateexceeded" ? (this._eventQueue.push(t), this._sendTimeout || this._startBeaconSending(), this._eventQueue.length <= this._options.maxQueueLength) : !1;
|
|
1199
1214
|
};
|
|
1200
|
-
|
|
1215
|
+
G.prototype.flushEvents = function() {
|
|
1201
1216
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1202
1217
|
if (a && this._eventQueue.length === 1) {
|
|
1203
1218
|
this._eventQueue.pop();
|
|
@@ -1205,18 +1220,18 @@ W.prototype.flushEvents = function() {
|
|
|
1205
1220
|
}
|
|
1206
1221
|
this._eventQueue.length && this._sendBeaconQueue(), this._startBeaconSending();
|
|
1207
1222
|
};
|
|
1208
|
-
|
|
1223
|
+
G.prototype.destroy = function() {
|
|
1209
1224
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1210
1225
|
this.destroyed = !0, a ? this._clearBeaconQueue() : this.flushEvents(), X.default.clearTimeout(this._sendTimeout);
|
|
1211
1226
|
};
|
|
1212
|
-
|
|
1227
|
+
G.prototype._clearBeaconQueue = function() {
|
|
1213
1228
|
var a = this._eventQueue.length > this._options.maxBeaconSize ? this._eventQueue.length - this._options.maxBeaconSize : 0, e = this._eventQueue.slice(a);
|
|
1214
|
-
a > 0 && Object.assign(e[e.length - 1],
|
|
1229
|
+
a > 0 && Object.assign(e[e.length - 1], Se({ mux_view_message: "event queue truncated" }));
|
|
1215
1230
|
var t = this._createPayload(e);
|
|
1216
|
-
|
|
1231
|
+
ut(this._beaconUrl, t, !0, function() {
|
|
1217
1232
|
});
|
|
1218
1233
|
};
|
|
1219
|
-
|
|
1234
|
+
G.prototype._sendBeaconQueue = function() {
|
|
1220
1235
|
var a = this;
|
|
1221
1236
|
if (this._postInFlight) {
|
|
1222
1237
|
this._resendAfterPost = !0;
|
|
@@ -1224,50 +1239,50 @@ W.prototype._sendBeaconQueue = function() {
|
|
|
1224
1239
|
}
|
|
1225
1240
|
var e = this._eventQueue.slice(0, this._options.maxBeaconSize);
|
|
1226
1241
|
this._eventQueue = this._eventQueue.slice(this._options.maxBeaconSize), this._postInFlight = !0;
|
|
1227
|
-
var t = this._createPayload(e), r =
|
|
1228
|
-
|
|
1229
|
-
n ? (a._eventQueue = e.concat(a._eventQueue), a._failureCount += 1,
|
|
1242
|
+
var t = this._createPayload(e), r = P.now();
|
|
1243
|
+
ut(this._beaconUrl, t, !1, function(i, n) {
|
|
1244
|
+
n ? (a._eventQueue = e.concat(a._eventQueue), a._failureCount += 1, q.info("Error sending beacon: " + n)) : a._failureCount = 0, a._roundTripTime = P.now() - r, a._postInFlight = !1, a._resendAfterPost && (a._resendAfterPost = !1, a._eventQueue.length > 0 && a._sendBeaconQueue());
|
|
1230
1245
|
});
|
|
1231
1246
|
};
|
|
1232
|
-
|
|
1247
|
+
G.prototype._getNextBeaconTime = function() {
|
|
1233
1248
|
if (!this._failureCount) return this._options.baseTimeBetweenBeacons;
|
|
1234
1249
|
var a = Math.pow(2, this._failureCount - 1);
|
|
1235
1250
|
return a = a * Math.random(), (1 + a) * this._options.baseTimeBetweenBeacons;
|
|
1236
1251
|
};
|
|
1237
|
-
|
|
1252
|
+
G.prototype._startBeaconSending = function() {
|
|
1238
1253
|
var a = this;
|
|
1239
1254
|
X.default.clearTimeout(this._sendTimeout), !this.destroyed && (this._sendTimeout = X.default.setTimeout(function() {
|
|
1240
1255
|
a._eventQueue.length && a._sendBeaconQueue(), a._startBeaconSending();
|
|
1241
1256
|
}, this._getNextBeaconTime()));
|
|
1242
1257
|
};
|
|
1243
|
-
|
|
1244
|
-
var e = this, t = { transmission_timestamp: Math.round(
|
|
1258
|
+
G.prototype._createPayload = function(a) {
|
|
1259
|
+
var e = this, t = { transmission_timestamp: Math.round(P.now()) };
|
|
1245
1260
|
this._roundTripTime && (t.rtt_ms = Math.round(this._roundTripTime));
|
|
1246
1261
|
var r, i, n, o = function() {
|
|
1247
1262
|
r = JSON.stringify({ metadata: t, events: i || a }), n = r.length / 1024;
|
|
1248
1263
|
}, u = function() {
|
|
1249
1264
|
return n <= e._options.maxPayloadKBSize;
|
|
1250
1265
|
};
|
|
1251
|
-
return o(), u() || (
|
|
1252
|
-
return
|
|
1253
|
-
}), o()), u() || (
|
|
1254
|
-
for (var c in
|
|
1255
|
-
var v =
|
|
1256
|
-
typeof v == "string" && v.length > b && (
|
|
1266
|
+
return o(), u() || (q.info("Payload size is too big (" + n + " kb). Removing unnecessary events."), i = a.filter(function(d) {
|
|
1267
|
+
return Ga.indexOf(d.e) === -1;
|
|
1268
|
+
}), o()), u() || (q.info("Payload size still too big (" + n + " kb). Cropping fields.."), i.forEach(function(d) {
|
|
1269
|
+
for (var c in d) {
|
|
1270
|
+
var v = d[c], b = 50 * 1024;
|
|
1271
|
+
typeof v == "string" && v.length > b && (d[c] = v.substring(0, b));
|
|
1257
1272
|
}
|
|
1258
1273
|
}), o()), r;
|
|
1259
1274
|
};
|
|
1260
|
-
var
|
|
1261
|
-
return a.length <=
|
|
1275
|
+
var Ja = typeof Fa.default.exitPictureInPicture == "function" ? function(a) {
|
|
1276
|
+
return a.length <= Qa;
|
|
1262
1277
|
} : function(a) {
|
|
1263
1278
|
return !1;
|
|
1264
|
-
},
|
|
1279
|
+
}, ut = function(a, e, t, r) {
|
|
1265
1280
|
if (t && navigator && navigator.sendBeacon && navigator.sendBeacon(a, e)) {
|
|
1266
1281
|
r();
|
|
1267
1282
|
return;
|
|
1268
1283
|
}
|
|
1269
1284
|
if (X.default.fetch) {
|
|
1270
|
-
X.default.fetch(a, { method: "POST", body: e, headers: { "Content-Type": "text/plain" }, keepalive:
|
|
1285
|
+
X.default.fetch(a, { method: "POST", body: e, headers: { "Content-Type": "text/plain" }, keepalive: Ja(e) }).then(function(n) {
|
|
1271
1286
|
return r(null, n.ok ? null : "Error");
|
|
1272
1287
|
}).catch(function(n) {
|
|
1273
1288
|
return r(null, n);
|
|
@@ -1282,53 +1297,53 @@ var Ga = typeof Ma.default.exitPictureInPicture == "function" ? function(a) {
|
|
|
1282
1297
|
return;
|
|
1283
1298
|
}
|
|
1284
1299
|
r();
|
|
1285
|
-
},
|
|
1300
|
+
}, za = G, Ka = ["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"], Ya = ["adplay", "adplaying", "adpause", "adfirstquartile", "admidpoint", "adthirdquartile", "adended", "adresponse", "adrequest"], Xa = ["ad_id", "ad_creative_id", "ad_universal_id"], Za = ["viewstart", "error", "ended", "viewend"], $a = 600 * 1e3, er = (function() {
|
|
1286
1301
|
function a(e, t) {
|
|
1287
1302
|
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1288
1303
|
I(this, a);
|
|
1289
|
-
var i, n, o, u,
|
|
1290
|
-
m(this, "mux", void 0), m(this, "envKey", void 0), m(this, "options", void 0), m(this, "eventQueue", void 0), m(this, "sampleRate", void 0), m(this, "disableCookies", void 0), m(this, "respectDoNotTrack", void 0), m(this, "previousBeaconData", void 0), m(this, "lastEventTime", void 0), m(this, "rateLimited", void 0), m(this, "pageLevelData", void 0), m(this, "viewerData", void 0), this.mux = e, this.envKey = t, this.options = r, this.previousBeaconData = null, this.lastEventTime = 0, this.rateLimited = !1, this.eventQueue = new
|
|
1304
|
+
var i, n, o, u, d, c, v, b, l, s, _, y;
|
|
1305
|
+
m(this, "mux", void 0), m(this, "envKey", void 0), m(this, "options", void 0), m(this, "eventQueue", void 0), m(this, "sampleRate", void 0), m(this, "disableCookies", void 0), m(this, "respectDoNotTrack", void 0), m(this, "previousBeaconData", void 0), m(this, "lastEventTime", void 0), m(this, "rateLimited", void 0), m(this, "pageLevelData", void 0), m(this, "viewerData", void 0), this.mux = e, this.envKey = t, this.options = r, this.previousBeaconData = null, this.lastEventTime = 0, this.rateLimited = !1, this.eventQueue = new za(Ca(this.envKey, this.options));
|
|
1291
1306
|
var f;
|
|
1292
1307
|
this.sampleRate = (f = this.options.sampleRate) !== null && f !== void 0 ? f : 1;
|
|
1293
1308
|
var g;
|
|
1294
1309
|
this.disableCookies = (g = this.options.disableCookies) !== null && g !== void 0 ? g : !1;
|
|
1295
1310
|
var p;
|
|
1296
|
-
this.respectDoNotTrack = (p = this.options.respectDoNotTrack) !== null && p !== void 0 ? p : !1, this.previousBeaconData = null, this.lastEventTime = 0, this.rateLimited = !1, this.pageLevelData = { mux_api_version: this.mux.API_VERSION, mux_embed: this.mux.NAME, mux_embed_version: this.mux.VERSION, viewer_application_name: (i = this.options.platform) === null || i === void 0 ? void 0 : i.name, viewer_application_version: (n = this.options.platform) === null || n === void 0 ? void 0 : n.version, viewer_application_engine: (o = this.options.platform) === null || o === void 0 ? void 0 : o.layout, viewer_device_name: (u = this.options.platform) === null || u === void 0 ? void 0 : u.product, viewer_device_category: "", viewer_device_manufacturer: (
|
|
1311
|
+
this.respectDoNotTrack = (p = this.options.respectDoNotTrack) !== null && p !== void 0 ? p : !1, this.previousBeaconData = null, this.lastEventTime = 0, this.rateLimited = !1, this.pageLevelData = { mux_api_version: this.mux.API_VERSION, mux_embed: this.mux.NAME, mux_embed_version: this.mux.VERSION, viewer_application_name: (i = this.options.platform) === null || i === void 0 ? void 0 : i.name, viewer_application_version: (n = this.options.platform) === null || n === void 0 ? void 0 : n.version, viewer_application_engine: (o = this.options.platform) === null || o === void 0 ? void 0 : o.layout, viewer_device_name: (u = this.options.platform) === null || u === void 0 ? void 0 : u.product, viewer_device_category: "", viewer_device_manufacturer: (d = this.options.platform) === null || d === void 0 ? void 0 : d.manufacturer, viewer_os_family: (v = this.options.platform) === null || v === void 0 || (c = v.os) === null || c === void 0 ? void 0 : c.family, viewer_os_architecture: (l = this.options.platform) === null || l === void 0 || (b = l.os) === null || b === void 0 ? void 0 : b.architecture, viewer_os_version: (_ = this.options.platform) === null || _ === void 0 || (s = _.os) === null || s === void 0 ? void 0 : s.version, viewer_connection_type: Ha(), page_url: Ee.default === null || Ee.default === void 0 || (y = Ee.default.location) === null || y === void 0 ? void 0 : y.href }, this.viewerData = this.disableCookies ? {} : Ia();
|
|
1297
1312
|
}
|
|
1298
|
-
return
|
|
1313
|
+
return W(a, [{ key: "send", value: function(e, t) {
|
|
1299
1314
|
if (!(!e || !(t != null && t.view_id))) {
|
|
1300
|
-
if (this.respectDoNotTrack &&
|
|
1301
|
-
if (!t || typeof t != "object") return
|
|
1302
|
-
var r = this.disableCookies ? {} : Na(), i =
|
|
1315
|
+
if (this.respectDoNotTrack && qe()) return q.info("Not sending `" + e + "` because Do Not Track is enabled");
|
|
1316
|
+
if (!t || typeof t != "object") return q.error("A data object was expected in send() but was not provided");
|
|
1317
|
+
var r = this.disableCookies ? {} : Na(), i = Oe(fe({}, this.pageLevelData, t, r, this.viewerData), { event: e, env_key: this.envKey });
|
|
1303
1318
|
i.user_id && (i.viewer_user_id = i.user_id, delete i.user_id);
|
|
1304
|
-
var n, o = ((n = i.mux_sample_number) !== null && n !== void 0 ? n : 0) >= this.sampleRate, u = this._deduplicateBeaconData(e, i),
|
|
1305
|
-
if (this.lastEventTime = this.mux.utils.now(), o) return
|
|
1306
|
-
if (this.envKey ||
|
|
1307
|
-
if (
|
|
1308
|
-
else if (this.mux.WINDOW_HIDDEN && e === "hb" ? this.eventQueue.flushEvents(!0) :
|
|
1319
|
+
var n, o = ((n = i.mux_sample_number) !== null && n !== void 0 ? n : 0) >= this.sampleRate, u = this._deduplicateBeaconData(e, i), d = Se(u);
|
|
1320
|
+
if (this.lastEventTime = this.mux.utils.now(), o) return q.info("Not sending event due to sample rate restriction", e, i, d);
|
|
1321
|
+
if (this.envKey || q.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL", e, i, d), !this.rateLimited) {
|
|
1322
|
+
if (q.info("Sending event", e, i, d), this.rateLimited = !this.eventQueue.queueEvent(e, d), this.mux.WINDOW_UNLOADING && e === "viewend") this.eventQueue.destroy(!0);
|
|
1323
|
+
else if (this.mux.WINDOW_HIDDEN && e === "hb" ? this.eventQueue.flushEvents(!0) : Za.indexOf(e) >= 0 && this.eventQueue.flushEvents(), this.rateLimited) return i.event = "eventrateexceeded", d = Se(i), this.eventQueue.queueEvent(i.event, d), q.error("Beaconing disabled due to rate limit.");
|
|
1309
1324
|
}
|
|
1310
1325
|
}
|
|
1311
1326
|
} }, { key: "destroy", value: function() {
|
|
1312
1327
|
this.eventQueue.destroy(!1);
|
|
1313
1328
|
} }, { key: "_deduplicateBeaconData", value: function(e, t) {
|
|
1314
1329
|
var r = this, i = {}, n = t.view_id;
|
|
1315
|
-
if (n === "-1" || e === "viewstart" || e === "viewend" || !this.previousBeaconData || this.mux.utils.now() - this.lastEventTime >=
|
|
1330
|
+
if (n === "-1" || e === "viewstart" || e === "viewend" || !this.previousBeaconData || this.mux.utils.now() - this.lastEventTime >= $a) i = fe({}, t), n && (this.previousBeaconData = i), n && e === "viewend" && (this.previousBeaconData = null);
|
|
1316
1331
|
else {
|
|
1317
1332
|
var o = e.indexOf("request") === 0;
|
|
1318
1333
|
Object.entries(t).forEach(function(u) {
|
|
1319
|
-
var
|
|
1320
|
-
r.previousBeaconData && (v !== r.previousBeaconData[c] ||
|
|
1334
|
+
var d = Q(u, 2), c = d[0], v = d[1];
|
|
1335
|
+
r.previousBeaconData && (v !== r.previousBeaconData[c] || Ka.indexOf(c) > -1 || r.objectHasChanged(o, c, v, r.previousBeaconData[c]) || r.eventRequiresKey(e, c)) && (i[c] = v, r.previousBeaconData[c] = v);
|
|
1321
1336
|
});
|
|
1322
1337
|
}
|
|
1323
1338
|
return i;
|
|
1324
1339
|
} }, { key: "objectHasChanged", value: function(e, t, r, i) {
|
|
1325
1340
|
return !e || t.indexOf("request_") !== 0 ? !1 : t === "request_response_headers" || typeof r != "object" || typeof i != "object" ? !0 : Object.keys(r || {}).length !== Object.keys(i || {}).length;
|
|
1326
1341
|
} }, { key: "eventRequiresKey", value: function(e, t) {
|
|
1327
|
-
return !!(e === "renditionchange" && t.indexOf("video_source_") === 0 ||
|
|
1342
|
+
return !!(e === "renditionchange" && t.indexOf("video_source_") === 0 || Xa.includes(t) && Ya.includes(e));
|
|
1328
1343
|
} }]), a;
|
|
1329
|
-
}(),
|
|
1344
|
+
})(), tr = function a(e) {
|
|
1330
1345
|
I(this, a);
|
|
1331
|
-
var t = 0, r = 0, i = 0, n = 0, o = 0, u = 0,
|
|
1346
|
+
var t = 0, r = 0, i = 0, n = 0, o = 0, u = 0, d = 0, c = function(l, s) {
|
|
1332
1347
|
var _ = s.request_start, y = s.request_response_start, f = s.request_response_end, g = s.request_bytes_loaded;
|
|
1333
1348
|
n++;
|
|
1334
1349
|
var p, h;
|
|
@@ -1336,91 +1351,120 @@ var Ga = typeof Ma.default.exitPictureInPicture == "function" ? function(a) {
|
|
|
1336
1351
|
var w = g / h * 8e3;
|
|
1337
1352
|
o++, r += g, i += h, e.data.view_min_request_throughput = Math.min(e.data.view_min_request_throughput || 1 / 0, w), e.data.view_average_request_throughput = r / i * 8e3, e.data.view_request_count = n, p > 0 && (t += p, e.data.view_max_request_latency = Math.max(e.data.view_max_request_latency || 0, p), e.data.view_average_request_latency = t / o);
|
|
1338
1353
|
}
|
|
1339
|
-
}, v = function(
|
|
1354
|
+
}, v = function(l, s) {
|
|
1340
1355
|
n++, u++, e.data.view_request_count = n, e.data.view_request_failed_count = u;
|
|
1341
|
-
}, b = function(
|
|
1342
|
-
n++,
|
|
1356
|
+
}, b = function(l, s) {
|
|
1357
|
+
n++, d++, e.data.view_request_count = n, e.data.view_request_canceled_count = d;
|
|
1343
1358
|
};
|
|
1344
1359
|
e.on("requestcompleted", c), e.on("requestfailed", v), e.on("requestcanceled", b);
|
|
1345
|
-
},
|
|
1360
|
+
}, ar = tr, rr = 3600 * 1e3, ir = function a(e) {
|
|
1346
1361
|
var t = this;
|
|
1347
1362
|
I(this, a), m(this, "_lastEventTime", void 0), e.on("before*", function(r, i) {
|
|
1348
|
-
var n = i.viewer_time, o =
|
|
1349
|
-
if (t._lastEventTime = o, u && o - u >
|
|
1350
|
-
var
|
|
1363
|
+
var n = i.viewer_time, o = P.now(), u = t._lastEventTime;
|
|
1364
|
+
if (t._lastEventTime = o, u && o - u > rr) {
|
|
1365
|
+
var d = Object.keys(e.data).reduce(function(v, b) {
|
|
1351
1366
|
return b.indexOf("video_") === 0 ? Object.assign(v, m({}, b, e.data[b])) : v;
|
|
1352
1367
|
}, {});
|
|
1353
1368
|
e.mux.log.info("Received event after at least an hour inactivity, creating a new view");
|
|
1354
1369
|
var c = e.playbackHeartbeat._playheadShouldBeProgressing;
|
|
1355
|
-
e._resetView(Object.assign({ viewer_time: n },
|
|
1370
|
+
e._resetView(Object.assign({ viewer_time: n }, d)), e.playbackHeartbeat._playheadShouldBeProgressing = c, e.playbackHeartbeat._playheadShouldBeProgressing && r.type !== "play" && r.type !== "adbreakstart" && (e.emit("play", { viewer_time: n }), r.type !== "playing" && e.emit("playing", { viewer_time: n }));
|
|
1371
|
+
}
|
|
1372
|
+
});
|
|
1373
|
+
}, nr = ir, or = function a(e) {
|
|
1374
|
+
I(this, a);
|
|
1375
|
+
var t = function(u) {
|
|
1376
|
+
var d = sr(u), c = ur(u);
|
|
1377
|
+
if (d != null && !Be(d, n) && o <= c) {
|
|
1378
|
+
n = d, o = c;
|
|
1379
|
+
var v = { video_cdn: d };
|
|
1380
|
+
e.emit("cdnchange", v);
|
|
1356
1381
|
}
|
|
1382
|
+
}, r = null, i = null, n = null, o = 0;
|
|
1383
|
+
e.on("viewinit", function() {
|
|
1384
|
+
r = null, i = null, n = null, o = 0;
|
|
1385
|
+
}), e.on("beforecdnchange", function(u, d) {
|
|
1386
|
+
var c = d?.video_cdn;
|
|
1387
|
+
c && (typeof d.video_previous_cdn > "u" || d.video_previous_cdn === null) && (Be(c, i) ? d.video_previous_cdn = r ?? void 0 : (d.video_previous_cdn = i ?? void 0, r = i, i = c));
|
|
1388
|
+
}), e.on("requestcompleted", function(u, d) {
|
|
1389
|
+
t(d);
|
|
1357
1390
|
});
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
|
|
1391
|
+
};
|
|
1392
|
+
function Be(a, e) {
|
|
1393
|
+
return a?.toLowerCase() === e?.toLowerCase();
|
|
1394
|
+
}
|
|
1395
|
+
function sr(a) {
|
|
1396
|
+
var e;
|
|
1397
|
+
return a != null && a.request_type && (a.request_type === "media" || a.request_type === "video") && !((e = a.request_response_headers) === null || e === void 0) && e["x-cdn"] ? a.request_response_headers["x-cdn"] : a != null && a.video_cdn ? a.video_cdn : null;
|
|
1398
|
+
}
|
|
1399
|
+
function ur(a) {
|
|
1400
|
+
return a != null && a.request_start ? a.request_start : a != null && a.viewer_time ? a.viewer_time : Date.now();
|
|
1401
|
+
}
|
|
1402
|
+
var dr = or, lr = ["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", "cdnchange"], cr = /* @__PURE__ */ new Set(["requestcompleted", "requestfailed", "requestcanceled"]), _r = (function(a) {
|
|
1403
|
+
Ht(t, a);
|
|
1404
|
+
var e = Wt(t);
|
|
1361
1405
|
function t(r, i, n) {
|
|
1362
1406
|
I(this, t);
|
|
1363
1407
|
var o;
|
|
1364
|
-
o = e.call(this), m(T(o), "
|
|
1365
|
-
var u = { debug: !1, minimumRebufferDuration: 250, sustainedRebufferThreshold: 1e3, playbackHeartbeatTime: 25, beaconDomain: "litix.io", sampleRate: 1, disableCookies: !1, respectDoNotTrack: !1, disableRebufferTracking: !1, disablePlayheadRebufferTracking: !1, errorTranslator: function(
|
|
1366
|
-
return
|
|
1408
|
+
o = e.call(this), m(T(o), "pageLoadEndTime", void 0), m(T(o), "pageLoadInitTime", void 0), m(T(o), "_destroyed", void 0), m(T(o), "_heartBeatTimeout", void 0), m(T(o), "adTracker", void 0), m(T(o), "dashjs", void 0), m(T(o), "data", void 0), m(T(o), "disablePlayheadRebufferTracking", void 0), m(T(o), "disableRebufferTracking", void 0), m(T(o), "errorTracker", void 0), m(T(o), "errorTranslator", void 0), m(T(o), "emitTranslator", void 0), m(T(o), "getAdData", void 0), m(T(o), "getPlayheadTime", void 0), m(T(o), "getStateData", void 0), m(T(o), "stateDataTranslator", void 0), m(T(o), "hlsjs", void 0), m(T(o), "id", void 0), m(T(o), "longResumeTracker", void 0), m(T(o), "minimumRebufferDuration", void 0), m(T(o), "mux", void 0), m(T(o), "playbackEventDispatcher", void 0), m(T(o), "playbackHeartbeat", void 0), m(T(o), "playbackHeartbeatTime", void 0), m(T(o), "playheadTime", void 0), m(T(o), "seekingTracker", void 0), m(T(o), "sustainedRebufferThreshold", void 0), m(T(o), "watchTimeTracker", void 0), m(T(o), "currentFragmentPDT", void 0), m(T(o), "currentFragmentStart", void 0), o.pageLoadInitTime = pe.navigationStart(), o.pageLoadEndTime = pe.domContentLoadedEventEnd();
|
|
1409
|
+
var u = { debug: !1, minimumRebufferDuration: 250, sustainedRebufferThreshold: 1e3, playbackHeartbeatTime: 25, beaconDomain: "litix.io", sampleRate: 1, disableCookies: !1, respectDoNotTrack: !1, disableRebufferTracking: !1, disablePlayheadRebufferTracking: !1, errorTranslator: function(l) {
|
|
1410
|
+
return l;
|
|
1367
1411
|
}, emitTranslator: function() {
|
|
1368
|
-
for (var
|
|
1412
|
+
for (var l = arguments.length, s = new Array(l), _ = 0; _ < l; _++) s[_] = arguments[_];
|
|
1369
1413
|
return s;
|
|
1370
|
-
}, stateDataTranslator: function(
|
|
1371
|
-
return
|
|
1414
|
+
}, stateDataTranslator: function(l) {
|
|
1415
|
+
return l;
|
|
1372
1416
|
} };
|
|
1373
|
-
o.mux = r, o.id = i, n != null && n.beaconDomain && o.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."), n = Object.assign(u, n), n.data = n.data || {}, n.data.property_key && (n.data.env_key = n.data.property_key, delete n.data.property_key),
|
|
1417
|
+
o.mux = r, o.id = i, n != null && n.beaconDomain && o.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."), n = Object.assign(u, n), n.data = n.data || {}, n.data.property_key && (n.data.env_key = n.data.property_key, delete n.data.property_key), q.level = n.debug ? Y.DEBUG : Y.WARN, o.getPlayheadTime = n.getPlayheadTime, o.getStateData = n.getStateData || function() {
|
|
1374
1418
|
return {};
|
|
1375
1419
|
}, o.getAdData = n.getAdData || function() {
|
|
1376
|
-
}, o.minimumRebufferDuration = n.minimumRebufferDuration, o.sustainedRebufferThreshold = n.sustainedRebufferThreshold, o.playbackHeartbeatTime = n.playbackHeartbeatTime, o.disableRebufferTracking = n.disableRebufferTracking, o.disableRebufferTracking && o.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."), o.disablePlayheadRebufferTracking = n.disablePlayheadRebufferTracking, o.errorTranslator = n.errorTranslator, o.emitTranslator = n.emitTranslator, o.stateDataTranslator = n.stateDataTranslator, o.playbackEventDispatcher = new
|
|
1377
|
-
var
|
|
1420
|
+
}, o.minimumRebufferDuration = n.minimumRebufferDuration, o.sustainedRebufferThreshold = n.sustainedRebufferThreshold, o.playbackHeartbeatTime = n.playbackHeartbeatTime, o.disableRebufferTracking = n.disableRebufferTracking, o.disableRebufferTracking && o.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."), o.disablePlayheadRebufferTracking = n.disablePlayheadRebufferTracking, o.errorTranslator = n.errorTranslator, o.emitTranslator = n.emitTranslator, o.stateDataTranslator = n.stateDataTranslator, o.playbackEventDispatcher = new er(r, n.data.env_key, n), o.data = { player_instance_id: de(), mux_sample_rate: n.sampleRate, beacon_domain: n.beaconCollectionDomain || n.beaconDomain }, o.data.view_sequence_number = 1, o.data.player_sequence_number = 1;
|
|
1421
|
+
var d = (function() {
|
|
1378
1422
|
typeof this.data.view_start > "u" && (this.data.view_start = this.mux.utils.now(), this.emit("viewstart"));
|
|
1379
1423
|
}).bind(T(o));
|
|
1380
|
-
if (o.on("viewinit", function(
|
|
1381
|
-
this._resetVideoData(), this._resetViewData(), this._resetErrorData(), this._updateStateData(), Object.assign(this.data, s), this._initializeViewData(), this.one("play",
|
|
1382
|
-
}), o.on("videochange", function(
|
|
1424
|
+
if (o.on("viewinit", function(l, s) {
|
|
1425
|
+
this._resetVideoData(), this._resetViewData(), this._resetErrorData(), this._updateStateData(), Object.assign(this.data, s), this._initializeViewData(), this.one("play", d), this.one("adbreakstart", d);
|
|
1426
|
+
}), o.on("videochange", function(l, s) {
|
|
1383
1427
|
this._resetView(s);
|
|
1384
|
-
}), o.on("programchange", function(
|
|
1385
|
-
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."), this._resetView(Object.assign(s, { view_program_changed: !0 })),
|
|
1386
|
-
}), o.on("fragmentchange", function(
|
|
1428
|
+
}), o.on("programchange", function(l, s) {
|
|
1429
|
+
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."), this._resetView(Object.assign(s, { view_program_changed: !0 })), d(), this.emit("play"), this.emit("playing");
|
|
1430
|
+
}), o.on("fragmentchange", function(l, s) {
|
|
1387
1431
|
this.currentFragmentPDT = s.currentFragmentPDT, this.currentFragmentStart = s.currentFragmentStart;
|
|
1388
1432
|
}), o.on("destroy", o.destroy), typeof window < "u" && typeof window.addEventListener == "function" && typeof window.removeEventListener == "function") {
|
|
1389
1433
|
var c = function() {
|
|
1390
|
-
var
|
|
1391
|
-
o.mux.WINDOW_HIDDEN = document.visibilityState === "hidden",
|
|
1434
|
+
var l = typeof o.data.view_start < "u";
|
|
1435
|
+
o.mux.WINDOW_HIDDEN = document.visibilityState === "hidden", l && o.mux.WINDOW_HIDDEN && (o.data.player_is_paused || o.emit("hb"));
|
|
1392
1436
|
};
|
|
1393
1437
|
window.addEventListener("visibilitychange", c, !1);
|
|
1394
|
-
var v = function(
|
|
1395
|
-
|
|
1438
|
+
var v = function(l) {
|
|
1439
|
+
l.persisted || o.destroy();
|
|
1396
1440
|
};
|
|
1397
1441
|
window.addEventListener("pagehide", v, !1), o.on("destroy", function() {
|
|
1398
1442
|
window.removeEventListener("visibilitychange", c), window.removeEventListener("pagehide", v);
|
|
1399
1443
|
});
|
|
1400
1444
|
}
|
|
1401
|
-
o.on("playerready", function(
|
|
1445
|
+
o.on("playerready", function(l, s) {
|
|
1402
1446
|
Object.assign(this.data, s);
|
|
1403
|
-
}),
|
|
1404
|
-
o.on(
|
|
1405
|
-
|
|
1406
|
-
}), o.on("after" +
|
|
1407
|
-
(
|
|
1447
|
+
}), lr.forEach(function(l) {
|
|
1448
|
+
o.on(l, function(s, _) {
|
|
1449
|
+
l.indexOf("ad") !== 0 && this._updateStateData(), Object.assign(this.data, _), this._sanitizeData();
|
|
1450
|
+
}), o.on("after" + l, function() {
|
|
1451
|
+
(l !== "error" || this.errorTracker.viewErrored) && this.send(l);
|
|
1408
1452
|
});
|
|
1409
|
-
}), o.on("viewend", function(
|
|
1453
|
+
}), o.on("viewend", function(l, s) {
|
|
1410
1454
|
Object.assign(o.data, s);
|
|
1411
1455
|
});
|
|
1412
|
-
var b = function(
|
|
1456
|
+
var b = function(l) {
|
|
1413
1457
|
var s = this.mux.utils.now();
|
|
1414
|
-
this.data.player_init_time && (this.data.player_startup_time = s - this.data.player_init_time), !this.mux.PLAYER_TRACKED && this.
|
|
1458
|
+
this.data.player_init_time && (this.data.player_startup_time = s - this.data.player_init_time), this.pageLoadInitTime = this.data.page_load_init_time || this.pageLoadInitTime, this.pageLoadEndTime = this.data.page_load_end_time || this.pageLoadEndTime, !this.mux.PLAYER_TRACKED && this.pageLoadInitTime && (this.mux.PLAYER_TRACKED = !0, (this.data.player_init_time || this.pageLoadEndTime) && (this.data.page_load_time = Math.min(this.data.player_init_time || 1 / 0, this.pageLoadEndTime || 1 / 0) - this.pageLoadInitTime)), this.send("playerready"), delete this.data.player_startup_time, delete this.data.page_load_time;
|
|
1415
1459
|
};
|
|
1416
|
-
return o.one("playerready", b), o.longResumeTracker = new
|
|
1460
|
+
return o.one("playerready", b), o.longResumeTracker = new nr(T(o)), o.errorTracker = new sa(T(o)), new Aa(T(o)), o.seekingTracker = new Ea(T(o)), o.playheadTime = new ha(T(o)), o.playbackHeartbeat = new na(T(o)), new wa(T(o)), o.watchTimeTracker = new da(T(o)), new ca(T(o)), o.adTracker = new qa(T(o)), new ma(T(o)), new fa(T(o)), new ga(T(o)), new Sa(T(o)), new ar(T(o)), new dr(T(o)), n.hlsjs && o.addHLSJS(n), n.dashjs && o.addDashJS(n), o.emit("viewinit", n.data), o;
|
|
1417
1461
|
}
|
|
1418
|
-
return
|
|
1462
|
+
return W(t, [{ key: "emit", value: function(r, i) {
|
|
1419
1463
|
var n, o = Object.assign({ viewer_time: this.mux.utils.now() }, i), u = [r, o];
|
|
1420
1464
|
if (this.emitTranslator) try {
|
|
1421
1465
|
u = this.emitTranslator(r, o);
|
|
1422
|
-
} catch (
|
|
1423
|
-
this.mux.log.warn("Exception in emit translator callback.",
|
|
1466
|
+
} catch (d) {
|
|
1467
|
+
this.mux.log.warn("Exception in emit translator callback.", d);
|
|
1424
1468
|
}
|
|
1425
1469
|
u != null && u.length && (n = _e(te(t.prototype), "emit", this)).call.apply(n, [this].concat(M(u)));
|
|
1426
1470
|
} }, { key: "destroy", value: function() {
|
|
@@ -1431,21 +1475,26 @@ var Ga = typeof Ma.default.exitPictureInPicture == "function" ? function(a) {
|
|
|
1431
1475
|
if (i.video_source_is_live === void 0 && (i.player_source_duration === 1 / 0 || i.video_source_duration === 1 / 0 ? i.video_source_is_live = !0 : (i.player_source_duration > 0 || i.video_source_duration > 0) && (i.video_source_is_live = !1)), i.video_source_is_live || n.forEach(function(c) {
|
|
1432
1476
|
i[c] = void 0;
|
|
1433
1477
|
}), i.video_source_url = i.video_source_url || i.player_source_url, i.video_source_url) {
|
|
1434
|
-
var o =
|
|
1435
|
-
i.video_source_domain =
|
|
1478
|
+
var o = Q(le(i.video_source_url), 2), u = o[0], d = o[1];
|
|
1479
|
+
i.video_source_domain = d, i.video_source_hostname = u;
|
|
1436
1480
|
}
|
|
1437
|
-
delete i.ad_request_id, this.playbackEventDispatcher.send(r, i), this.data.view_sequence_number++, this.data.player_sequence_number++,
|
|
1481
|
+
delete i.ad_request_id, this.playbackEventDispatcher.send(r, i), this.data.view_sequence_number++, this.data.player_sequence_number++, cr.has(r) || this._restartHeartBeat(), r === "viewend" && delete this.data.view_id;
|
|
1438
1482
|
}
|
|
1439
1483
|
} }, { key: "_resetView", value: function(r) {
|
|
1440
1484
|
this.emit("viewend"), this.send("viewend"), this.emit("viewinit", r);
|
|
1441
1485
|
} }, { key: "_updateStateData", value: function() {
|
|
1442
|
-
var r = this.getStateData();
|
|
1486
|
+
var r, i = this.getStateData();
|
|
1443
1487
|
if (typeof this.stateDataTranslator == "function") try {
|
|
1444
|
-
|
|
1445
|
-
} catch (
|
|
1446
|
-
this.mux.log.warn("Exception in stateDataTranslator translator callback.",
|
|
1488
|
+
i = this.stateDataTranslator(i);
|
|
1489
|
+
} catch (o) {
|
|
1490
|
+
this.mux.log.warn("Exception in stateDataTranslator translator callback.", o);
|
|
1491
|
+
}
|
|
1492
|
+
if (!((r = this.data) === null || r === void 0) && r.video_cdn && i != null && i.video_cdn) {
|
|
1493
|
+
i.video_cdn;
|
|
1494
|
+
var n = Bt(i, ["video_cdn"]);
|
|
1495
|
+
i = n;
|
|
1447
1496
|
}
|
|
1448
|
-
Object.assign(this.data,
|
|
1497
|
+
Object.assign(this.data, i), this.playheadTime._updatePlayheadTime(), this._sanitizeData();
|
|
1449
1498
|
} }, { key: "_sanitizeData", value: function() {
|
|
1450
1499
|
var r = this, i = ["player_width", "player_height", "video_source_width", "video_source_height", "player_playhead_time", "video_source_bitrate"];
|
|
1451
1500
|
i.forEach(function(o) {
|
|
@@ -1473,7 +1522,7 @@ var Ga = typeof Ma.default.exitPictureInPicture == "function" ? function(a) {
|
|
|
1473
1522
|
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;
|
|
1474
1523
|
} }, { key: "_initializeViewData", value: function() {
|
|
1475
1524
|
var r = this, i = this.data.view_id = de(), n = function() {
|
|
1476
|
-
i === r.data.view_id &&
|
|
1525
|
+
i === r.data.view_id && A(r.data, "player_view_count", 1);
|
|
1477
1526
|
};
|
|
1478
1527
|
this.data.player_is_paused ? this.one("play", n) : n();
|
|
1479
1528
|
} }, { key: "_restartHeartBeat", value: function() {
|
|
@@ -1490,9 +1539,9 @@ var Ga = typeof Ma.default.exitPictureInPicture == "function" ? function(a) {
|
|
|
1490
1539
|
this.mux.log.warn("An instance of HLS.js is already being monitored for this player.");
|
|
1491
1540
|
return;
|
|
1492
1541
|
}
|
|
1493
|
-
this.hlsjs = r.hlsjs,
|
|
1542
|
+
this.hlsjs = r.hlsjs, Kt(this.mux, this.id, r.hlsjs, {}, r.Hls || window.Hls);
|
|
1494
1543
|
} }, { key: "removeHLSJS", value: function() {
|
|
1495
|
-
this.hlsjs && (
|
|
1544
|
+
this.hlsjs && (Yt(this.hlsjs), this.hlsjs = void 0);
|
|
1496
1545
|
} }, { key: "addDashJS", value: function(r) {
|
|
1497
1546
|
if (!r.dashjs) {
|
|
1498
1547
|
this.mux.log.warn("You must pass a valid dashjs instance in order to track it.");
|
|
@@ -1502,17 +1551,17 @@ var Ga = typeof Ma.default.exitPictureInPicture == "function" ? function(a) {
|
|
|
1502
1551
|
this.mux.log.warn("An instance of Dash.js is already being monitored for this player.");
|
|
1503
1552
|
return;
|
|
1504
1553
|
}
|
|
1505
|
-
this.dashjs = r.dashjs,
|
|
1554
|
+
this.dashjs = r.dashjs, ea(this.mux, this.id, r.dashjs);
|
|
1506
1555
|
} }, { key: "removeDashJS", value: function() {
|
|
1507
|
-
this.dashjs && (
|
|
1556
|
+
this.dashjs && (ta(this.dashjs), this.dashjs = void 0);
|
|
1508
1557
|
} }]), t;
|
|
1509
|
-
}(
|
|
1510
|
-
function
|
|
1558
|
+
})(ra), hr = _r, oe = C(Ye());
|
|
1559
|
+
function pr() {
|
|
1511
1560
|
return oe.default && !!(oe.default.fullscreenElement || oe.default.webkitFullscreenElement || oe.default.mozFullScreenElement || oe.default.msFullscreenElement);
|
|
1512
1561
|
}
|
|
1513
|
-
var
|
|
1514
|
-
function
|
|
1515
|
-
var r =
|
|
1562
|
+
var fr = ["loadstart", "pause", "play", "playing", "seeking", "seeked", "timeupdate", "ratechange", "stalled", "waiting", "error", "ended"], vr = { 1: "MEDIA_ERR_ABORTED", 2: "MEDIA_ERR_NETWORK", 3: "MEDIA_ERR_DECODE", 4: "MEDIA_ERR_SRC_NOT_SUPPORTED" };
|
|
1563
|
+
function mr(a, e, t) {
|
|
1564
|
+
var r = Q(he(e), 3), i = r[0], n = r[1], o = r[2], u = a.log, d = a.utils.getComputedStyle, c = a.utils.secondsToMs, v = { automaticErrorTracking: !0 };
|
|
1516
1565
|
if (i) {
|
|
1517
1566
|
if (o !== "video" && o !== "audio") return u.error("The element of `" + n + "` was not a media element.");
|
|
1518
1567
|
} else return u.error("No element was found with the `" + n + "` query selector.");
|
|
@@ -1520,7 +1569,7 @@ function lr(a, e, t) {
|
|
|
1520
1569
|
var b = { getPlayheadTime: function() {
|
|
1521
1570
|
return c(i.currentTime);
|
|
1522
1571
|
}, getStateData: function() {
|
|
1523
|
-
var s, _, y, f = ((s = (_ = this).getPlayheadTime) === null || s === void 0 ? void 0 : s.call(_)) || c(i.currentTime), g = this.hlsjs && this.hlsjs.url, p = this.dashjs && typeof this.dashjs.getSource == "function" && this.dashjs.getSource(), h = { player_is_paused: i.paused, player_width: parseInt(
|
|
1572
|
+
var s, _, y, f = ((s = (_ = this).getPlayheadTime) === null || s === void 0 ? void 0 : s.call(_)) || c(i.currentTime), g = this.hlsjs && this.hlsjs.url, p = this.dashjs && typeof this.dashjs.getSource == "function" && this.dashjs.getSource(), h = { player_is_paused: i.paused, player_width: parseInt(d(i, "width")), player_height: parseInt(d(i, "height")), player_autoplay_on: i.autoplay, player_preload_on: i.preload, player_language_code: i.lang, player_is_fullscreen: pr(), video_poster_url: i.poster, video_source_url: g || p || i.currentSrc, video_source_duration: c(i.duration), video_source_height: i.videoHeight, video_source_width: i.videoWidth, view_dropped_frame_count: i == null || (y = i.getVideoPlaybackQuality) === null || y === void 0 ? void 0 : y.call(i).droppedVideoFrames };
|
|
1524
1573
|
if (i.getStartDate && f > 0) {
|
|
1525
1574
|
var w = i.getStartDate();
|
|
1526
1575
|
if (w && typeof w.getTime == "function" && w.getTime()) {
|
|
@@ -1538,15 +1587,15 @@ function lr(a, e, t) {
|
|
|
1538
1587
|
}, i.mux.updateData = function(s) {
|
|
1539
1588
|
i.mux.emit("hb", s);
|
|
1540
1589
|
};
|
|
1541
|
-
var
|
|
1590
|
+
var l = function() {
|
|
1542
1591
|
u.error("The monitor for this video element has already been destroyed.");
|
|
1543
1592
|
};
|
|
1544
1593
|
i.mux.destroy = function() {
|
|
1545
1594
|
Object.keys(i.mux.listeners).forEach(function(s) {
|
|
1546
1595
|
i.removeEventListener(s, i.mux.listeners[s], !1);
|
|
1547
|
-
}), delete i.mux.listeners, i.mux.destroy =
|
|
1596
|
+
}), delete i.mux.listeners, i.mux.destroy = l, i.mux.swapElement = l, i.mux.emit = l, i.mux.addHLSJS = l, i.mux.addDashJS = l, i.mux.removeHLSJS = l, i.mux.removeDashJS = l, i.mux.updateData = l, i.mux.setEmitTranslator = l, i.mux.setStateDataTranslator = l, i.mux.setGetPlayheadTime = l, i.mux.deleted = !0, a.emit(n, "destroy");
|
|
1548
1597
|
}, i.mux.swapElement = function(s) {
|
|
1549
|
-
var _ =
|
|
1598
|
+
var _ = Q(he(s), 3), y = _[0], f = _[1], g = _[2];
|
|
1550
1599
|
if (y) {
|
|
1551
1600
|
if (g !== "video" && g !== "audio") return a.log.error("The element of `" + f + "` was not a media element.");
|
|
1552
1601
|
} else return a.log.error("No element was found with the `" + f + "` query selector.");
|
|
@@ -1567,34 +1616,34 @@ function lr(a, e, t) {
|
|
|
1567
1616
|
a.setStateDataTranslator(n, s);
|
|
1568
1617
|
}, i.mux.setGetPlayheadTime = function(s) {
|
|
1569
1618
|
s || (s = t.getPlayheadTime), a.setGetPlayheadTime(n, s);
|
|
1570
|
-
}, a.init(n, t), a.emit(n, "playerready"), i.paused || (a.emit(n, "play"), i.readyState > 2 && a.emit(n, "playing")), i.mux.listeners = {},
|
|
1619
|
+
}, a.init(n, t), a.emit(n, "playerready"), i.paused || (a.emit(n, "play"), i.readyState > 2 && a.emit(n, "playing")), i.mux.listeners = {}, fr.forEach(function(s) {
|
|
1571
1620
|
s === "error" && !t.automaticErrorTracking || (i.mux.listeners[s] = function() {
|
|
1572
1621
|
var _ = {};
|
|
1573
1622
|
if (s === "error") {
|
|
1574
1623
|
if (!i.error || i.error.code === 1) return;
|
|
1575
|
-
_.player_error_code = i.error.code, _.player_error_message =
|
|
1624
|
+
_.player_error_code = i.error.code, _.player_error_message = vr[i.error.code] || i.error.message;
|
|
1576
1625
|
}
|
|
1577
1626
|
a.emit(n, s, _);
|
|
1578
1627
|
}, i.addEventListener(s, i.mux.listeners[s], !1));
|
|
1579
1628
|
});
|
|
1580
1629
|
}
|
|
1581
|
-
function
|
|
1630
|
+
function yr(a, e, t, r) {
|
|
1582
1631
|
var i = r;
|
|
1583
1632
|
if (a && typeof a[e] == "function") try {
|
|
1584
1633
|
i = a[e].apply(a, t);
|
|
1585
1634
|
} catch (n) {
|
|
1586
|
-
|
|
1635
|
+
q.info("safeCall error", n);
|
|
1587
1636
|
}
|
|
1588
1637
|
return i;
|
|
1589
1638
|
}
|
|
1590
1639
|
var ue = C(U()), ee;
|
|
1591
1640
|
ue.default && ue.default.WeakMap && (ee = /* @__PURE__ */ new WeakMap());
|
|
1592
|
-
function
|
|
1641
|
+
function gr(a, e) {
|
|
1593
1642
|
if (!a || !e || !ue.default || typeof ue.default.getComputedStyle != "function") return "";
|
|
1594
1643
|
var t;
|
|
1595
1644
|
return ee && ee.has(a) && (t = ee.get(a)), t || (t = ue.default.getComputedStyle(a, null), ee && ee.set(a, t)), t.getPropertyValue(e);
|
|
1596
1645
|
}
|
|
1597
|
-
function
|
|
1646
|
+
function br(a) {
|
|
1598
1647
|
return Math.floor(a * 1e3);
|
|
1599
1648
|
}
|
|
1600
1649
|
var K = { TARGET_DURATION: "#EXT-X-TARGETDURATION", PART_INF: "#EXT-X-PART-INF", SERVER_CONTROL: "#EXT-X-SERVER-CONTROL", INF: "#EXTINF", PROGRAM_DATE_TIME: "#EXT-X-PROGRAM-DATE-TIME", VERSION: "#EXT-X-VERSION", SESSION_DATA: "#EXT-X-SESSION-DATA" }, me = function(a) {
|
|
@@ -1607,7 +1656,7 @@ me.prototype.process = function(a) {
|
|
|
1607
1656
|
`)) this.processLine(this.buffer.substring(0, e)), this.buffer = this.buffer.substring(e + 1);
|
|
1608
1657
|
};
|
|
1609
1658
|
me.prototype.processLine = function(a) {
|
|
1610
|
-
var e = a.indexOf(":"), t =
|
|
1659
|
+
var e = a.indexOf(":"), t = Er(a, e), r = t[0], i = t.length === 2 ? Pe(t[1]) : void 0;
|
|
1611
1660
|
if (r[0] !== "#") this.currentUri.uri = r, this.manifest.segments.push(this.currentUri), this.manifest.targetDuration && !("duration" in this.currentUri) && (this.currentUri.duration = this.manifest.targetDuration), this.currentUri = {};
|
|
1612
1661
|
else switch (r) {
|
|
1613
1662
|
case K.TARGET_DURATION: {
|
|
@@ -1637,8 +1686,8 @@ me.prototype.processLine = function(a) {
|
|
|
1637
1686
|
break;
|
|
1638
1687
|
}
|
|
1639
1688
|
case K.SESSION_DATA: {
|
|
1640
|
-
var u =
|
|
1641
|
-
Object.assign(this.manifest.sessionData,
|
|
1689
|
+
var u = xr(t[1]), d = et(u);
|
|
1690
|
+
Object.assign(this.manifest.sessionData, d);
|
|
1642
1691
|
}
|
|
1643
1692
|
}
|
|
1644
1693
|
};
|
|
@@ -1650,90 +1699,90 @@ me.prototype.setHoldBack = function() {
|
|
|
1650
1699
|
}
|
|
1651
1700
|
};
|
|
1652
1701
|
var xe = function(a, e) {
|
|
1653
|
-
var t =
|
|
1654
|
-
|
|
1655
|
-
},
|
|
1702
|
+
var t = dt(e[0].replace("#EXT-X-", "")), r;
|
|
1703
|
+
kr(e[1]) ? (r = {}, r = Object.assign(Tr(e[1]), r)) : r = Pe(e[1]), a[t] = r;
|
|
1704
|
+
}, dt = function(a) {
|
|
1656
1705
|
return a.toLowerCase().replace(/-(\w)/g, function(e) {
|
|
1657
1706
|
return e[1].toUpperCase();
|
|
1658
1707
|
});
|
|
1659
|
-
},
|
|
1708
|
+
}, Pe = function(a) {
|
|
1660
1709
|
if (a.toLowerCase() === "yes" || a.toLowerCase() === "no") return a.toLowerCase() === "yes";
|
|
1661
1710
|
var e = a.indexOf(":") !== -1 ? a : parseFloat(a);
|
|
1662
1711
|
return isNaN(e) ? a : e;
|
|
1663
|
-
},
|
|
1712
|
+
}, wr = function(a) {
|
|
1664
1713
|
var e = {}, t = a.split("=");
|
|
1665
1714
|
if (t.length > 1) {
|
|
1666
|
-
var r =
|
|
1667
|
-
e[r] =
|
|
1715
|
+
var r = dt(t[0]);
|
|
1716
|
+
e[r] = Pe(t[1]);
|
|
1668
1717
|
}
|
|
1669
1718
|
return e;
|
|
1670
|
-
},
|
|
1719
|
+
}, Tr = function(a) {
|
|
1671
1720
|
for (var e = a.split(","), t = {}, r = 0; e.length > r; r++) {
|
|
1672
|
-
var i = e[r], n =
|
|
1721
|
+
var i = e[r], n = wr(i);
|
|
1673
1722
|
t = Object.assign(n, t);
|
|
1674
1723
|
}
|
|
1675
1724
|
return t;
|
|
1676
|
-
},
|
|
1725
|
+
}, kr = function(a) {
|
|
1677
1726
|
return a.indexOf("=") > -1;
|
|
1678
|
-
},
|
|
1727
|
+
}, Er = function(a, e) {
|
|
1679
1728
|
return e === -1 ? [a] : [a.substring(0, e), a.substring(e + 1)];
|
|
1680
|
-
},
|
|
1729
|
+
}, xr = function(a) {
|
|
1681
1730
|
var e = {};
|
|
1682
1731
|
if (a) {
|
|
1683
1732
|
var t = a.search(","), r = a.slice(0, t), i = a.slice(t + 1), n = [r, i];
|
|
1684
1733
|
return n.forEach(function(o, u) {
|
|
1685
|
-
for (var
|
|
1734
|
+
for (var d = o.replace(/['"]+/g, "").split("="), c = 0; c < d.length; c++) d[c] === "DATA-ID" && (e["DATA-ID"] = d[1 - c]), d[c] === "VALUE" && (e.VALUE = d[1 - c]);
|
|
1686
1735
|
}), { data: e };
|
|
1687
1736
|
}
|
|
1688
|
-
},
|
|
1737
|
+
}, Dr = me, qr = { safeCall: yr, safeIncrement: A, getComputedStyle: gr, secondsToMs: br, assign: Object.assign, headersStringToObject: Ae, cdnHeadersToRequestId: ve, extractHostnameAndDomain: le, extractHostname: B, manifestParser: Dr, generateShortID: Ze, generateUUID: de, now: P.now, findMediaElement: he }, Rr = qr, Sr = { 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", HEARTBEAT: "hb", DESTROY: "destroy" }, Or = Sr, Ar = "mux-embed", Pr = "5.11.0", Lr = "2.1", O = {}, J = function(a) {
|
|
1689
1738
|
var e = arguments;
|
|
1690
1739
|
typeof a == "string" ? J.hasOwnProperty(a) ? se.default.setTimeout(function() {
|
|
1691
1740
|
e = Array.prototype.splice.call(e, 1), J[a].apply(null, e);
|
|
1692
|
-
}, 0) :
|
|
1741
|
+
}, 0) : q.warn("`" + a + "` is an unknown task") : typeof a == "function" ? se.default.setTimeout(function() {
|
|
1693
1742
|
a(J);
|
|
1694
|
-
}, 0) :
|
|
1695
|
-
},
|
|
1696
|
-
return
|
|
1743
|
+
}, 0) : q.warn("`" + a + "` is invalid.");
|
|
1744
|
+
}, Ir = { loaded: P.now(), NAME: Ar, VERSION: Pr, API_VERSION: Lr, PLAYER_TRACKED: !1, monitor: function(a, e) {
|
|
1745
|
+
return mr(J, a, e);
|
|
1697
1746
|
}, destroyMonitor: function(a) {
|
|
1698
|
-
var e =
|
|
1699
|
-
t && t.mux && typeof t.mux.destroy == "function" ? t.mux.destroy() :
|
|
1747
|
+
var e = Q(he(a), 1), t = e[0];
|
|
1748
|
+
t && t.mux && typeof t.mux.destroy == "function" ? t.mux.destroy() : q.error("A video element monitor for `" + a + "` has not been initialized via `mux.monitor`.");
|
|
1700
1749
|
}, addHLSJS: function(a, e) {
|
|
1701
1750
|
var t = H(a);
|
|
1702
|
-
|
|
1751
|
+
O[t] ? O[t].addHLSJS(e) : q.error("A monitor for `" + t + "` has not been initialized.");
|
|
1703
1752
|
}, addDashJS: function(a, e) {
|
|
1704
1753
|
var t = H(a);
|
|
1705
|
-
|
|
1754
|
+
O[t] ? O[t].addDashJS(e) : q.error("A monitor for `" + t + "` has not been initialized.");
|
|
1706
1755
|
}, removeHLSJS: function(a) {
|
|
1707
1756
|
var e = H(a);
|
|
1708
|
-
|
|
1757
|
+
O[e] ? O[e].removeHLSJS() : q.error("A monitor for `" + e + "` has not been initialized.");
|
|
1709
1758
|
}, removeDashJS: function(a) {
|
|
1710
1759
|
var e = H(a);
|
|
1711
|
-
|
|
1760
|
+
O[e] ? O[e].removeDashJS() : q.error("A monitor for `" + e + "` has not been initialized.");
|
|
1712
1761
|
}, init: function(a, e) {
|
|
1713
|
-
|
|
1762
|
+
qe() && e && e.respectDoNotTrack && q.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");
|
|
1714
1763
|
var t = H(a);
|
|
1715
|
-
|
|
1764
|
+
O[t] = new hr(J, t, e);
|
|
1716
1765
|
}, emit: function(a, e, t) {
|
|
1717
1766
|
var r = H(a);
|
|
1718
|
-
|
|
1767
|
+
O[r] ? (O[r].emit(e, t), e === "destroy" && delete O[r]) : q.error("A monitor for `" + r + "` has not been initialized.");
|
|
1719
1768
|
}, updateData: function(a, e) {
|
|
1720
1769
|
var t = H(a);
|
|
1721
|
-
|
|
1770
|
+
O[t] ? O[t].emit("hb", e) : q.error("A monitor for `" + t + "` has not been initialized.");
|
|
1722
1771
|
}, setEmitTranslator: function(a, e) {
|
|
1723
1772
|
var t = H(a);
|
|
1724
|
-
|
|
1773
|
+
O[t] ? O[t].emitTranslator = e : q.error("A monitor for `" + t + "` has not been initialized.");
|
|
1725
1774
|
}, setStateDataTranslator: function(a, e) {
|
|
1726
1775
|
var t = H(a);
|
|
1727
|
-
|
|
1776
|
+
O[t] ? O[t].stateDataTranslator = e : q.error("A monitor for `" + t + "` has not been initialized.");
|
|
1728
1777
|
}, setGetPlayheadTime: function(a, e) {
|
|
1729
1778
|
var t = H(a);
|
|
1730
|
-
|
|
1731
|
-
}, checkDoNotTrack:
|
|
1732
|
-
Object.assign(J,
|
|
1779
|
+
O[t] ? O[t].getPlayheadTime = e : q.error("A monitor for `" + t + "` has not been initialized.");
|
|
1780
|
+
}, checkDoNotTrack: qe, log: q, utils: Rr, events: Or, WINDOW_HIDDEN: !1, WINDOW_UNLOADING: !1 };
|
|
1781
|
+
Object.assign(J, Ir);
|
|
1733
1782
|
typeof se.default < "u" && typeof se.default.addEventListener == "function" && se.default.addEventListener("pagehide", function(a) {
|
|
1734
1783
|
a.persisted || (J.WINDOW_UNLOADING = !0);
|
|
1735
1784
|
}, !1);
|
|
1736
|
-
var
|
|
1785
|
+
var Nr = J;
|
|
1737
1786
|
/*!
|
|
1738
1787
|
* JavaScript Cookie v2.1.3
|
|
1739
1788
|
* https://github.com/js-cookie/js-cookie
|
|
@@ -1741,7 +1790,7 @@ var Rr = J;
|
|
|
1741
1790
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
1742
1791
|
* Released under the MIT license
|
|
1743
1792
|
*/
|
|
1744
|
-
const
|
|
1793
|
+
const Cr = async ({
|
|
1745
1794
|
appName: a = "elv-player-js",
|
|
1746
1795
|
elvPlayer: e,
|
|
1747
1796
|
playoutUrl: t,
|
|
@@ -1749,7 +1798,7 @@ const Or = async ({
|
|
|
1749
1798
|
disableCookies: i
|
|
1750
1799
|
}) => {
|
|
1751
1800
|
t = new URL(t);
|
|
1752
|
-
const n = await e.__Client(), o = (await n.NetworkInfo()).name === "main" ? "aq4mdjn7qo5sbkf89pkvfv93j" : "2i5480sms8vdgj0sv9bv6lpk5", u = t.pathname.split("/").find((f) => f.startsWith("hq__")),
|
|
1801
|
+
const n = await e.__Client(), o = (await n.NetworkInfo()).name === "main" ? "aq4mdjn7qo5sbkf89pkvfv93j" : "2i5480sms8vdgj0sv9bv6lpk5", u = t.pathname.split("/").find((f) => f.startsWith("hq__")), d = n.utils.DecodeVersionHash(u).objectId, c = (t.toString().match(/\/rep\/playout|channel\/([^/]+)/) || [])[1] || "default", v = t.searchParams.get("sid");
|
|
1753
1802
|
let b = u;
|
|
1754
1803
|
try {
|
|
1755
1804
|
const f = await n.ContentObjectMetadata({
|
|
@@ -1765,9 +1814,9 @@ const Or = async ({
|
|
|
1765
1814
|
b = (f.asset_metadata || {}).display_title || (f.asset_metadata || {}).title || f.name || u;
|
|
1766
1815
|
} catch {
|
|
1767
1816
|
}
|
|
1768
|
-
let
|
|
1817
|
+
let l;
|
|
1769
1818
|
try {
|
|
1770
|
-
|
|
1819
|
+
l = await n.ContentObjectTenantId({ versionHash: u });
|
|
1771
1820
|
} catch {
|
|
1772
1821
|
}
|
|
1773
1822
|
let s = await n.CurrentAccountAddress();
|
|
@@ -1791,13 +1840,13 @@ const Or = async ({
|
|
|
1791
1840
|
disableCookies: i,
|
|
1792
1841
|
data: {
|
|
1793
1842
|
env_key: o,
|
|
1794
|
-
video_id:
|
|
1843
|
+
video_id: d,
|
|
1795
1844
|
video_variant_id: u,
|
|
1796
1845
|
video_variant_name: c,
|
|
1797
1846
|
video_title: b,
|
|
1798
1847
|
video_cdn: t.hostname,
|
|
1799
1848
|
viewer_user_id: _,
|
|
1800
|
-
sub_property_id:
|
|
1849
|
+
sub_property_id: l,
|
|
1801
1850
|
player_name: a,
|
|
1802
1851
|
//player_version: version,
|
|
1803
1852
|
player_init_time: e.initTime
|
|
@@ -1805,11 +1854,11 @@ const Or = async ({
|
|
|
1805
1854
|
};
|
|
1806
1855
|
v && (y.data.view_session_id = v), e.player && (e.HLS ? (y.hlsjs = e.player, y.Hls = e.HLS) : e.Dash && (y.dashjs = e.player));
|
|
1807
1856
|
try {
|
|
1808
|
-
|
|
1857
|
+
Nr.monitor(e.video, y), e.Log("elv-player-js: Mux monitoring initialized"), e.Log(JSON.stringify({ ...y, hlsjs: {} }));
|
|
1809
1858
|
} catch (f) {
|
|
1810
1859
|
e.Log("elv-player-js: Failed to initialize mux monitoring:", !0), e.Log(JSON.stringify(y, null, 2), !0), e.Log(f, !0);
|
|
1811
1860
|
}
|
|
1812
1861
|
};
|
|
1813
1862
|
export {
|
|
1814
|
-
|
|
1863
|
+
Cr as InitializeMuxMonitoring
|
|
1815
1864
|
};
|