@newrelic/video-core 3.1.0 → 3.2.0-beta-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -2
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +22 -16
- package/THIRD_PARTY_NOTICES.md +5 -5
- package/package.json +5 -3
- package/src/agent.js +6 -0
- package/src/authConfiguration.js +138 -0
- package/src/chrono.js +78 -0
- package/src/constants.js +43 -0
- package/src/core.js +100 -0
- package/src/emitter.js +81 -0
- package/src/eventAggregator.js +66 -0
- package/src/harvester.js +171 -0
- package/src/index.js +22 -0
- package/src/log.js +323 -0
- package/src/recordEvent.js +68 -0
- package/src/tracker.js +281 -0
- package/src/utils.js +101 -0
- package/src/videotracker.js +1060 -0
- package/src/videotrackerstate.js +574 -0
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.LICENSE.txt +0 -6
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.LICENSE.txt +0 -6
- package/dist/umd/nrvideo.min.js +0 -1
- package/dist/umd/nrvideo.min.js.LICENSE.txt +0 -6
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
import Chrono from "./chrono";
|
|
2
|
+
import Log from "./log";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* State machine for a VideoTracker and its monitored video.
|
|
6
|
+
*/
|
|
7
|
+
class VideoTrackerState {
|
|
8
|
+
/** Constructor */
|
|
9
|
+
constructor() {
|
|
10
|
+
this.reset();
|
|
11
|
+
|
|
12
|
+
//this.setupNetworkListeners();
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Time when the VideoTrackerState was initializated.
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
this._createdAt = Date.now();
|
|
19
|
+
this._hb = true;
|
|
20
|
+
this._acc = 0;
|
|
21
|
+
this._bufferAcc = 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Resets all flags and chronos. */
|
|
25
|
+
reset() {
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier of the view.
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
this._viewSession = null;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Number of views seen.
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
this._viewCount = 0;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* True if it is tracking ads.
|
|
40
|
+
* @private
|
|
41
|
+
*/
|
|
42
|
+
this._isAd = false;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Number of errors fired. 'End' resets it.
|
|
46
|
+
*/
|
|
47
|
+
this.numberOfErrors = 0;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Number of ads shown.
|
|
51
|
+
*/
|
|
52
|
+
this.numberOfAds = 0;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Number of videos played.
|
|
56
|
+
*/
|
|
57
|
+
this.numberOfVideos = 0;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The amount of ms the user has been watching content (not paused, not buffering, not ads...)
|
|
61
|
+
*/
|
|
62
|
+
this.totalPlaytime = 0;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The amount of ms the user has been watching ads during an ad break.
|
|
66
|
+
*/
|
|
67
|
+
this.totalAdPlaytime = 0;
|
|
68
|
+
|
|
69
|
+
/** True if you are in the middle of an ad break. */
|
|
70
|
+
this.isAdBreak = false;
|
|
71
|
+
|
|
72
|
+
/** True if initial buffering event already happened. */
|
|
73
|
+
this.initialBufferingHappened = false;
|
|
74
|
+
|
|
75
|
+
this.resetFlags();
|
|
76
|
+
this.resetChronos();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Resets flags. */
|
|
80
|
+
resetFlags() {
|
|
81
|
+
/** True once the player has finished loading. */
|
|
82
|
+
this.isPlayerReady = false;
|
|
83
|
+
|
|
84
|
+
/** True if the video has been user-requested to play. ie: user cicks play. */
|
|
85
|
+
this.isRequested = false;
|
|
86
|
+
|
|
87
|
+
/** True if the video has starting playing. ie: actual images/audio showing in screen. */
|
|
88
|
+
this.isStarted = false;
|
|
89
|
+
|
|
90
|
+
/** True if the video is paused. */
|
|
91
|
+
this.isPaused = false;
|
|
92
|
+
|
|
93
|
+
/** True if the video is performing a seek action. */
|
|
94
|
+
this.isSeeking = false;
|
|
95
|
+
|
|
96
|
+
/** True if the video is currently buffering. */
|
|
97
|
+
this.isBuffering = false;
|
|
98
|
+
|
|
99
|
+
/** True if the video is currently playing (not buffering, not paused...) */
|
|
100
|
+
this.isPlaying = false;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Resets chronos. */
|
|
104
|
+
resetChronos() {
|
|
105
|
+
/** Chrono that counts time since last requested event. */
|
|
106
|
+
this.timeSinceRequested = new Chrono();
|
|
107
|
+
|
|
108
|
+
/** Chrono that counts time since last start event. */
|
|
109
|
+
this.timeSinceStarted = new Chrono();
|
|
110
|
+
|
|
111
|
+
/** Chrono that counts time since last pause event. */
|
|
112
|
+
this.timeSincePaused = new Chrono();
|
|
113
|
+
|
|
114
|
+
/** Chrono that counts time since last seeking start event. */
|
|
115
|
+
this.timeSinceSeekBegin = new Chrono();
|
|
116
|
+
|
|
117
|
+
/** Chrono that counts time since last buffering start event. */
|
|
118
|
+
this.timeSinceBufferBegin = new Chrono();
|
|
119
|
+
|
|
120
|
+
/** Chrono that counts time since last ad break start event. */
|
|
121
|
+
this.timeSinceAdBreakStart = new Chrono();
|
|
122
|
+
|
|
123
|
+
/** Chrono that counts time since last download event. */
|
|
124
|
+
this.timeSinceLastDownload = new Chrono();
|
|
125
|
+
|
|
126
|
+
/** Chrono that counts time since last heartbeat. */
|
|
127
|
+
this.timeSinceLastHeartbeat = new Chrono();
|
|
128
|
+
|
|
129
|
+
/** Chrono that counts time since last rendition change. */
|
|
130
|
+
this.timeSinceLastRenditionChange = new Chrono();
|
|
131
|
+
|
|
132
|
+
/** Ads only. Chrono that counts time since last ad quartile. */
|
|
133
|
+
this.timeSinceLastAdQuartile = new Chrono();
|
|
134
|
+
|
|
135
|
+
/** Content only. Chrono that counts time since last AD_END. */
|
|
136
|
+
this.timeSinceLastAd = new Chrono();
|
|
137
|
+
|
|
138
|
+
/** Chrono that counts time since last *_RESUME. Only for buffering events. */
|
|
139
|
+
this.timeSinceResumed = new Chrono();
|
|
140
|
+
|
|
141
|
+
/** Chrono that counts time since last *_SEEK_END. Only for buffering events. */
|
|
142
|
+
this.timeSinceSeekEnd = new Chrono();
|
|
143
|
+
|
|
144
|
+
/** Chrono that counts the ammount of time the video have been playing since the last event. */
|
|
145
|
+
this.playtimeSinceLastEvent = new Chrono();
|
|
146
|
+
|
|
147
|
+
/** A dictionary containing the custom timeSince attributes. */
|
|
148
|
+
this.customTimeSinceAttributes = {};
|
|
149
|
+
|
|
150
|
+
/** This are used to collect the time of buffred and pause resume between two heartbeats */
|
|
151
|
+
this.elapsedTime = new Chrono();
|
|
152
|
+
this.bufferElapsedTime = new Chrono();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** Returns true if the tracker is currently on ads. */
|
|
156
|
+
isAd() {
|
|
157
|
+
return this._isAd;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Sets if the tracker is currenlty tracking ads */
|
|
161
|
+
setIsAd(isAd) {
|
|
162
|
+
this._isAd = isAd;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Set the Chrono for the custom attribute
|
|
167
|
+
*
|
|
168
|
+
* @param {object} name Time since attribute name.
|
|
169
|
+
*/
|
|
170
|
+
setTimeSinceAttribute(name) {
|
|
171
|
+
this.customTimeSinceAttributes[name] = new Chrono();
|
|
172
|
+
this.customTimeSinceAttributes[name].start();
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Delete a time since attribute
|
|
177
|
+
*
|
|
178
|
+
* @param {object} name Time since attribute name.
|
|
179
|
+
*/
|
|
180
|
+
removeTimeSinceAttribute(name) {
|
|
181
|
+
delete this.customTimeSinceAttributes[name];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Returns a random-generated view Session ID, useful to sort by views.
|
|
186
|
+
*/
|
|
187
|
+
getViewSession() {
|
|
188
|
+
if (!this._viewSession) {
|
|
189
|
+
let time = new Date().getTime();
|
|
190
|
+
let random =
|
|
191
|
+
Math.random().toString(36).substring(2) +
|
|
192
|
+
Math.random().toString(36).substring(2);
|
|
193
|
+
|
|
194
|
+
this._viewSession = time + "-" + random;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return this._viewSession;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Returns a random-generated view Session ID, plus a view count, allowing you to distinguish
|
|
202
|
+
* between two videos played in the same session.
|
|
203
|
+
*/
|
|
204
|
+
getViewId() {
|
|
205
|
+
return this.getViewSession() + "-" + this._viewCount;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Fills given object with state-based attributes.
|
|
210
|
+
*
|
|
211
|
+
* @param {object} att Collection fo key value attributes
|
|
212
|
+
* @return {object} Filled attributes
|
|
213
|
+
*/
|
|
214
|
+
getStateAttributes(att) {
|
|
215
|
+
att = att || {};
|
|
216
|
+
|
|
217
|
+
if (this.isAd()) {
|
|
218
|
+
// Ads only
|
|
219
|
+
if (this.isRequested) {
|
|
220
|
+
att.timeSinceAdRequested = this.timeSinceRequested.getDeltaTime();
|
|
221
|
+
att.timeSinceLastAdHeartbeat =
|
|
222
|
+
this.timeSinceLastHeartbeat.getDeltaTime();
|
|
223
|
+
}
|
|
224
|
+
if (this.isStarted)
|
|
225
|
+
att.timeSinceAdStarted = this.timeSinceStarted.getDeltaTime();
|
|
226
|
+
if (this.isPaused)
|
|
227
|
+
att.timeSinceAdPaused = this.timeSincePaused.getDeltaTime();
|
|
228
|
+
if (this.isBuffering)
|
|
229
|
+
att.timeSinceAdBufferBegin = this.timeSinceBufferBegin.getDeltaTime();
|
|
230
|
+
if (this.isSeeking)
|
|
231
|
+
att.timeSinceAdSeekBegin = this.timeSinceSeekBegin.getDeltaTime();
|
|
232
|
+
if (this.isAdBreak)
|
|
233
|
+
att.timeSinceAdBreakBegin = this.timeSinceAdBreakStart.getDeltaTime();
|
|
234
|
+
att.numberOfAds = this.numberOfAds;
|
|
235
|
+
} else {
|
|
236
|
+
// Content only
|
|
237
|
+
if (this.isRequested) {
|
|
238
|
+
att.timeSinceRequested = this.timeSinceRequested.getDeltaTime();
|
|
239
|
+
att.timeSinceLastHeartbeat = this.timeSinceLastHeartbeat.getDeltaTime();
|
|
240
|
+
}
|
|
241
|
+
if (this.isStarted)
|
|
242
|
+
att.timeSinceStarted = this.timeSinceStarted.getDeltaTime();
|
|
243
|
+
if (this.isPaused)
|
|
244
|
+
att.timeSincePaused = this.timeSincePaused.getDeltaTime();
|
|
245
|
+
if (this.isBuffering)
|
|
246
|
+
att.timeSinceBufferBegin = this.timeSinceBufferBegin.getDeltaTime();
|
|
247
|
+
if (this.isSeeking)
|
|
248
|
+
att.timeSinceSeekBegin = this.timeSinceSeekBegin.getDeltaTime();
|
|
249
|
+
att.timeSinceLastAd = this.timeSinceLastAd.getDeltaTime();
|
|
250
|
+
att.numberOfVideos = this.numberOfVideos;
|
|
251
|
+
}
|
|
252
|
+
att.numberOfErrors = this.numberOfErrors;
|
|
253
|
+
|
|
254
|
+
// Playtime
|
|
255
|
+
if (!this.isAd()) {
|
|
256
|
+
// Content only
|
|
257
|
+
if (this.playtimeSinceLastEvent.startTime > 0) {
|
|
258
|
+
att.playtimeSinceLastEvent = this.playtimeSinceLastEvent.getDeltaTime();
|
|
259
|
+
} else {
|
|
260
|
+
att.playtimeSinceLastEvent = 0;
|
|
261
|
+
}
|
|
262
|
+
if (this.isPlaying) {
|
|
263
|
+
this.playtimeSinceLastEvent.start();
|
|
264
|
+
} else {
|
|
265
|
+
this.playtimeSinceLastEvent.reset();
|
|
266
|
+
}
|
|
267
|
+
this.totalPlaytime += att.playtimeSinceLastEvent;
|
|
268
|
+
att.totalPlaytime = this.totalPlaytime;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
for (const [key, value] of Object.entries(this.customTimeSinceAttributes)) {
|
|
272
|
+
att[key] = value.getDeltaTime();
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return att;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Calculate the bufferType attribute.
|
|
280
|
+
*
|
|
281
|
+
* @param {boolean} isInitialBuffering Is initial buffering event.
|
|
282
|
+
*/
|
|
283
|
+
calculateBufferType(isInitialBuffering) {
|
|
284
|
+
let bufferType = "";
|
|
285
|
+
if (isInitialBuffering) {
|
|
286
|
+
bufferType = "initial";
|
|
287
|
+
} else if (this.isSeeking) {
|
|
288
|
+
bufferType = "seek";
|
|
289
|
+
} else if (this.isPaused) {
|
|
290
|
+
bufferType = "pause";
|
|
291
|
+
} else {
|
|
292
|
+
// If none of the above is true, it is a connection buffering
|
|
293
|
+
bufferType = "connection";
|
|
294
|
+
}
|
|
295
|
+
Log.debug("Buffer Type = " + bufferType);
|
|
296
|
+
|
|
297
|
+
return bufferType;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Augments view count. This will be called with each *_START and *_END.
|
|
302
|
+
*/
|
|
303
|
+
goViewCountUp() {
|
|
304
|
+
this._viewCount++;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Checks flags and changes state.
|
|
309
|
+
* @returns {boolean} True if the state changed.
|
|
310
|
+
*/
|
|
311
|
+
goPlayerReady() {
|
|
312
|
+
if (!this.isPlayerReady) {
|
|
313
|
+
this.isPlayerReady = true;
|
|
314
|
+
return true;
|
|
315
|
+
} else {
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Checks flags and changes state
|
|
322
|
+
* @returns {boolean} True if the state changed.
|
|
323
|
+
*/
|
|
324
|
+
goRequest() {
|
|
325
|
+
if (!this.isRequested) {
|
|
326
|
+
this.isRequested = true;
|
|
327
|
+
|
|
328
|
+
this.timeSinceLastAd.reset();
|
|
329
|
+
this.timeSinceRequested.start();
|
|
330
|
+
return true;
|
|
331
|
+
} else {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Checks flags and changes state
|
|
338
|
+
* @returns {boolean} True if the state changed.
|
|
339
|
+
*/
|
|
340
|
+
goStart() {
|
|
341
|
+
if (this.isRequested && !this.isStarted) {
|
|
342
|
+
if (this.isAd()) {
|
|
343
|
+
this.numberOfAds++;
|
|
344
|
+
} else {
|
|
345
|
+
this.numberOfVideos++;
|
|
346
|
+
}
|
|
347
|
+
this.isStarted = true;
|
|
348
|
+
this.isPlaying = true;
|
|
349
|
+
this.timeSinceStarted.start();
|
|
350
|
+
this.playtimeSinceLastEvent.start();
|
|
351
|
+
return true;
|
|
352
|
+
} else {
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Checks flags and changes state
|
|
359
|
+
* @returns {boolean} True if the state changed.
|
|
360
|
+
*/
|
|
361
|
+
goEnd() {
|
|
362
|
+
if (this.isRequested) {
|
|
363
|
+
this.numberOfErrors = 0;
|
|
364
|
+
this.resetFlags();
|
|
365
|
+
this.timeSinceRequested.stop();
|
|
366
|
+
this.timeSinceStarted.stop();
|
|
367
|
+
this.playtimeSinceLastEvent.stop();
|
|
368
|
+
return true;
|
|
369
|
+
} else {
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Checks flags and changes state
|
|
376
|
+
* @returns {boolean} True if the state changed.
|
|
377
|
+
*/
|
|
378
|
+
goPause() {
|
|
379
|
+
if (this.isStarted && !this.isPaused) {
|
|
380
|
+
this.isPaused = true;
|
|
381
|
+
this.isPlaying = false;
|
|
382
|
+
this.timeSincePaused.start();
|
|
383
|
+
this.playtimeSinceLastEvent.stop();
|
|
384
|
+
this.timeSinceResumed.reset();
|
|
385
|
+
if (this.isBuffering) {
|
|
386
|
+
this._bufferAcc += this.bufferElapsedTime.getDeltaTime();
|
|
387
|
+
}
|
|
388
|
+
this.elapsedTime.start();
|
|
389
|
+
return true;
|
|
390
|
+
} else {
|
|
391
|
+
return false;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Checks flags and changes state
|
|
397
|
+
* @returns {boolean} True if the state changed.
|
|
398
|
+
*/
|
|
399
|
+
goResume() {
|
|
400
|
+
if (this.isStarted && this.isPaused) {
|
|
401
|
+
this.isPaused = false;
|
|
402
|
+
this.isPlaying = true;
|
|
403
|
+
this.timeSincePaused.stop();
|
|
404
|
+
this.timeSinceResumed.start();
|
|
405
|
+
if (this._hb) {
|
|
406
|
+
this._acc = this.elapsedTime.getDeltaTime();
|
|
407
|
+
this._hb = false;
|
|
408
|
+
} else {
|
|
409
|
+
if (this.isBuffering) {
|
|
410
|
+
this.bufferElapsedTime.start();
|
|
411
|
+
}
|
|
412
|
+
this._acc += this.elapsedTime.getDeltaTime();
|
|
413
|
+
}
|
|
414
|
+
return true;
|
|
415
|
+
} else {
|
|
416
|
+
return false;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Checks flags and changes state
|
|
422
|
+
* @returns {boolean} True if the state changed.
|
|
423
|
+
*/
|
|
424
|
+
goBufferStart() {
|
|
425
|
+
if (this.isRequested && !this.isBuffering) {
|
|
426
|
+
this.isBuffering = true;
|
|
427
|
+
this.isPlaying = false;
|
|
428
|
+
this.timeSinceBufferBegin.start();
|
|
429
|
+
this.bufferElapsedTime.start();
|
|
430
|
+
|
|
431
|
+
return true;
|
|
432
|
+
} else {
|
|
433
|
+
return false;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Checks flags and changes state
|
|
439
|
+
* @returns {boolean} True if the state changed.
|
|
440
|
+
*/
|
|
441
|
+
goBufferEnd() {
|
|
442
|
+
if (this.isRequested && this.isBuffering) {
|
|
443
|
+
this.isBuffering = false;
|
|
444
|
+
this.isPlaying = true;
|
|
445
|
+
this.timeSinceBufferBegin.stop();
|
|
446
|
+
if (this._hb) {
|
|
447
|
+
this._bufferAcc = this.bufferElapsedTime.getDeltaTime();
|
|
448
|
+
this._hb = false;
|
|
449
|
+
} else {
|
|
450
|
+
this._bufferAcc += this.bufferElapsedTime.getDeltaTime();
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
return true;
|
|
454
|
+
} else {
|
|
455
|
+
return false;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Checks flags and changes state
|
|
461
|
+
* @returns {boolean} True if the state changed.
|
|
462
|
+
*/
|
|
463
|
+
goSeekStart() {
|
|
464
|
+
if (this.isStarted && !this.isSeeking) {
|
|
465
|
+
this.isSeeking = true;
|
|
466
|
+
this.isPlaying = false;
|
|
467
|
+
this.timeSinceSeekBegin.start();
|
|
468
|
+
this.timeSinceSeekEnd.reset();
|
|
469
|
+
|
|
470
|
+
//new
|
|
471
|
+
// this.seekStartTime = Date.now();
|
|
472
|
+
|
|
473
|
+
return true;
|
|
474
|
+
} else {
|
|
475
|
+
return false;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Checks flags and changes state
|
|
481
|
+
* @returns {boolean} True if the state changed.
|
|
482
|
+
*/
|
|
483
|
+
goSeekEnd() {
|
|
484
|
+
if (this.isStarted && this.isSeeking) {
|
|
485
|
+
this.isSeeking = false;
|
|
486
|
+
this.isPlaying = true;
|
|
487
|
+
this.timeSinceSeekBegin.stop();
|
|
488
|
+
this.timeSinceSeekEnd.start();
|
|
489
|
+
|
|
490
|
+
//new
|
|
491
|
+
// this.seekEndTime = Date.now();
|
|
492
|
+
// this.seekDuration = this.seekEndTime - this.seekStartTime;
|
|
493
|
+
|
|
494
|
+
return true;
|
|
495
|
+
} else {
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Checks flags and changes state
|
|
502
|
+
* @returns {boolean} True if the state changed.
|
|
503
|
+
*/
|
|
504
|
+
goAdBreakStart() {
|
|
505
|
+
if (!this.isAdBreak) {
|
|
506
|
+
this.isAdBreak = true;
|
|
507
|
+
this.timeSinceAdBreakStart.start();
|
|
508
|
+
return true;
|
|
509
|
+
} else {
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Checks flags and changes state
|
|
516
|
+
* @returns {boolean} True if the state changed.
|
|
517
|
+
*/
|
|
518
|
+
goAdBreakEnd() {
|
|
519
|
+
if (this.isAdBreak) {
|
|
520
|
+
this.isRequested = false;
|
|
521
|
+
this.isAdBreak = false;
|
|
522
|
+
this.totalAdPlaytime = this.timeSinceAdBreakStart.getDeltaTime();
|
|
523
|
+
this.timeSinceAdBreakStart.stop();
|
|
524
|
+
return true;
|
|
525
|
+
} else {
|
|
526
|
+
return false;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Restarts download chrono.
|
|
532
|
+
*/
|
|
533
|
+
goDownload() {
|
|
534
|
+
this.timeSinceLastDownload.start();
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Restarts heartbeat chrono.
|
|
539
|
+
*/
|
|
540
|
+
goHeartbeat() {
|
|
541
|
+
this.timeSinceLastHeartbeat.start();
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Restarts rendition change chrono.
|
|
546
|
+
*/
|
|
547
|
+
goRenditionChange() {
|
|
548
|
+
this.timeSinceLastRenditionChange.start();
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Restarts ad quartile chrono.
|
|
553
|
+
*/
|
|
554
|
+
goAdQuartile() {
|
|
555
|
+
this.timeSinceLastAdQuartile.start();
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Increments error counter.
|
|
560
|
+
*/
|
|
561
|
+
goError() {
|
|
562
|
+
this.isError = true;
|
|
563
|
+
this.numberOfErrors++;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Restarts last ad chrono.
|
|
568
|
+
*/
|
|
569
|
+
goLastAd() {
|
|
570
|
+
this.timeSinceLastAd.start();
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export default VideoTrackerState;
|
package/dist/cjs/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(a,b){const G=a0b,c=a();while(!![]){try{const d=parseInt(G(0x145))/0x1+parseInt(G(0x198))/0x2+-parseInt(G(0x26c))/0x3+parseInt(G(0x1b1))/0x4+-parseInt(G(0x284))/0x5*(-parseInt(G(0x187))/0x6)+-parseInt(G(0x168))/0x7*(parseInt(G(0x20a))/0x8)+parseInt(G(0x2b7))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,0xd9977),((()=>{'use strict';const bY=a0b;var a={0x33:(f,g)=>{const H=a0b;Object[H(0x217)](g,'__esModule',{'value':!0x0}),g['default']=void 0x0;class h{}h[H(0x163)]={'PRE':H(0x154),'MID':H(0x269),'POST':H(0x21c)},g[H(0x1c5)]=h;},0x90:(f,g)=>{const I=a0b;Object[I(0x217)](g,I(0x1ac),{'value':!0x0}),g[I(0x1c5)]=void 0x0;class h{static['error'](){const J=I;for(var m=arguments[J(0x20b)],o=new Array(m),p=0x0;p<m;p++)o[p]=arguments[p];j(o,h[J(0x207)]['ERROR'],J(0x1cb));}static['warn'](){const K=I;for(var m=arguments[K(0x20b)],o=new Array(m),p=0x0;p<m;p++)o[p]=arguments[p];j(o,h[K(0x207)][K(0x282)],K(0x20f));}static[I(0x1ca)](){const L=I;for(var m=arguments[L(0x20b)],o=new Array(m),p=0x0;p<m;p++)o[p]=arguments[p];j([]['slice'][L(0x283)](arguments),h[L(0x207)]['NOTICE'],L(0x26b));}static['debug'](){const M=I;for(var m=arguments[M(0x20b)],o=new Array(m),p=0x0;p<m;p++)o[p]=arguments[p];j(o,h[M(0x207)]['DEBUG'],M(0x204));}static[I(0x26d)](m,o,p){const N=I;try{if(h[N(0x165)]<=h['Levels'][N(0x214)]){p=p||function(u){const O=N;h[O(0x148)](O(0x158)+u[O(0x2a8)]);};var q=['canplay',N(0x124),N(0x1e8),N(0x1f2),N(0x137),N(0x1ee),'pause',N(0x19d),N(0x1ba),N(0x13c),'seek','seeking','seeked',N(0x17b),N(0x18a),N(0x1d5),N(0x2af),N(0x1fc)];o&&(null===o[0x0]?(o[N(0x18c)](),q=o):q=q[N(0x12f)](o));for(var r=0x0;r<q[N(0x20b)];r++)N(0x19f)==typeof m?m['call'](window,q[r],p):m['on']?m['on'](q[r],p):m['addEventListener']?m[N(0x271)](q[r],p):m[N(0x26f)]?m[N(0x26f)](q[r],p):h[N(0x216)](N(0x218),m);}}catch(u){h['warn'](u);}}}function j(m,p,q){const P=I;p=p||h[P(0x207)][P(0x261)],q=q||P(0x26b);var u,v,w=h[P(0x1e4)];h[P(0x1d8)]&&(w+='['+('0'+(u=new Date())[P(0x234)]())[P(0x1a8)](-0x2)+':'+('0'+u['getMinutes']())[P(0x1a8)](-0x2)+':'+('0'+u[P(0x1fd)]())[P(0x1a8)](-0x2)+'.'+('00'+u['getMilliseconds']())[P(0x1a8)](-0x3)+']\x20'),w+=function(x){return l[x];}(p)+':',h['level']<=p&&p!==h[P(0x207)]['SILENT']&&(!h[P(0x215)]||P(0x1db)!=typeof document&&document['documentMode']?k(m,w):(v=p===h[P(0x207)][P(0x1d3)]&&console[P(0x1ba)]?console['error']:p===h[P(0x207)][P(0x282)]&&console[P(0x216)]?console[P(0x216)]:p===h['Levels'][P(0x214)]&&console[P(0x148)]&&null==window['cast']?console['debug']:console[P(0x288)],w='%c'+w,m[P(0x27e)](0x0,0x0,w,'color:\x20'+q),v[P(0x262)](console,m)));}function k(m,o){const Q=I;if(m instanceof Array){for(var p in m)k(m[p],o);}else Q(0x1f1)==typeof m?console['log'](o+'\x20'+m):(console[Q(0x288)](o+'↵'),console[Q(0x288)](m));}h[I(0x207)]={'SILENT':0x5,'ERROR':0x4,'WARNING':0x3,'NOTICE':0x2,'DEBUG':0x1,'ALL':0x0},h[I(0x165)]=h[I(0x207)]['ERROR'],h[I(0x215)]=!0x0,h[I(0x1d8)]=!0x0,h[I(0x1e4)]=I(0x16a);const l={0x4:'e',0x3:'w',0x2:'n',0x1:'d'};!(function(){const R=I;if(R(0x1db)!=typeof window&&window[R(0x1f8)]&&window[R(0x1f8)][R(0x253)]){var m=/\?.*&*nrvideo-debug=(.+)/i['exec'](window[R(0x1f8)]['search']);null!==m&&(R(0x15d)===m[0x1]?h[R(0x165)]=h[R(0x207)][R(0x162)]:h[R(0x165)]=m[0x1]),null!==/\?.*&*nrvideo-colors=false/i[R(0x179)](window[R(0x1f8)][R(0x253)])&&(h[R(0x215)]=!0x1);}}()),g[I(0x1c5)]=h;},0x92:(f,g)=>{const S=a0b;Object[S(0x217)](g,'__esModule',{'value':!0x0}),g[S(0x1c5)]=void 0x0,g[S(0x1c5)]=class{constructor(h){this['_attributes']={};}[S(0x1c9)](h,j){const T=S;j=Object['assign'](j||{},this[T(0x190)]);}['setAttribute'](h,j){const U=S;this[U(0x190)][h]=j;}['setAttributes'](h){const V=S;this[V(0x190)]['append'](h);}};},0x12e:(f,g,h)=>{const W=a0b;Object['defineProperty'](g,W(0x1ac),{'value':!0x0}),g[W(0x1c5)]=void 0x0;var j=p(h(0x14a)),k=p(h(0x238)),l=p(h(0x1c7)),m=p(h(0x33));function p(u){const X=W;return u&&u[X(0x1ac)]?u:{'default':u};}class q extends k[W(0x1c5)]{constructor(u){const Y=W;super(),this[Y(0x2ab)]={},this[Y(0x17e)]=null,this[Y(0x27a)]=null,this[Y(0x1a4)]=new l[(Y(0x1c5))](),this['_trackerReadyChrono'][Y(0x27d)](),this[Y(0x1eb)]=m[Y(0x1c5)]['ACTION_TABLE'],this[Y(0x15b)]=m[Y(0x1c5)]['ACTION_AD_TABLE'],u=u||{},this['setOptions'](u);}[W(0x1f0)](u){const Z=W;u&&(u['parentTracker']&&(this[Z(0x27a)]=u[Z(0x27a)]),u['customData']&&(this[Z(0x2ab)]=u['customData']),u[Z(0x17e)]&&(this[Z(0x17e)]=u['heartbeat']));}[W(0x18a)](){this['unregisterListeners']();}[W(0x279)](){}[W(0x17a)](){}['getHeartbeat'](){const a0=W;return this[a0(0x20c)][a0(0x231)]?0x7d0:this['heartbeat']?this[a0(0x17e)]:this[a0(0x27a)]&&this[a0(0x27a)]['heartbeat']?this[a0(0x27a)][a0(0x17e)]:0x7530;}[W(0x200)](){const a1=W;this[a1(0x16f)]=setInterval(this[a1(0x205)][a1(0x1c3)](this),Math['max'](this[a1(0x13e)](),0x7d0));}[W(0x19c)](){const a2=W;this[a2(0x16f)]&&clearInterval(this[a2(0x16f)]);}[W(0x205)](u){const a3=W;this[a3(0x24d)](q['Events']['HEARTBEAT'],u);}[W(0x192)](u,v){const a4=W;(u=u||{})[a4(0x1d1)]=this[a4(0x2b6)](),u[a4(0x1d0)]=this[a4(0x1e5)](),u['coreVersion']=j[a4(0x1c5)][a4(0x2a5)],u[a4(0x120)]=this['_trackerReadyChrono']['getDeltaTime']();for(let w in this[a4(0x2ab)])u[w]=this['customData'][w];return null!=document['hidden']&&(u['isBackgroundEvent']=document[a4(0x202)]),u;}[W(0x1e5)](){const a5=W;return j[a5(0x1c5)][a5(0x2a5)];}[W(0x2b6)](){return'base-tracker';}[W(0x24d)](u,v){const a6=W;this[a6(0x289)](a6(0x19a),u,this[a6(0x192)](v));}['sendVideoAdAction'](u,v){const a7=W;this[a7(0x289)](a7(0x1ef),u,this['getAttributes'](v));}['sendVideoErrorAction'](u,v){const a8=W;let w=this[a8(0x224)]()?a8(0x232):'videoError';this[a8(0x289)]('VideoErrorAction',u,this[a8(0x192)](v,w));}[W(0x183)](u,v){const a9=W;this[a9(0x289)](a9(0x11f),u,this[a9(0x192)](v,a9(0x23f)));}}q[W(0x1c4)]={'HEARTBEAT':W(0x2aa)},g['default']=q;},0x148:(f,g,h)=>{const ab=a0b;Object['defineProperty'](g,'__esModule',{'value':!0x0}),g['default']=void 0x0;var j=l(h(0x1c7)),k=l(h(0x90));function l(m){const aa=a0b;return m&&m[aa(0x1ac)]?m:{'default':m};}g[ab(0x1c5)]=class{constructor(){const ac=ab;this[ac(0x164)](),this[ac(0x20e)]=Date['now'](),this['_hb']=!0x0,this[ac(0x15e)]=0x0,this[ac(0x144)]=0x0;}['reset'](){const ad=ab;this[ad(0x1b2)]=null,this[ad(0x196)]=0x0,this[ad(0x231)]=!0x1,this[ad(0x290)]=0x0,this['numberOfAds']=0x0,this[ad(0x174)]=0x0,this['totalPlaytime']=0x0,this[ad(0x142)]=0x0,this[ad(0x150)]=!0x1,this[ad(0x1bc)]=!0x1,this[ad(0x1d6)](),this[ad(0x1fb)]();}[ab(0x1d6)](){const ae=ab;this[ae(0x1ed)]=!0x1,this['isRequested']=!0x1,this[ae(0x180)]=!0x1,this[ae(0x2b5)]=!0x1,this[ae(0x263)]=!0x1,this['isBuffering']=!0x1,this[ae(0x247)]=!0x1;}[ab(0x1fb)](){const af=ab;this['timeSinceRequested']=new j[(af(0x1c5))](),this[af(0x1bd)]=new j[(af(0x1c5))](),this[af(0x13b)]=new j[(af(0x1c5))](),this[af(0x16b)]=new j['default'](),this[af(0x2ad)]=new j[(af(0x1c5))](),this['timeSinceAdBreakStart']=new j[(af(0x1c5))](),this[af(0x134)]=new j[(af(0x1c5))](),this['timeSinceLastHeartbeat']=new j[(af(0x1c5))](),this[af(0x1a3)]=new j[(af(0x1c5))](),this[af(0x24e)]=new j['default'](),this['timeSinceLastAd']=new j[(af(0x1c5))](),this['timeSinceResumed']=new j[(af(0x1c5))](),this[af(0x260)]=new j['default'](),this[af(0x1e0)]=new j['default'](),this[af(0x2b0)]={},this[af(0x242)]=new j['default'](),this[af(0x1ce)]=new j[(af(0x1c5))]();}['isAd'](){const ag=ab;return this[ag(0x231)];}[ab(0x195)](m){const ah=ab;this[ah(0x231)]=m;}[ab(0x173)](m){const ai=ab;this[ai(0x2b0)][m]=new j[(ai(0x1c5))](),this[ai(0x2b0)][m]['start']();}['removeTimeSinceAttribute'](m){const aj=ab;delete this[aj(0x2b0)][m];}['getViewSession'](){const ak=ab;if(!this[ak(0x1b2)]){let m=new Date()['getTime'](),o=Math[ak(0x17c)]()['toString'](0x24)[ak(0x1dd)](0x2)+Math['random']()['toString'](0x24)[ak(0x1dd)](0x2);this[ak(0x1b2)]=m+'-'+o;}return this[ak(0x1b2)];}[ab(0x1ae)](){const al=ab;return this[al(0x143)]()+'-'+this['_viewCount'];}[ab(0x21b)](m){const am=ab;m=m||{},this['isAd']()?(this[am(0x27f)]&&(m['timeSinceAdRequested']=this[am(0x223)][am(0x23e)](),m[am(0x15c)]=this[am(0x122)][am(0x23e)]()),this[am(0x180)]&&(m[am(0x1a1)]=this['timeSinceStarted'][am(0x23e)]()),this[am(0x2b5)]&&(m[am(0x170)]=this[am(0x13b)][am(0x23e)]()),this[am(0x156)]&&(m[am(0x245)]=this[am(0x2ad)][am(0x23e)]()),this[am(0x263)]&&(m[am(0x125)]=this['timeSinceSeekBegin']['getDeltaTime']()),this[am(0x150)]&&(m[am(0x2a3)]=this[am(0x219)]['getDeltaTime']()),m['numberOfAds']=this[am(0x18f)]):(this[am(0x27f)]&&(m[am(0x223)]=this['timeSinceRequested'][am(0x23e)](),m[am(0x122)]=this[am(0x122)][am(0x23e)]()),this[am(0x180)]&&(m[am(0x1bd)]=this[am(0x1bd)]['getDeltaTime']()),this[am(0x2b5)]&&(m[am(0x13b)]=this[am(0x13b)][am(0x23e)]()),this[am(0x156)]&&(m[am(0x2ad)]=this[am(0x2ad)][am(0x23e)]()),this[am(0x263)]&&(m['timeSinceSeekBegin']=this[am(0x16b)][am(0x23e)]()),m[am(0x1a9)]=this[am(0x1a9)][am(0x23e)](),m[am(0x174)]=this[am(0x174)]),m[am(0x290)]=this[am(0x290)],this[am(0x224)]()||(this[am(0x1e0)][am(0x212)]>0x0?m['playtimeSinceLastEvent']=this[am(0x1e0)][am(0x23e)]():m['playtimeSinceLastEvent']=0x0,this[am(0x247)]?this[am(0x1e0)][am(0x27d)]():this[am(0x1e0)][am(0x164)](),this[am(0x16c)]+=m['playtimeSinceLastEvent'],m[am(0x16c)]=this[am(0x16c)]);for(const [o,p]of Object[am(0x2a1)](this['customTimeSinceAttributes']))m[o]=p['getDeltaTime']();return m;}[ab(0x220)](m){const an=ab;let o='';return o=m?an(0x266):this[an(0x263)]?an(0x255):this[an(0x2b5)]?'pause':'connection',k['default'][an(0x148)](an(0x1f6)+o),o;}[ab(0x193)](){this['_viewCount']++;}[ab(0x149)](){const ao=ab;return!this[ao(0x1ed)]&&(this[ao(0x1ed)]=!0x0,!0x0);}[ab(0x29f)](){const ap=ab;return!this[ap(0x27f)]&&(this['isRequested']=!0x0,this['timeSinceLastAd'][ap(0x164)](),this[ap(0x223)]['start'](),!0x0);}['goStart'](){const aq=ab;return!(!this[aq(0x27f)]||this['isStarted']||(this[aq(0x224)]()?this['numberOfAds']++:this[aq(0x174)]++,this['isStarted']=!0x0,this['isPlaying']=!0x0,this[aq(0x1bd)]['start'](),this[aq(0x1e0)][aq(0x27d)](),0x0));}[ab(0x2b2)](){const ar=ab;return!!this['isRequested']&&(this['numberOfErrors']=0x0,this['resetFlags'](),this[ar(0x223)][ar(0x188)](),this[ar(0x1bd)][ar(0x188)](),this[ar(0x1e0)]['stop'](),!0x0);}[ab(0x210)](){const as=ab;return!(!this[as(0x180)]||this[as(0x2b5)]||(this[as(0x2b5)]=!0x0,this['isPlaying']=!0x1,this[as(0x13b)][as(0x27d)](),this[as(0x1e0)][as(0x188)](),this[as(0x197)][as(0x164)](),this[as(0x156)]&&(this[as(0x144)]+=this[as(0x1ce)][as(0x23e)]()),this[as(0x242)][as(0x27d)](),0x0));}[ab(0x1af)](){const at=ab;return!(!this[at(0x180)]||!this[at(0x2b5)]||(this[at(0x2b5)]=!0x1,this[at(0x247)]=!0x0,this[at(0x13b)]['stop'](),this[at(0x197)][at(0x27d)](),this['_hb']?(this['_acc']=this[at(0x242)][at(0x23e)](),this[at(0x236)]=!0x1):(this['isBuffering']&&this['bufferElapsedTime'][at(0x27d)](),this[at(0x15e)]+=this[at(0x242)][at(0x23e)]()),0x0));}[ab(0x177)](){const au=ab;return!(!this[au(0x27f)]||this[au(0x156)]||(this['isBuffering']=!0x0,this[au(0x247)]=!0x1,this[au(0x2ad)][au(0x27d)](),this[au(0x1ce)][au(0x27d)](),0x0));}[ab(0x1d9)](){const av=ab;return!(!this[av(0x27f)]||!this[av(0x156)]||(this[av(0x156)]=!0x1,this[av(0x247)]=!0x0,this[av(0x2ad)]['stop'](),this[av(0x236)]?(this[av(0x144)]=this[av(0x1ce)][av(0x23e)](),this[av(0x236)]=!0x1):this[av(0x144)]+=this['bufferElapsedTime'][av(0x23e)](),0x0));}['goSeekStart'](){const aw=ab;return!(!this[aw(0x180)]||this[aw(0x263)]||(this['isSeeking']=!0x0,this[aw(0x247)]=!0x1,this[aw(0x16b)][aw(0x27d)](),this[aw(0x260)]['reset'](),0x0));}[ab(0x209)](){const ax=ab;return!(!this[ax(0x180)]||!this[ax(0x263)]||(this[ax(0x263)]=!0x1,this[ax(0x247)]=!0x0,this[ax(0x16b)][ax(0x188)](),this[ax(0x260)][ax(0x27d)](),0x0));}[ab(0x277)](){const ay=ab;return!this['isAdBreak']&&(this[ay(0x150)]=!0x0,this[ay(0x219)][ay(0x27d)](),!0x0);}[ab(0x1b0)](){const az=ab;return!!this['isAdBreak']&&(this[az(0x27f)]=!0x1,this['isAdBreak']=!0x1,this[az(0x142)]=this['timeSinceAdBreakStart'][az(0x23e)](),this['timeSinceAdBreakStart']['stop'](),!0x0);}['goDownload'](){const aA=ab;this[aA(0x134)][aA(0x27d)]();}[ab(0x2b4)](){this['timeSinceLastHeartbeat']['start']();}[ab(0x250)](){const aB=ab;this[aB(0x1a3)][aB(0x27d)]();}[ab(0x1ab)](){const aC=ab;this[aC(0x24e)][aC(0x27d)]();}[ab(0x238)](){const aD=ab;this[aD(0x28a)]=!0x0,this['numberOfErrors']++;}[ab(0x19b)](){const aE=ab;this[aE(0x1a9)][aE(0x27d)]();}};},0x14a:f=>{const aF=a0b;f['exports']=JSON[aF(0x1aa)]('{\x22name\x22:\x22@newrelic/video-core\x22,\x22version\x22:\x223.1.0\x22,\x22description\x22:\x22New\x20Relic\x20video\x20tracking\x20core\x20library\x22,\x22main\x22:\x22./dist/cjs/index.js\x22,\x22module\x22:\x22./dist/esm/index.js\x22,\x22scripts\x22:{\x22build\x22:\x22webpack\x20--mode\x20production\x22,\x22build:dev\x22:\x22webpack\x20--mode\x20development\x22,\x22watch\x22:\x22webpack\x20--mode\x20production\x20--progress\x20--color\x20--watch\x22,\x22watch:dev\x22:\x22webpack\x20--progress\x20--color\x20--watch\x22,\x22clean\x22:\x22rm\x20-rf\x20dist\x20coverage\x20doc\x22,\x22test\x22:\x22nyc\x20--reporter=html\x20--reporter=text\x20mocha\x20--require\x20@babel/register\x22,\x22doc\x22:\x22jsdoc\x20-c\x20jsdoc.json\x20-d\x20documentation\x22,\x22deploy\x22:\x22node\x20scripts/deploy.js\x22,\x22third-party-updates\x22:\x22oss\x20third-party\x20manifest\x20--includeOptDeps\x20&&\x20oss\x20third-party\x20notices\x20--includeOptDeps\x20&&\x20git\x20add\x20THIRD_PARTY_NOTICES.md\x20third_party_manifest.json\x22},\x22repository\x22:{\x22type\x22:\x22git\x22,\x22url\x22:\x22https://github.com/newrelic/video-core-js\x22},\x22author\x22:\x22Jordi\x20Aguilar\x22,\x22contributors\x22:[\x22Andreu\x20Santarén\x20Llop\x22],\x22license\x22:\x22MIT\x22,\x22devDependencies\x22:{\x22@babel/core\x22:\x22^7.24.5\x22,\x22@babel/plugin-transform-modules-commonjs\x22:\x22^7.24.1\x22,\x22@newrelic/newrelic-oss-cli\x22:\x22^0.1.2\x22,\x22@babel/preset-env\x22:\x22^7.24.5\x22,\x22@babel/register\x22:\x22^7.24.6\x22,\x22aws-sdk\x22:\x22^2.920.0\x22,\x22babel-loader\x22:\x22^9.1.3\x22,\x22chai\x22:\x22^4.3.4\x22,\x22diff\x22:\x22^5.0.0\x22,\x22jsdom\x22:\x22^25.0.1\x22,\x22mocha\x22:\x22^10.4.0\x22,\x22nyc\x22:\x22^15.1.0\x22,\x22sinon\x22:\x22^2.4.1\x22,\x22webpack\x22:\x22^5.91.0\x22,\x22webpack-cli\x22:\x22^4.9.2\x22,\x22webpack-obfuscator\x22:\x22^3.5.1\x22},\x22files\x22:[\x22THIRD_PARTY_NOTICES.md\x22,\x22dist\x22,\x22CHANGELOG.md\x22,\x22README.md\x22,\x22!test\x22],\x22publishConfig\x22:{\x22access\x22:\x22public\x22}}');},0x18f:(f,g,j)=>{const aG=a0b;Object[aG(0x217)](g,'__esModule',{'value':!0x0}),g['default']=void 0x0;var k=p(j(0x90)),m=p(j(0x92));function p(y){const aH=aG;return y&&y[aH(0x1ac)]?y:{'default':y};}class q{static[aG(0x211)](y){const aI=aG;y['on']&&y[aI(0x289)]?(v[aI(0x1f4)](y),y['on']('*',x),aI(0x19f)==typeof y['trackerInit']&&y[aI(0x12e)]()):k['default']['error'](aI(0x1b5),y);}static['removeTracker'](y){const aJ=aG;y['off']('*',x),y[aJ(0x18a)]();let z=v['indexOf'](y);-0x1!==z&&v['splice'](z,0x1);}static['getTrackers'](){return v;}static[aG(0x14c)](){return u;}static[aG(0x28e)](y){u=y;}static['send'](y,z,A){const aK=aG;null!=q[aK(0x14c)]()&&q[aK(0x14c)]()instanceof m['default']?q['getBackend']()['send'](y,z,A):aK(0x1db)!=typeof newrelic&&newrelic['recordCustomEvent']?(void 0x0!==A&&(A[aK(0x1c8)]=window[aK(0x295)][aK(0x24b)]()/0x3e8),newrelic[aK(0x2a2)](y,{'actionName':z,...A})):w||(k[aK(0x1c5)][aK(0x1ba)](aK(0x29e),aK(0x131)),w=!0x0);}static[aG(0x265)](y){const aL=aG;q[aL(0x1c9)](aL(0x1d3),y);}}let u,v=[],w=!0x1;function x(y){const aM=aG;let z=function(A){let B={};for(let C in A)null!==A[C]&&void 0x0!==A[C]&&(B[C]=A[C]);return B;}(y[aM(0x27b)]);k['default'][aM(0x165)]<=k[aM(0x1c5)][aM(0x207)]['DEBUG']?k['default'][aM(0x1ca)]('Sent',y[aM(0x2a8)],z):k[aM(0x1c5)][aM(0x1ca)](aM(0x286),y[aM(0x2a8)]),q[aM(0x1c9)](y[aM(0x298)],y[aM(0x2a8)],z);}g['default']=q;},0x196:(f,g,h)=>{const aN=a0b;Object[aN(0x217)](g,aN(0x1ac),{'value':!0x0}),g[aN(0x1c5)]=void 0x0;var j=l(h(0x92)),k=l(h(0x90));function l(o){const aO=aN;return o&&o[aO(0x1ac)]?o:{'default':o};}class m extends j['default']{constructor(o,p){const aP=aN;super(),this[aP(0x191)]=o,this['_apiKey']=p,this[aP(0x22d)]='',this[aP(0x1be)]=[],this[aP(0x155)]=!0x1,this[aP(0x127)]=0x0,setInterval(()=>{const aQ=aP;this[aQ(0x1b9)](m[aQ(0x24a)][aQ(0x2a6)]);},0x2710);}[aN(0x1c9)](o,p,q){const aR=aN;if(this[aR(0x22d)]=o,super[aR(0x1c9)](p,q),this[aR(0x1be)][aR(0x20b)]<0x1f4){(q=this[aR(0x272)](q))[aR(0x298)]=this[aR(0x22d)],q[aR(0x28b)]=p;let u=Date['now']();u>this[aR(0x127)]?(q[aR(0x21a)]=u,this[aR(0x127)]=u):(this[aR(0x127)]++,q['timestamp']=this[aR(0x127)]),this[aR(0x1be)][aR(0x1f4)](q);}}[aN(0x272)](o){const aS=aN;o[aS(0x1e7)]=window[aS(0x1f8)][aS(0x146)],o['currentUrl']=window[aS(0x1f8)]['origin']+window['location'][aS(0x281)],o[aS(0x130)]=document[aS(0x1c2)];let p=aS(0x128);-0x1!=navigator[aS(0x258)]['indexOf'](aS(0x189))?p='Windows':-0x1!=navigator['userAgent'][aS(0x201)](aS(0x2b3))?p=aS(0x2b3):-0x1!=navigator[aS(0x258)]['indexOf']('Mac')?p=aS(0x1fe):navigator[aS(0x258)][aS(0x1cd)](/iPhone|iPad|iPod/i)?p=aS(0x22c):-0x1!=navigator[aS(0x258)]['indexOf']('Linux')?p=aS(0x248):-0x1!=navigator[aS(0x258)][aS(0x201)](aS(0x12b))&&(p=aS(0x14b)),o[aS(0x14a)]=p;let q='Unknown';if(-0x1!=navigator[aS(0x258)][aS(0x201)](aS(0x287))?q=aS(0x287):-0x1!=navigator[aS(0x258)][aS(0x201)]('Firefox')?q=aS(0x1a0):-0x1!=navigator[aS(0x258)][aS(0x201)](aS(0x140))?q='IE':-0x1!=navigator[aS(0x258)][aS(0x201)](aS(0x22e))?q=aS(0x1ec):-0x1!=navigator['userAgent'][aS(0x201)](aS(0x2b1))?q='Safari':-0x1!=navigator['userAgent']['indexOf']('Opera')&&(q=aS(0x25f)),o['userAgentName']=q,!o[aS(0x1e1)]){let u='Unknown';u=navigator['userAgent'][aS(0x1cd)](/Tablet|iPad/i)?aS(0x251):navigator[aS(0x258)][aS(0x1cd)](/Mobile|Windows Phone|Lumia|Android|webOS|iPhone|iPod|Blackberry|PlayBook|BB10|Opera Mini|\bCrMo\/|Opera Mobi/i)?aS(0x176):null!=window[aS(0x1cf)]?aS(0x2a4):aS(0x160),o[aS(0x1e1)]=u;}return o;}['harvestHandler'](o){const aT=aN;o==m['Source']['TIMER']&&this[aT(0x155)]?k[aT(0x1c5)]['debug'](aT(0x257)):(this[aT(0x155)]=!0x0,this['_eventBuffer'][aT(0x20b)]>0x0?(k[aT(0x1c5)][aT(0x148)](aT(0x254),this[aT(0x1be)]),this[aT(0x29b)](this[aT(0x1be)][aT(0x166)]())):this['_harvestLocked']=!0x1);}[aN(0x29b)](o){const aU=aN,p={'method':aU(0x18d),'headers':{'Content-Type':aU(0x126),'X-Insert-Key':this['_apiKey']},'body':JSON['stringify'](o)},q=aU(0x1ad)+this[aU(0x191)]+aU(0x1a7);fetch(q,p)[aU(0x1cc)](u=>u[aU(0x141)]())[aU(0x1cc)](u=>{this['insightsRequestResponse'](u);})[aU(0x22f)](u=>{const aV=aU;k['default']['error'](aV(0x233),u,o),this[aV(0x1be)][aV(0x1f4)](o),this[aV(0x155)]=!0x1;});}[aN(0x235)](o){const aW=aN;this[aW(0x1b9)](m[aW(0x24a)][aW(0x2ac)]);}}m[aN(0x24a)]={'TIMER':'TIMER','FETCH':aN(0x2ac)},g[aN(0x1c5)]=m;},0x1c7:(f,g)=>{const aX=a0b;Object[aX(0x217)](g,aX(0x1ac),{'value':!0x0}),g['default']=void 0x0;class h{constructor(){const aY=aX;this[aY(0x164)]();}[aX(0x164)](){const aZ=aX;this[aZ(0x212)]=0x0,this[aZ(0x25d)]=0x0,this[aZ(0x159)]=0x0;}[aX(0x23e)](){const b0=aX;return this[b0(0x212)]?this[b0(0x159)]+(new Date()[b0(0x1b3)]()-this[b0(0x212)]):null;}[aX(0x27d)](){const b1=aX;this[b1(0x212)]=new Date()['getTime'](),this[b1(0x25d)]=0x0;}[aX(0x188)](){const b2=aX;return this[b2(0x25d)]=new Date()[b2(0x1b3)](),this[b2(0x23e)]();}['clone'](){const b3=aX;var j=new h();return j[b3(0x212)]=this[b3(0x212)],j['stopTime']=this[b3(0x25d)],j['offset']=this[b3(0x159)],j;}}g[aX(0x1c5)]=h;},0x238:(f,g)=>{const b4=a0b;Object[b4(0x217)](g,b4(0x1ac),{'value':!0x0}),g[b4(0x1c5)]=void 0x0,g[b4(0x1c5)]=class{['on'](h,j){const b5=b4;if(this[b5(0x21f)]=this['_listeners']||{},b5(0x19f)==typeof j)return this['_listeners'][h]=this[b5(0x21f)][h]||[],this[b5(0x21f)][h][b5(0x1f4)](j),this;}[b4(0x157)](h,j){const b6=b4;if(this[b6(0x21f)]=this[b6(0x21f)]||{},this['_listeners'][h]){var k=this[b6(0x21f)][h][b6(0x201)](j);-0x1!==k&&this[b6(0x21f)][h][b6(0x27e)](k,0x1);}return this;}[b4(0x289)](h,j,k){const b7=b4;return this[b7(0x21f)]=this[b7(0x21f)]||{},k=k||{},Array[b7(0x243)](this[b7(0x21f)][j])&&this[b7(0x21f)][j]['forEach'](l=>{const b8=b7;l[b8(0x283)](this,{'eventType':h,'type':j,'data':k,'target':this});}),Array[b7(0x243)](this[b7(0x21f)]['*'])&&this[b7(0x21f)]['*'][b7(0x129)](l=>{l['call'](this,{'eventType':h,'type':j,'data':k,'target':this});}),this;}};},0x319:(f,g,j)=>{const b9=a0b;Object[b9(0x217)](g,b9(0x1ac),{'value':!0x0}),g[b9(0x1c5)]=void 0x0;var k=q(j(0x90)),l=q(j(0x12e)),m=q(j(0x148)),p=q(j(0x14a));function q(w){const ba=b9;return w&&w[ba(0x1ac)]?w:{'default':w};}class u extends l[b9(0x1c5)]{constructor(w,x){const bb=b9;super(),this[bb(0x20c)]=new m[(bb(0x1c5))](),this[bb(0x20d)]=null,this['_lastBufferType']=null,this[bb(0x26e)]=null,x=x||{},this[bb(0x1f0)](x),w&&this[bb(0x29d)](w,x['tag']),k[bb(0x1c5)][bb(0x1ca)](bb(0x121)+this[bb(0x2b6)]()+'\x20v'+this[bb(0x1e5)]()+bb(0x13d));}[b9(0x23a)](w){this['_userId']=w;}[b9(0x1f0)](w){const bc=b9;w&&(w[bc(0x20d)]&&this[bc(0x1df)](w[bc(0x20d)]),bc(0x22b)==typeof w[bc(0x224)]&&this['setIsAd'](w[bc(0x224)]),l[bc(0x1c5)]['prototype']['setOptions'][bc(0x262)](this,arguments));}[b9(0x29d)](w,x){const bd=b9;(this[bd(0x293)]||this[bd(0x1b7)])&&this[bd(0x18a)](),bd(0x1db)!=typeof document&&document[bd(0x206)]&&(bd(0x1f1)==typeof w&&(w=document['getElementById'](w)),bd(0x1f1)==typeof x&&(x=document['getElementById'](x))),x=x||w,this[bd(0x293)]=w,this[bd(0x1b7)]=x,this[bd(0x279)]();}[b9(0x224)](){const be=b9;return this['state'][be(0x224)]();}['setIsAd'](w){const bf=b9;this['state'][bf(0x195)](w);}[b9(0x1df)](w){const bg=b9;this[bg(0x14e)](),w&&(this[bg(0x20d)]=w,this[bg(0x20d)][bg(0x195)](!0x0),this[bg(0x20d)]['parentTracker']=this,this['adsTracker']['on']('*',v['bind'](this)));}[b9(0x14e)](){const bh=b9;this[bh(0x20d)]&&(this['adsTracker'][bh(0x157)]('*',v),this['adsTracker'][bh(0x18a)]());}['dispose'](){const bi=b9;this['stopHeartbeat'](),this['disposeAdsTracker'](),this[bi(0x17a)](),this['player']=null,this['tag']=null;}['registerListeners'](){}[b9(0x17a)](){}[b9(0x1ae)](){const bj=b9;return this['parentTracker']?this[bj(0x27a)][bj(0x1ae)]():this[bj(0x20c)]['getViewId']();}[b9(0x143)](){const bk=b9;return this[bk(0x27a)]?this[bk(0x27a)][bk(0x143)]():this[bk(0x20c)][bk(0x143)]();}['getVideoId'](){return null;}[b9(0x299)](){return null;}[b9(0x139)](){return null;}[b9(0x228)](){return null;}['getWebkitBitrate'](){const bl=b9;if(this['tag']&&this[bl(0x1b7)][bl(0x1b4)]){let w;if(this['_lastWebkitBitrate']){w=this[bl(0x1b7)][bl(0x1b4)];let x=w-this[bl(0x246)],y=this[bl(0x13e)]()/0x3e8;w=Math[bl(0x172)](x/y*0x8);}return this['_lastWebkitBitrate']=this['tag']['webkitVideoDecodedByteCount'],w||null;}}['getRenditionName'](){return null;}[b9(0x256)](){return null;}[b9(0x136)](w){const bm=b9;let x,y=this[bm(0x256)]();return this['isAd']()?(x=this[bm(0x2ae)],w&&(this[bm(0x2ae)]=y)):(x=this[bm(0x1e2)],w&&(this[bm(0x1e2)]=y)),y&&x?y>x?'up':y<x?bm(0x27c):null:null;}[b9(0x1f7)](){const bn=b9;return this[bn(0x1b7)]?this['tag'][bn(0x229)]:null;}[b9(0x1fa)](){const bo=b9;return this[bo(0x1b7)]?this[bo(0x1b7)][bo(0x2a0)]:null;}[b9(0x153)](){const bp=b9;return this[bp(0x1b7)]?this[bp(0x1b7)][bp(0x222)]:null;}['getPlayhead'](){const bq=b9;return this[bq(0x1b7)]?this[bq(0x1b7)]['currentTime']:null;}[b9(0x12d)](){return null;}[b9(0x161)](){const br=b9;return this['tag']?this[br(0x1b7)][br(0x1f3)]:null;}[b9(0x1f9)](){const bs=b9;return this[bs(0x1b7)]?this['tag']['playbackRate']:null;}['isMuted'](){const bt=b9;return this['tag']?this[bt(0x1b7)][bt(0x26a)]:null;}[b9(0x23b)](){return null;}[b9(0x14f)](){return null;}[b9(0x1c0)](){return this['getTrackerName']();}[b9(0x1bb)](){const bu=b9;return p[bu(0x1c5)][bu(0x2a5)];}[b9(0x268)](){return null;}[b9(0x230)](){const bv=b9;return this['tag']?this[bv(0x1b7)][bv(0x294)]:null;}[b9(0x203)](){const bw=b9;return this[bw(0x1b7)]?this[bw(0x1b7)]['preload']:null;}[b9(0x186)](){return null;}['getAdPosition'](){const bx=b9;return this[bx(0x27a)]?this[bx(0x27a)][bx(0x20c)][bx(0x180)]?bx(0x269):'pre':null;}[b9(0x1a2)](){return null;}[b9(0x2b8)](){return null;}[b9(0x15a)](){return null;}[b9(0x147)](){return null;}['getInstrumentationVersion'](){return null;}['getAttributes'](w,x){const by=b9;if(void 0x0===(w=l[by(0x1c5)][by(0x18b)]['getAttributes'][by(0x262)](this,arguments))['isAd']&&(w[by(0x224)]=this[by(0x224)]()),w[by(0x28c)]=this[by(0x143)](),w['viewId']=this[by(0x1ae)](),w['playerName']=this[by(0x1c0)](),w['playerVersion']=this[by(0x1bb)](),w[by(0x151)]=this[by(0x15a)](),w['instrumentation.name']=this[by(0x147)](),w[by(0x249)]=this[by(0x132)](),w['enduser.id']=this['_userId'],w[by(0x13f)]='Browser',by(0x23f)===x)return w;try{w[by(0x1e7)]=window[by(0x1f8)][by(0x146)];}catch(y){}this['isAd']()?(w[by(0x24f)]=this[by(0x225)](),w[by(0x252)]=this['getTitle'](),w[by(0x182)]=this[by(0x161)](),w[by(0x280)]=this['getCdn'](),w[by(0x25e)]=this[by(0x228)]()||this['getWebkitBitrate']()||this[by(0x256)](),w[by(0x226)]=this[by(0x171)](),w['adRenditionBitrate']=this[by(0x256)](),w[by(0x274)]=this[by(0x1f7)](),w[by(0x1e6)]=this[by(0x1fa)](),w[by(0x1da)]=this[by(0x153)](),w[by(0x1b8)]=this['getPlayhead'](),w[by(0x135)]=this[by(0x12d)](),w['adIsMuted']=this[by(0x278)](),w[by(0x1d4)]=this[by(0x268)](),w[by(0x273)]=this[by(0x1a5)](),w[by(0x152)]=this['getAdCreativeId'](),w[by(0x291)]=this[by(0x1a2)]()):(w['contentId']=this[by(0x225)](),w[by(0x1c7)]=this[by(0x299)](),w[by(0x285)]=this[by(0x161)](),w[by(0x16d)]=this[by(0x14f)](),w[by(0x16e)]=this[by(0x11e)](),w[by(0x185)]=this[by(0x139)](),w[by(0x23c)]=this[by(0x228)]()||this['getWebkitBitrate']()||this[by(0x256)](),w[by(0x1b6)]=this[by(0x171)](),w['contentRenditionBitrate']=this['getRenditionBitrate'](),w[by(0x221)]=this[by(0x1f7)](),w[by(0x18e)]=this[by(0x1fa)](),w[by(0x133)]=this[by(0x153)](),w[by(0x1d7)]=this[by(0x12d)](),w[by(0x175)]=this[by(0x1f9)](),w[by(0x25a)]=this['isFullscreen'](),w['contentIsMuted']=this[by(0x278)](),w[by(0x28f)]=this['isAutoplayed'](),w[by(0x241)]=this['getPreload'](),w[by(0x1e3)]=this[by(0x268)](),null!=this[by(0x20d)]&&this[by(0x20d)]['state'][by(0x142)]>0x0&&(w[by(0x142)]=this['adsTracker']['state'][by(0x142)])),this[by(0x20c)][by(0x21b)](w);for(let z in this[by(0x2ab)])w[z]=this[by(0x2ab)][z];return w;}[b9(0x1d2)](w,x,y){const bz=b9;y=y||{},this[bz(0x183)](w,y),this[bz(0x20c)]['setTimeSinceAttribute'](x);}[b9(0x259)](w){const bA=b9;this['state'][bA(0x149)]()&&(w=w||{},this['sendVideoAction'](u[bA(0x1c4)][bA(0x227)],w));}['sendRequest'](w){const bB=b9;if(this[bB(0x20c)][bB(0x29f)]()){let x;this[bB(0x224)]()?(x=u[bB(0x1c4)][bB(0x169)],this[bB(0x239)](x,w)):(x=u[bB(0x1c4)][bB(0x123)],this[bB(0x24d)](x,w));}}[b9(0x2a7)](w){const bC=b9;if(this[bC(0x20c)][bC(0x1dc)]()){let x;this[bC(0x224)]()?(x=u[bC(0x1c4)][bC(0x1bf)],this[bC(0x27a)]&&(this[bC(0x27a)][bC(0x20c)][bC(0x247)]=!0x1),this[bC(0x239)](x,w)):(x=u[bC(0x1c4)]['CONTENT_START'],this[bC(0x24d)](x,w)),this[bC(0x200)](),this['state'][bC(0x2b4)]();}}[b9(0x1f5)](w){const bD=b9;if(this[bD(0x20c)]['goEnd']()){let x;w=w||{},this['isAd']()?(x=u[bD(0x1c4)][bD(0x21e)],w['timeSinceAdRequested']=this['state'][bD(0x223)]['getDeltaTime'](),w[bD(0x1a1)]=this[bD(0x20c)][bD(0x1bd)]['getDeltaTime'](),this[bD(0x27a)]&&(this[bD(0x27a)]['state']['isPlaying']=!0x0)):(x=u[bD(0x1c4)][bD(0x25c)],w[bD(0x223)]=this['state'][bD(0x223)]['getDeltaTime'](),w[bD(0x1bd)]=this[bD(0x20c)]['timeSinceStarted'][bD(0x23e)]()),this[bD(0x19c)](),this[bD(0x224)]()?this['sendVideoAdAction'](x,w):this[bD(0x24d)](x,w),this[bD(0x27a)]&&this[bD(0x224)]()&&this[bD(0x27a)][bD(0x20c)][bD(0x19b)](),this[bD(0x20c)][bD(0x193)](),this[bD(0x20c)][bD(0x16c)]=0x0;}}['sendPause'](w){const bE=b9;if(this[bE(0x20c)]['goPause']()){let x=this[bE(0x224)]()?u['Events'][bE(0x275)]:u[bE(0x1c4)][bE(0x181)];this[bE(0x224)]()?this[bE(0x239)](x,w):this[bE(0x24d)](x,w);}}[b9(0x138)](w){const bF=b9;if(this[bF(0x20c)][bF(0x1af)]()){let x;w=w||{},this[bF(0x224)]()?(x=u[bF(0x1c4)][bF(0x240)],w[bF(0x170)]=this['state'][bF(0x13b)][bF(0x23e)]()):(x=u[bF(0x1c4)][bF(0x1e9)],w[bF(0x13b)]=this[bF(0x20c)][bF(0x13b)][bF(0x23e)]()),this[bF(0x224)]()?this[bF(0x239)](x,w):this['sendVideoAction'](x,w);}}[b9(0x24c)](w){const bG=b9;if(this['state'][bG(0x177)]()){let x;w=w||{},x=this[bG(0x224)]()?u[bG(0x1c4)][bG(0x22a)]:u[bG(0x1c4)]['CONTENT_BUFFER_START'],w=this[bG(0x1de)](w),this[bG(0x25b)]=w[bG(0x184)],this[bG(0x224)]()?this[bG(0x239)](x,w):this[bG(0x24d)](x,w);}}['sendBufferEnd'](w){const bH=b9;if(this[bH(0x20c)][bH(0x1d9)]()){let x;w=w||{},this[bH(0x224)]()?(x=u[bH(0x1c4)]['AD_BUFFER_END'],w[bH(0x245)]=this['state']['timeSinceBufferBegin']['getDeltaTime']()):(x=u['Events'][bH(0x297)],w['timeSinceBufferBegin']=this[bH(0x20c)][bH(0x2ad)][bH(0x23e)]()),w=this['buildBufferAttributes'](w),null!=this['_lastBufferType']&&(w['bufferType']=this[bH(0x25b)]),this[bH(0x224)]()?this[bH(0x239)](x,w):this[bH(0x24d)](x,w),this['state'][bH(0x1bc)]=!0x0;}}[b9(0x1de)](w){const bI=b9;return null==w[bI(0x1bd)]||w[bI(0x1bd)]<0x64?w[bI(0x29c)]=!this[bI(0x20c)]['initialBufferingHappened']:w['isInitialBuffering']=!0x1,w['bufferType']=this[bI(0x20c)][bI(0x220)](w[bI(0x29c)]),w[bI(0x197)]=this[bI(0x20c)][bI(0x197)][bI(0x23e)](),w[bI(0x260)]=this['state'][bI(0x260)][bI(0x23e)](),w;}[b9(0x270)](w){const bJ=b9;if(this[bJ(0x20c)][bJ(0x1ea)]()){let x;x=this['isAd']()?u[bJ(0x1c4)][bJ(0x1ff)]:u['Events'][bJ(0x19e)],this['isAd']()?this[bJ(0x239)](x,w):this[bJ(0x24d)](x,w);}}['sendSeekEnd'](w){const bK=b9;if(this[bK(0x20c)][bK(0x209)]()){let x;w=w||{},this[bK(0x224)]()?(x=u[bK(0x1c4)][bK(0x23d)],w['timeSinceAdSeekBegin']=this[bK(0x20c)][bK(0x16b)][bK(0x23e)]()):(x=u[bK(0x1c4)][bK(0x194)],w[bK(0x16b)]=this[bK(0x20c)][bK(0x16b)][bK(0x23e)]()),this[bK(0x224)]()?this[bK(0x239)](x,w):this[bK(0x24d)](x,w);}}[b9(0x296)](w){const bL=b9;(w=w||{})[bL(0x20c)]||k[bL(0x1c5)]['warn']('Called\x20sendDownload\x20without\x20{\x20state:\x20xxxxx\x20}.'),this[bL(0x24d)](u['Events']['DOWNLOAD'],w),this['state'][bL(0x264)]();}[b9(0x265)](w){const bM=b9;(w=w||{})['isAd']=this[bM(0x224)](),this[bM(0x20c)][bM(0x238)]();let x=this['isAd']()?u[bM(0x1c4)]['AD_ERROR']:u[bM(0x1c4)][bM(0x213)];this[bM(0x15f)](x,w);}['sendRenditionChanged'](w){const bN=b9;let x;(w=w||{})[bN(0x1a3)]=this[bN(0x20c)]['timeSinceLastRenditionChange']['getDeltaTime'](),w[bN(0x18c)]=this[bN(0x136)](!0x0),x=this[bN(0x224)]()?u[bN(0x1c4)][bN(0x17d)]:u[bN(0x1c4)][bN(0x244)],this[bN(0x224)]()?this[bN(0x239)](x,w):this[bN(0x24d)](x,w),this[bN(0x20c)][bN(0x250)]();}[b9(0x205)](w){const bO=b9;if(this[bO(0x20c)][bO(0x27f)]){let x,y=this['getHeartbeat']();this[bO(0x20c)][bO(0x236)]=!0x0,y=this[bO(0x1c6)](y),this[bO(0x224)]()?(x=u['Events']['AD_HEARTBEAT'],bO(0x13a)===this[bO(0x1c0)]()?this['sendVideoAdAction'](x,w):this[bO(0x239)](x,{'elapsedTime':y,...w})):(x=u[bO(0x1c4)][bO(0x199)],this[bO(0x24d)](x,{'elapsedTime':y,...w})),this['state'][bO(0x2b4)]();}}[b9(0x1c6)](w){const bP=b9;return this[bP(0x20c)][bP(0x15e)]&&(w-=this['state'][bP(0x15e)],this[bP(0x20c)][bP(0x15e)]=0x0),this['state'][bP(0x2b5)]&&((w-=this[bP(0x20c)][bP(0x242)][bP(0x23e)]())<0xa&&(w=0x0),this[bP(0x20c)][bP(0x242)][bP(0x27d)]()),this['state']['_bufferAcc']?(w-=this['state']['_bufferAcc'],this['state']['_bufferAcc']=0x0):this[bP(0x20c)][bP(0x156)]&&((w-=this[bP(0x20c)]['bufferElapsedTime'][bP(0x23e)]())<0x5&&(w=0x0),this[bP(0x20c)][bP(0x1ce)][bP(0x27d)]()),Math['max'](0x0,w);}[b9(0x276)](w){const bQ=b9;this['isAd']()&&this['state']['goAdBreakStart']()&&(this['state']['totalAdPlaytime']=0x0,this[bQ(0x27a)]&&(this['parentTracker'][bQ(0x20c)]['isPlaying']=!0x1),this[bQ(0x239)](u[bQ(0x1c4)][bQ(0x12a)],w));}[b9(0x208)](w){const bR=b9;this[bR(0x224)]()&&this[bR(0x20c)][bR(0x1b0)]()&&((w=w||{})[bR(0x2a3)]=this['state'][bR(0x219)]['getDeltaTime'](),this[bR(0x239)](u[bR(0x1c4)][bR(0x1c1)],w),this[bR(0x27a)]&&(this['parentTracker']['state'][bR(0x247)]=!0x0),this['stopHeartbeat'](),this['parentTracker']&&this[bR(0x224)]()&&this['parentTracker'][bR(0x20c)][bR(0x19b)]());}[b9(0x237)](w){const bS=b9;this[bS(0x224)]()&&((w=w||{})[bS(0x267)]||k[bS(0x1c5)][bS(0x216)](bS(0x167)),w[bS(0x24e)]=this[bS(0x20c)][bS(0x24e)][bS(0x23e)](),this[bS(0x239)](u[bS(0x1c4)]['AD_QUARTILE'],w),this[bS(0x20c)]['goAdQuartile']());}[b9(0x12c)](w){const bT=b9;this[bT(0x224)]()&&((w=w||{})[bT(0x2a9)]||k[bT(0x1c5)][bT(0x216)](bT(0x21d)),this[bT(0x239)](u['Events']['AD_CLICK'],w));}}function v(w){const bU=b9;this[bU(0x239)](w[bU(0x2a8)],w[bU(0x27b)]);}u['Events']={'PLAYER_READY':b9(0x227),'DOWNLOAD':b9(0x292),'ERROR':b9(0x1d3),'CONTENT_REQUEST':'CONTENT_REQUEST','CONTENT_START':'CONTENT_START','CONTENT_END':b9(0x25c),'CONTENT_PAUSE':b9(0x181),'CONTENT_RESUME':b9(0x1e9),'CONTENT_SEEK_START':b9(0x19e),'CONTENT_SEEK_END':b9(0x194),'CONTENT_BUFFER_START':b9(0x1a6),'CONTENT_BUFFER_END':b9(0x297),'CONTENT_HEARTBEAT':b9(0x199),'CONTENT_RENDITION_CHANGE':b9(0x244),'CONTENT_ERROR':b9(0x213),'AD_REQUEST':b9(0x169),'AD_START':'AD_START','AD_END':b9(0x21e),'AD_PAUSE':b9(0x275),'AD_RESUME':'AD_RESUME','AD_SEEK_START':b9(0x1ff),'AD_SEEK_END':b9(0x23d),'AD_BUFFER_START':'AD_BUFFER_START','AD_BUFFER_END':'AD_BUFFER_END','AD_HEARTBEAT':'AD_HEARTBEAT','AD_RENDITION_CHANGE':b9(0x17d),'AD_ERROR':b9(0x28d),'AD_BREAK_START':b9(0x12a),'AD_BREAK_END':b9(0x1c1),'AD_QUARTILE':b9(0x17f),'AD_CLICK':b9(0x14d)},g[b9(0x1c5)]=u;}},b={};function c(f){const bV=a0b;var g=b[f];if(void 0x0!==g)return g[bV(0x29a)];var h=b[f]={'exports':{}};return a[f](h,h['exports'],c),h[bV(0x29a)];}var d={};((()=>{const bW=a0b;var j=d;Object['defineProperty'](j,bW(0x1ac),{'value':!0x0}),j[bW(0x1c5)]=void 0x0;var k=D(c(0x92)),m=D(c(0x196)),p=D(c(0x18f)),q=D(c(0x33)),v=D(c(0x1c7)),w=D(c(0x90)),x=D(c(0x238)),y=D(c(0x12e)),z=D(c(0x319)),B=D(c(0x148)),C=c(0x14a);function D(F){const bX=bW;return F&&F[bX(0x1ac)]?F:{'default':F};}const E={'Constants':q[bW(0x1c5)],'Chrono':v[bW(0x1c5)],'Log':w[bW(0x1c5)],'Emitter':x[bW(0x1c5)],'Tracker':y[bW(0x1c5)],'VideoTracker':z[bW(0x1c5)],'VideoTrackerState':B['default'],'Core':p[bW(0x1c5)],'Backend':k[bW(0x1c5)],'NRInsightsBackend':m[bW(0x1c5)],'version':C[bW(0x2a5)]};j[bW(0x1c5)]=E;})()),module[bY(0x29a)][bY(0x178)]=d;})()));function a0b(a,b){const c=a0a();return a0b=function(d,e){d=d-0x11e;let f=c[d];return f;},a0b(a,b);}function a0a(){const bZ=['initialBufferingHappened','timeSinceStarted','_eventBuffer','AD_START','getPlayerName','AD_BREAK_END','referrer','bind','Events','default','adjustElapsedTimeForPause','contentTitle','timeSinceLoad','send','notice','darkred','then','match','bufferElapsedTime','cast','trackerVersion','trackerName','sendCustom','ERROR','adFps','loadeddata','resetFlags','contentLanguage','includeTime','goBufferEnd','adDuration','undefined','goStart','substring','buildBufferAttributes','setAdsTracker','playtimeSinceLastEvent','deviceType','_lastRendition','contentFps','prefix','getTrackerVersion','adRenditionWidth','pageUrl','waiting','CONTENT_RESUME','goSeekStart','_actionTable','Microsoft\x20Edge','isPlayerReady','playing','VideoAdAction','setOptions','string','ended','currentSrc','push','sendEnd','Buffer\x20Type\x20=\x20','getRenditionHeight','location','getPlayrate','getRenditionWidth','resetChronos','loadedmetadata','getSeconds','Mac','AD_SEEK_START','startHeartbeat','indexOf','hidden','getPreload','indigo','sendHeartbeat','getElementById','Levels','sendAdBreakEnd','goSeekEnd','42808XIwCIu','length','state','adsTracker','_createdAt','darkorange','goPause','addTracker','startTime','CONTENT_ERROR','DEBUG','colorful','warn','defineProperty','debugCommonVideoEvents:\x20No\x20common\x20listener\x20function\x20found\x20for\x20','timeSinceAdBreakStart','timestamp','getStateAttributes','post','Called\x20sendAdClick\x20without\x20{\x20url:\x20xxxxx\x20}.','AD_END','_listeners','calculateBufferType','contentRenditionHeight','duration','timeSinceRequested','isAd','getVideoId','adRenditionName','PLAYER_READY','getBitrate','videoHeight','AD_BUFFER_START','boolean','iOS','_eventType','Edge','catch','isAutoplayed','_isAd','adError','Error:','getDate','insightsRequestResponse','_hb','sendAdQuartile','goError','sendVideoAdAction','setUserId','isFullscreen','contentBitrate','AD_SEEK_END','getDeltaTime','customAction','AD_RESUME','contentPreload','elapsedTime','isArray','CONTENT_RENDITION_CHANGE','timeSinceAdBufferBegin','_lastWebkitBitrate','isPlaying','Linux','instrumentation.version','Source','now','sendBufferStart','sendVideoAction','timeSinceLastAdQuartile','adId','goRenditionChange','Tablet','adTitle','search','Push\x20events\x20to\x20Insights\x20=\x20','seek','getRenditionBitrate','Harvest\x20still\x20locked,\x20abort','userAgent','sendPlayerReady','contentIsFullscreen','_lastBufferType','CONTENT_END','stopTime','adBitrate','Opera','timeSinceSeekEnd','NOTICE','apply','isSeeking','goDownload','sendError','initial','quartile','getFps','mid','muted','darkcyan','4484817XTOGgs','debugCommonVideoEvents','_userId','addEventHandler','sendSeekStart','addEventListener','generateAttributes','adPosition','adRenditionHeight','AD_PAUSE','sendAdBreakStart','goAdBreakStart','isMuted','registerListeners','parentTracker','data','down','start','splice','isRequested','adCdn','pathname','WARNING','call','44260bKKSGK','contentSrc','Sent','Chrome','log','emit','isError','actionName','viewSession','AD_ERROR','setBackend','contentIsAutoplayed','numberOfErrors','adPartner','DOWNLOAD','player','autoplay','performance','sendDownload','CONTENT_BUFFER_END','eventType','getTitle','exports','pushEventToInsights','isInitialBuffering','setPlayer','newrelic.recordCustomEvent()\x20is\x20not\x20available.','goRequest','videoWidth','entries','recordCustomEvent','timeSinceAdBreakBegin','Cast','version','TIMER','sendStart','type','url','HEARTBEAT','customData','FETCH','timeSinceBufferBegin','_lastAdRendition','loadstart','customTimeSinceAttributes','Safari','goEnd','Android','goHeartbeat','isPaused','getTrackerName','13309083uVuEex','getAdCreativeId','getPlayhead','VideoCustomAction','timeSinceTrackerReady','Tracker\x20','timeSinceLastHeartbeat','CONTENT_REQUEST','buffering','timeSinceAdSeekBegin','application/json','_lastTimestamp','Unknown','forEach','AD_BREAK_START','X11','sendAdClick','getLanguage','trackerInit','concat','referrerUrl','In\x20order\x20to\x20use\x20NewRelic\x20Video\x20you\x20will\x20need\x20New\x20Relic\x20Browser\x20Agent.','getInstrumentationVersion','contentDuration','timeSinceLastDownload','adLanguage','getRenditionShift','play','sendResume','isLive','bitmovin-ads','timeSincePaused','abort','\x20is\x20ready.','getHeartbeat','src','MSIE','json','totalAdPlaytime','getViewSession','_bufferAcc','374765yeDsVJ','href','getInstrumentationName','debug','goPlayerReady','userAgentOS','UNIX','getBackend','AD_CLICK','disposeAdsTracker','getCdn','isAdBreak','instrumentation.provider','adCreativeId','getDuration','pre','_harvestLocked','isBuffering','off','Event:\x20','offset','getInstrumentationProvider','_actionAdTable','timeSinceLastAdHeartbeat','true','_acc','sendVideoErrorAction','Desktop','getSrc','ALL','AdPositions','reset','level','pop','Called\x20sendAdQuartile\x20without\x20{\x20quartile:\x20xxxxx\x20}.','1211RqrUtb','AD_REQUEST','[nrvideo]','timeSinceSeekBegin','totalPlaytime','contentCdn','contentPlayhead','_heartbeatInterval','timeSinceAdPaused','getRenditionName','round','setTimeSinceAttribute','numberOfVideos','contentPlayrate','Mobile','goBufferStart','nrvideo','exec','unregisterListeners','stalled','random','AD_RENDITION_CHANGE','heartbeat','AD_QUARTILE','isStarted','CONTENT_PAUSE','adSrc','sendVideoCustomAction','bufferType','contentIsLive','getAdQuartile','42CfAqtH','stop','Win','dispose','prototype','shift','POST','contentRenditionWidth','numberOfAds','_attributes','_accountId','getAttributes','goViewCountUp','CONTENT_SEEK_END','setIsAd','_viewCount','timeSinceResumed','336396sEmzdX','CONTENT_HEARTBEAT','VideoAction','goLastAd','stopHeartbeat','resume','CONTENT_SEEK_START','function','Firefox','timeSinceAdStarted','getAdPartner','timeSinceLastRenditionChange','_trackerReadyChrono','getAdPosition','CONTENT_BUFFER_START','/events','slice','timeSinceLastAd','parse','goAdQuartile','__esModule','https://insights-collector.newrelic.com/v1/accounts/','getViewId','goResume','goAdBreakEnd','4912812VEoBAB','_viewSession','getTime','webkitVideoDecodedByteCount','Tried\x20to\x20load\x20a\x20non-tracker.','contentRenditionName','tag','adPlayhead','harvestHandler','error','getPlayerVersion'];a0a=function(){return bZ;};return a0a();}
|