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