bitmovin-analytics 2.38.0 → 2.40.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/bitmovin-analytics.d.ts +88 -541
- package/bitmovinanalytics.min.js +3 -23
- package/bitmovinanalytics.min.js.map +1 -1
- package/package.json +1 -1
package/bitmovin-analytics.d.ts
CHANGED
|
@@ -99,569 +99,95 @@ export interface AdapterAPI {
|
|
|
99
99
|
setCustomDataOnce: (values: CustomDataValues) => void;
|
|
100
100
|
sourceChange: (config: AnalyticsConfig) => void;
|
|
101
101
|
}
|
|
102
|
-
export
|
|
102
|
+
export type SsaiAdMetadata = {
|
|
103
103
|
adId?: string;
|
|
104
104
|
adSystem?: string;
|
|
105
105
|
customData?: CustomDataValues;
|
|
106
|
-
}
|
|
107
|
-
export
|
|
106
|
+
};
|
|
107
|
+
export type AdPosition = "preroll" | "midroll" | "postroll";
|
|
108
|
+
export type SsaiAdBreakMetadata = {
|
|
108
109
|
adPosition?: AdPosition;
|
|
109
|
-
}
|
|
110
|
-
export type
|
|
110
|
+
};
|
|
111
|
+
export type SsaiAdQuartile = "first" | "midpoint" | "third" | "completed";
|
|
112
|
+
export type SsaiAdQuartileMetadata = {
|
|
113
|
+
failedBeaconUrl?: string;
|
|
114
|
+
};
|
|
111
115
|
export interface SsaiApi {
|
|
112
|
-
adBreakStart(adBreakMetadata?: SsaiAdBreakMetadata): any;
|
|
113
|
-
adStart(adMetadata?: SsaiAdMetadata): any;
|
|
114
|
-
adBreakEnd(): any;
|
|
115
|
-
}
|
|
116
|
-
export interface AnalyticsStateMachineOptions {
|
|
117
|
-
starttime: any;
|
|
118
|
-
}
|
|
119
|
-
declare class ErrorCode {
|
|
120
|
-
readonly code: number;
|
|
121
|
-
readonly message: string;
|
|
122
|
-
static BITMOVIN_PLAYER_LICENSING_ERROR: ErrorCode;
|
|
123
|
-
static SETUP_MISSING_LICENSE_WHITELIST: ErrorCode;
|
|
124
|
-
static QUALITY_CHANGE_THRESHOLD_EXCEEDED: ErrorCode;
|
|
125
|
-
static BUFFERING_TIMEOUT_REACHED: ErrorCode;
|
|
126
|
-
static VIDEO_STARTUP_TIMEOUT_REACHED: ErrorCode;
|
|
127
|
-
private constructor();
|
|
128
|
-
}
|
|
129
|
-
declare class VideoStartFailedReason {
|
|
130
|
-
readonly reason: string;
|
|
131
|
-
readonly errorCode: ErrorCode | null;
|
|
132
|
-
static PAGE_CLOSED: VideoStartFailedReason;
|
|
133
|
-
static PLAYER_ERROR: VideoStartFailedReason;
|
|
134
|
-
static TIMEOUT: VideoStartFailedReason;
|
|
135
|
-
static UNKNOWN: VideoStartFailedReason;
|
|
136
|
-
private constructor();
|
|
137
|
-
}
|
|
138
|
-
export interface ErrorData {
|
|
139
|
-
exceptionMessage?: string | undefined;
|
|
140
|
-
exceptionStacktrace?: string[] | undefined;
|
|
141
|
-
additionalData?: string | undefined;
|
|
142
|
-
}
|
|
143
|
-
export interface AnalyticsEventBase {
|
|
144
|
-
currentTime?: number;
|
|
145
|
-
}
|
|
146
|
-
interface ErrorEvent$1 extends AnalyticsEventBase {
|
|
147
|
-
code: number | undefined;
|
|
148
|
-
message: string | undefined;
|
|
149
|
-
legacyData?: any;
|
|
150
|
-
data: ErrorData;
|
|
151
|
-
}
|
|
152
|
-
export interface VideoStartFailedEvent extends AnalyticsEventBase {
|
|
153
|
-
reason: VideoStartFailedReason;
|
|
154
|
-
}
|
|
155
|
-
export interface SsaiEventHandler {
|
|
156
|
-
onSsaiInteraction: (timestamp: number, eventData: AnalyticsEventBase) => void;
|
|
157
|
-
}
|
|
158
|
-
export interface DownloadSpeedInfo {
|
|
159
|
-
/**
|
|
160
|
-
* Number of completed segment downloads
|
|
161
|
-
*/
|
|
162
|
-
segmentsDownloadCount: number;
|
|
163
|
-
/**
|
|
164
|
-
* Total download size in bytes
|
|
165
|
-
*/
|
|
166
|
-
segmentsDownloadSize: number;
|
|
167
|
-
/**
|
|
168
|
-
* Total time spent downloading segments in milliseconds
|
|
169
|
-
*/
|
|
170
|
-
segmentsDownloadTime: number;
|
|
171
|
-
/**
|
|
172
|
-
* Average download speed in kbps
|
|
173
|
-
*/
|
|
174
|
-
avgDownloadSpeed: number;
|
|
175
|
-
/**
|
|
176
|
-
* Maximum download speed in kbps
|
|
177
|
-
*/
|
|
178
|
-
maxDownloadSpeed: number;
|
|
179
|
-
/**
|
|
180
|
-
* Minimum download speed in kbps
|
|
181
|
-
*/
|
|
182
|
-
minDownloadSpeed: number;
|
|
183
|
-
/**
|
|
184
|
-
* Average time to first byte in milliseconds
|
|
185
|
-
*/
|
|
186
|
-
avgTimeToFirstByte: number;
|
|
187
|
-
}
|
|
188
|
-
export interface Sample extends CustomDataValues {
|
|
189
|
-
ad?: 0 | 1 | 2;
|
|
190
|
-
adId?: string;
|
|
191
|
-
adSystem?: string;
|
|
192
|
-
adPosition?: string;
|
|
193
|
-
adIndex?: number;
|
|
194
|
-
analyticsVersion?: any;
|
|
195
|
-
audioBitrate?: number;
|
|
196
|
-
audioCodec?: string;
|
|
197
|
-
audioLanguage?: string;
|
|
198
|
-
autoplay?: any;
|
|
199
|
-
buffered?: number;
|
|
200
|
-
castTech?: string;
|
|
201
|
-
cdnProvider?: any;
|
|
202
|
-
completed?: number;
|
|
203
|
-
completedTotal?: number;
|
|
204
|
-
customUserId?: string;
|
|
205
|
-
deviceInformation?: {
|
|
206
|
-
deviceClass?: string;
|
|
207
|
-
model?: string;
|
|
208
|
-
};
|
|
209
|
-
domain?: any;
|
|
210
|
-
downloadSpeedInfo?: DownloadSpeedInfo;
|
|
211
|
-
drmLoadTime?: number;
|
|
212
|
-
drmType?: string;
|
|
213
|
-
droppedFrames?: number;
|
|
214
|
-
duration?: number;
|
|
215
|
-
errorCode?: number;
|
|
216
|
-
errorData?: string;
|
|
217
|
-
errorMessage?: string;
|
|
218
|
-
errorSegments?: any[];
|
|
219
|
-
impressionId?: string;
|
|
220
|
-
isCasting?: boolean;
|
|
221
|
-
isLive?: boolean;
|
|
222
|
-
isMuted?: boolean;
|
|
223
|
-
key?: string;
|
|
224
|
-
language?: string;
|
|
225
|
-
m3u8Url?: string;
|
|
226
|
-
mpdUrl?: string;
|
|
227
|
-
pageLoadTime: number;
|
|
228
|
-
pageLoadType: number;
|
|
229
|
-
path?: string;
|
|
230
|
-
paused?: number;
|
|
231
|
-
platform: string;
|
|
232
|
-
played?: number;
|
|
233
|
-
player?: any;
|
|
234
|
-
playerKey?: any;
|
|
235
|
-
playerStartupTime: number;
|
|
236
|
-
playerTech?: string;
|
|
237
|
-
progUrl?: string;
|
|
238
|
-
screenHeight?: number;
|
|
239
|
-
screenWidth?: number;
|
|
240
|
-
seeked?: number;
|
|
241
|
-
sequenceNumber?: number;
|
|
242
|
-
size?: string;
|
|
243
|
-
startupTime?: number;
|
|
244
|
-
state?: string;
|
|
245
|
-
streamFormat?: string;
|
|
246
|
-
subtitleEnabled?: boolean;
|
|
247
|
-
subtitleLanguage?: string;
|
|
248
|
-
supportedVideoCodecs?: string[];
|
|
249
|
-
time?: number;
|
|
250
|
-
userAgent?: string;
|
|
251
|
-
userId?: string;
|
|
252
|
-
version?: string;
|
|
253
|
-
videoBitrate?: number;
|
|
254
|
-
videoCodec?: string;
|
|
255
|
-
videoDuration?: number;
|
|
256
|
-
videoId?: string;
|
|
257
|
-
videoPlaybackHeight?: number;
|
|
258
|
-
videoPlaybackWidth?: number;
|
|
259
|
-
videoStartFailed?: boolean;
|
|
260
|
-
videoStartFailedReason?: string;
|
|
261
|
-
videoStartupTime?: number;
|
|
262
|
-
videoTimeEnd?: number;
|
|
263
|
-
videoTimeStart?: number;
|
|
264
|
-
videoTitle?: string;
|
|
265
|
-
videoWindowHeight?: number;
|
|
266
|
-
videoWindowWidth?: number;
|
|
267
|
-
}
|
|
268
|
-
declare class SsaiService {
|
|
269
|
-
/**
|
|
270
|
-
* eventHandler is outside dependency.
|
|
271
|
-
* Due to the structure it is not possible to pass it to constructor of this class
|
|
272
|
-
*/
|
|
273
|
-
eventHandler: SsaiEventHandler | undefined;
|
|
274
|
-
private state;
|
|
275
|
-
/**
|
|
276
|
-
* represents the current playing ad metdata
|
|
277
|
-
* is `undefined` when no ad is playing (after endAdBreak)
|
|
278
|
-
* or omitted by customer
|
|
279
|
-
*/
|
|
280
|
-
private currentAdMetadata;
|
|
281
|
-
private adIndex;
|
|
282
|
-
private isFirstSampleOfAd;
|
|
283
|
-
private player;
|
|
284
|
-
constructor(player: any);
|
|
285
116
|
adBreakStart(adBreakMetadata?: SsaiAdBreakMetadata): void;
|
|
286
117
|
adStart(adMetadata?: SsaiAdMetadata): void;
|
|
118
|
+
adQuartileFinished(adQuartile: SsaiAdQuartile, adQuartileMetadata?: SsaiAdQuartileMetadata): void;
|
|
287
119
|
adBreakEnd(): void;
|
|
288
|
-
private reset;
|
|
289
|
-
resetSourceRelatedState(): void;
|
|
290
|
-
manipulate(sample: Sample): void;
|
|
291
|
-
}
|
|
292
|
-
declare class QualityChangeService {
|
|
293
|
-
private qualityChangeThreshold;
|
|
294
|
-
private qualityChangeCount;
|
|
295
|
-
private previousVideoBitrate;
|
|
296
|
-
private previousAudioBitrate;
|
|
297
|
-
private resetIntervalId?;
|
|
298
|
-
private startupHasFinished;
|
|
299
|
-
constructor(qualityChangeThreshold?: number);
|
|
300
|
-
resetValues(): void;
|
|
301
|
-
isQualityChangeEventEnabled(): boolean;
|
|
302
|
-
increaseCounter(): void;
|
|
303
|
-
shouldAllowVideoQualityChange(newBitrate: number | undefined): boolean;
|
|
304
|
-
setVideoBitrate(newBitrate: number): void;
|
|
305
|
-
setStartupHasFinished(): void;
|
|
306
|
-
shouldAllowAudioQualityChange(newBitrate: number | undefined): boolean;
|
|
307
|
-
setAudioBitrate(newBitrate: number): void;
|
|
308
|
-
startResetInterval(): void;
|
|
309
|
-
stopResetInterval(): void;
|
|
310
|
-
private resetCounter;
|
|
311
|
-
}
|
|
312
|
-
export interface Timespan {
|
|
313
|
-
start: number;
|
|
314
|
-
end: number;
|
|
315
|
-
}
|
|
316
|
-
declare class VideoCompletionTracker {
|
|
317
|
-
private watched;
|
|
318
|
-
private videoDuration;
|
|
319
|
-
reset(): void;
|
|
320
|
-
/**
|
|
321
|
-
* sets video Duration
|
|
322
|
-
* @param videoDuration in sec
|
|
323
|
-
*/
|
|
324
|
-
setVideoDuration(videoDuration: number): void;
|
|
325
|
-
/**
|
|
326
|
-
* Adds the watched timespan to the tracker
|
|
327
|
-
* @param watched watched timespan you want to add to the tracker
|
|
328
|
-
* @returns how much time(video parts which have not been seen yet) was added to the tracker
|
|
329
|
-
*/
|
|
330
|
-
addWatched(watched: Timespan): number;
|
|
331
|
-
/**
|
|
332
|
-
* returns the relative value of how much the user watch the content of the video
|
|
333
|
-
*/
|
|
334
|
-
getCompletionPercentage(): number;
|
|
335
|
-
/**
|
|
336
|
-
* Recursive Method to merge All Watched Blocks
|
|
337
|
-
* @param watched
|
|
338
|
-
*
|
|
339
|
-
* @returns how much timespan was overlapping while merging the watchBlocks
|
|
340
|
-
*/
|
|
341
|
-
private mergeWatched;
|
|
342
|
-
private getOverlappingType;
|
|
343
|
-
private isMomentInTimespan;
|
|
344
|
-
private mergeAndReplace;
|
|
345
|
-
private getOverlappingTimespan;
|
|
346
|
-
private getDuration;
|
|
347
|
-
}
|
|
348
|
-
export interface FeatureConfig {
|
|
349
|
-
enabled: boolean | undefined;
|
|
350
|
-
}
|
|
351
|
-
declare abstract class Feature<TConfigContainer, TConfig extends FeatureConfig> {
|
|
352
|
-
private _config?;
|
|
353
|
-
private _isEnabled;
|
|
354
|
-
get config(): TConfig | undefined;
|
|
355
|
-
get isEnabled(): boolean;
|
|
356
|
-
abstract reset(): void;
|
|
357
|
-
abstract enabled(): void;
|
|
358
|
-
abstract disabled(): void;
|
|
359
|
-
abstract configured(authenticated: boolean, config?: TConfig): void;
|
|
360
|
-
disable(): void;
|
|
361
|
-
configure(authenticated: boolean, configContainer?: TConfigContainer): TConfig | undefined;
|
|
362
|
-
abstract extractConfig(configContainer: TConfigContainer): TConfig | undefined;
|
|
363
|
-
}
|
|
364
|
-
export interface DrmPerformanceInfo {
|
|
365
|
-
readonly drmType: string;
|
|
366
|
-
readonly drmLoadTime: number;
|
|
367
|
-
}
|
|
368
|
-
export interface ErrorDetailTrackingConfig extends FeatureConfig {
|
|
369
|
-
numberOfHttpRequests: number | undefined;
|
|
370
|
-
}
|
|
371
|
-
export interface FeatureConfigContainer {
|
|
372
|
-
errorDetails?: ErrorDetailTrackingConfig;
|
|
373
|
-
}
|
|
374
|
-
declare enum PlayerSize {
|
|
375
|
-
Fullscreen = "FULLSCREEN",
|
|
376
|
-
Window = "WINDOW"
|
|
377
|
-
}
|
|
378
|
-
export interface PlaybackInfo {
|
|
379
|
-
isLive?: boolean;
|
|
380
|
-
playerTech?: string;
|
|
381
|
-
videoDuration?: number;
|
|
382
|
-
streamFormat?: string;
|
|
383
|
-
progUrl?: string;
|
|
384
|
-
m3u8Url?: string;
|
|
385
|
-
mpdUrl?: string;
|
|
386
|
-
videoWindowWidth?: number;
|
|
387
|
-
videoWindowHeight?: number;
|
|
388
|
-
isMuted?: boolean;
|
|
389
|
-
videoBitrate?: number;
|
|
390
|
-
audioBitrate?: number;
|
|
391
|
-
droppedFrames: number;
|
|
392
|
-
isCasting?: boolean;
|
|
393
|
-
castTech?: string;
|
|
394
|
-
screenHeight?: number;
|
|
395
|
-
screenWidth?: number;
|
|
396
|
-
videoPlaybackHeight?: number;
|
|
397
|
-
videoPlaybackWidth?: number;
|
|
398
|
-
videoTitle?: string;
|
|
399
|
-
size?: PlayerSize;
|
|
400
|
-
audioCodec?: string;
|
|
401
|
-
videoCodec?: string;
|
|
402
|
-
audioLanguage?: string;
|
|
403
|
-
subtitleEnabled?: boolean;
|
|
404
|
-
subtitleLanguage?: string;
|
|
405
|
-
}
|
|
406
|
-
export interface SegmentInfo {
|
|
407
|
-
name: string;
|
|
408
|
-
timestamp: number;
|
|
409
|
-
url: string;
|
|
410
|
-
}
|
|
411
|
-
export type HeartbeatPayload = Pick<Sample, "buffered"> | Pick<Sample, "paused"> | Pick<Sample, "played">;
|
|
412
|
-
export interface StateMachineCallbacks {
|
|
413
|
-
setup: (duration: number, state: string) => void;
|
|
414
|
-
startup: (duration: number, state: string) => void;
|
|
415
|
-
playing: (duration: number, state: string) => void;
|
|
416
|
-
heartbeat: (duration: number, state: string, payload: HeartbeatPayload) => void;
|
|
417
|
-
qualitychange: (duration: number, state: string) => void;
|
|
418
|
-
qualitychange_pause: (duration: number, state: string) => void;
|
|
419
|
-
qualitychange_rebuffering: (duration: number, state: string) => void;
|
|
420
|
-
videoChange: (event: any) => void;
|
|
421
|
-
audioChange: (event: any) => void;
|
|
422
|
-
audiotrack_changing: () => void;
|
|
423
|
-
pause: (duration: number, state: string) => void;
|
|
424
|
-
paused_seeking: (duration: number, state: string) => void;
|
|
425
|
-
end_play_seeking: (duration: number, state: string) => void;
|
|
426
|
-
rebuffering: (duration: number, state: string) => void;
|
|
427
|
-
error: (event: Readonly<ErrorEvent$1>) => void;
|
|
428
|
-
end: (duration: number, state: string) => void;
|
|
429
|
-
unload: (duration: number, state: string) => void;
|
|
430
|
-
ad: (duration: number, state: string) => void;
|
|
431
|
-
mute: () => void;
|
|
432
|
-
unMute: () => void;
|
|
433
|
-
subtitle_changing: () => void;
|
|
434
|
-
setVideoTimeEndFromEvent: (event: AnalyticsEventBase | any) => void;
|
|
435
|
-
setVideoTimeStartFromEvent: (event: AnalyticsEventBase | any) => void;
|
|
436
|
-
videoStartFailed: (event: Readonly<VideoStartFailedEvent>, sendRequest: boolean) => void;
|
|
437
|
-
startCasting: (duration: number, event: any) => void;
|
|
438
|
-
casting: (duration: number, event: any) => void;
|
|
439
|
-
manualSourceChange: (event: {
|
|
440
|
-
config: AnalyticsConfig;
|
|
441
|
-
}) => void;
|
|
442
|
-
initialSourceChange: (event: {
|
|
443
|
-
config: AnalyticsConfig;
|
|
444
|
-
}) => void;
|
|
445
|
-
muting_ready: (duration: number, state: string, event: any) => void;
|
|
446
|
-
customdatachange: (duration?: number, state?: string, event?: {
|
|
447
|
-
values: CustomDataValues;
|
|
448
|
-
}) => void;
|
|
449
|
-
/** shuts down the collection and removes/clears all timeouts, intervals, event listeners */
|
|
450
|
-
release: () => void;
|
|
451
|
-
playlistTransition: (event: Readonly<AnalyticsEventBase>) => void;
|
|
452
|
-
}
|
|
453
|
-
declare class AdCallbacks {
|
|
454
|
-
onAdStarted: (event: any) => void;
|
|
455
|
-
onAdFinished: (event: any) => void;
|
|
456
|
-
onAdBreakStarted: (event: any) => void;
|
|
457
|
-
onAdBreakFinished: (event: any) => void;
|
|
458
|
-
onAdClicked: (event: any) => void;
|
|
459
|
-
onAdError: (event: any) => void;
|
|
460
|
-
onAdManifestLoaded: (event: any) => void;
|
|
461
|
-
onAdQuartile: (event: any) => void;
|
|
462
|
-
onAdSkipped: (event: any) => void;
|
|
463
|
-
onPlay: (issuer?: string) => void;
|
|
464
|
-
onPause: (issuer?: string) => void;
|
|
465
|
-
onBeforeUnload: () => void;
|
|
466
|
-
}
|
|
467
|
-
export interface AdModuleAPI {
|
|
468
|
-
readonly adCallbacks: AdCallbacks;
|
|
469
|
-
isLinearAdActive: () => boolean;
|
|
470
|
-
getContainer: () => HTMLElement;
|
|
471
|
-
getAdModuleInfo: () => {
|
|
472
|
-
name?: string;
|
|
473
|
-
version?: string;
|
|
474
|
-
};
|
|
475
|
-
currentTime: () => number;
|
|
476
|
-
}
|
|
477
|
-
export interface Subscribable<TArgs> {
|
|
478
|
-
subscribe(callback: EventHandler<TArgs>): () => void;
|
|
479
|
-
unsubscribe(callback: EventHandler<TArgs>): any;
|
|
480
|
-
}
|
|
481
|
-
export type EventHandler<TArgs> = (args: TArgs) => void;
|
|
482
|
-
declare class EventDispatcher<TArgs> implements Subscribable<TArgs> {
|
|
483
|
-
private callbacks;
|
|
484
|
-
subscribe(callback: EventHandler<TArgs>): () => void;
|
|
485
|
-
dispatch(args: TArgs): void;
|
|
486
|
-
unsubscribe(callback: EventHandler<TArgs>): void;
|
|
487
|
-
get subscriberCount(): number;
|
|
488
|
-
}
|
|
489
|
-
export interface DeferredLicenseLoadingAdapterAPI {
|
|
490
|
-
readonly supportsDeferredLicenseLoading?: boolean;
|
|
491
|
-
readonly onLicenseKeyReceived: Subscribable<{
|
|
492
|
-
licenseKey: string;
|
|
493
|
-
}>;
|
|
494
|
-
readonly onLicenseCallFailed: Subscribable<any>;
|
|
495
|
-
}
|
|
496
|
-
export interface InternalAdapterAPI extends DeferredLicenseLoadingAdapterAPI {
|
|
497
|
-
readonly downloadSpeedInfo: DownloadSpeedInfo;
|
|
498
|
-
readonly segments: SegmentInfo[];
|
|
499
|
-
readonly stateMachineCallbacks: StateMachineCallbacks;
|
|
500
|
-
readonly adModule?: AdModuleAPI;
|
|
501
|
-
readonly videoCompletionTracker?: VideoCompletionTracker;
|
|
502
|
-
readonly qualityChangeService: QualityChangeService;
|
|
503
|
-
resetSourceRelatedState(): void;
|
|
504
|
-
getPlayerVersion(): string;
|
|
505
|
-
getPlayerName(): string;
|
|
506
|
-
getPlayerTech(): string;
|
|
507
|
-
getAutoPlay(): boolean;
|
|
508
|
-
getDrmPerformanceInfo(): DrmPerformanceInfo | undefined;
|
|
509
|
-
initialize(analytics: Analytics): Array<Feature<FeatureConfigContainer, FeatureConfig>>;
|
|
510
|
-
getCurrentPlaybackInfo(): PlaybackInfo;
|
|
511
|
-
sourceChange(config: AnalyticsConfig): void;
|
|
512
|
-
clearValues(): void;
|
|
513
|
-
onError?(): void;
|
|
514
|
-
setCustomData(values: CustomDataValues): void;
|
|
515
|
-
}
|
|
516
|
-
export interface OnErrorDetailEventObject {
|
|
517
|
-
code: number | undefined;
|
|
518
|
-
message: string | undefined;
|
|
519
|
-
errorData?: ErrorData | undefined;
|
|
520
|
-
}
|
|
521
|
-
export interface ErrorDetailTrackingSettingsProvider {
|
|
522
|
-
readonly licenseKey: string;
|
|
523
|
-
readonly domain: string;
|
|
524
|
-
readonly impressionId: string;
|
|
525
|
-
readonly collectorConfig?: CollectorConfig;
|
|
526
|
-
}
|
|
527
|
-
declare class FeatureManager<TConfigContainer> {
|
|
528
|
-
private features;
|
|
529
|
-
registerFeatures(features: Array<Feature<TConfigContainer, FeatureConfig>>): void;
|
|
530
|
-
unregisterFeatures(): void;
|
|
531
|
-
resetFeatures(): void;
|
|
532
|
-
configureFeatures(authenticated: boolean, featureConfigs?: TConfigContainer): void;
|
|
533
|
-
}
|
|
534
|
-
export interface Backend {
|
|
535
|
-
sendRequest(sample: Sample): any;
|
|
536
|
-
sendUnloadRequest(sample: Sample): any;
|
|
537
|
-
sendRequestSynchronous(sample: Sample): any;
|
|
538
|
-
sendAdRequest(sample: any): any;
|
|
539
|
-
}
|
|
540
|
-
export interface AuthenticationCallback {
|
|
541
|
-
authenticationCompleted(success: boolean, featureConfigs: FeatureConfigContainer | undefined): void;
|
|
542
|
-
}
|
|
543
|
-
export interface LicensingRequest {
|
|
544
|
-
key?: string;
|
|
545
|
-
domain: string;
|
|
546
|
-
version: string;
|
|
547
|
-
}
|
|
548
|
-
declare class BackendFactory {
|
|
549
|
-
createBackend(analyticsConfig: AnalyticsConfig, licensingRequest: LicensingRequest, adapter: DeferredLicenseLoadingAdapterAPI, authenticationCallback: AuthenticationCallback): Backend;
|
|
550
|
-
private decorateWithDebuggingBackend;
|
|
551
|
-
private decorateWithBackendFromConfigIfAvailable;
|
|
552
|
-
private isEnabled;
|
|
553
|
-
private createInnerBackend;
|
|
554
120
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
constructor(config: AnalyticsConfig);
|
|
558
|
-
}
|
|
559
|
-
declare class Analytics {
|
|
560
|
-
private adapter;
|
|
561
|
-
private readonly backendFactory;
|
|
562
|
-
private readonly sessionHandler;
|
|
563
|
-
private readonly featureManager;
|
|
564
|
-
private readonly onErrorDetailEventDispatcher;
|
|
565
|
-
private readonly ssaiService?;
|
|
566
|
-
get version(): string;
|
|
567
|
-
static version: string;
|
|
568
|
-
private readonly adAnalytics;
|
|
569
|
-
pageLoadTime: number;
|
|
570
|
-
playerStartupTime: number;
|
|
571
|
-
videoStartupTime: number;
|
|
572
|
-
autoplay: boolean | undefined;
|
|
573
|
-
sample: Sample;
|
|
574
|
-
backend: Backend;
|
|
575
|
-
errorDetailTrackingSettingsProvider: ErrorDetailTrackingSettingsProvider;
|
|
576
|
-
private config;
|
|
577
|
-
private droppedSampleFrames;
|
|
578
|
-
private startupTime;
|
|
579
|
-
private authenticationCallback;
|
|
580
|
-
constructor(config: AnalyticsConfig, adapter: InternalAdapterAPI, backendFactory: BackendFactory, sessionHandler: SessionPersistenceHandler, featureManager: FeatureManager<FeatureConfigContainer>, onErrorDetailEventDispatcher: EventDispatcher<OnErrorDetailEventObject>, ssaiService?: SsaiService | undefined);
|
|
581
|
-
get errorDetailSubscribable(): Subscribable<OnErrorDetailEventObject>;
|
|
582
|
-
getPlayerInformationFromAdapter(): {
|
|
583
|
-
player: string;
|
|
584
|
-
version: string;
|
|
585
|
-
playerTech: string;
|
|
586
|
-
};
|
|
587
|
-
init(): void;
|
|
588
|
-
release(): void;
|
|
589
|
-
setConfigParameters(): void;
|
|
590
|
-
generateNewImpressionId(): void;
|
|
591
|
-
setUserId(): void;
|
|
592
|
-
setupStateMachineCallbacks(): void;
|
|
593
|
-
guardAgainstMissingVideoTitle: (oldConfig: AnalyticsConfig, newConfig: AnalyticsConfig | undefined) => void;
|
|
594
|
-
guardAgainstMissingIsLive: (oldConfig: AnalyticsConfig, newConfig: AnalyticsConfig | undefined) => void;
|
|
595
|
-
sourceChange: (config: AnalyticsConfig | undefined) => void;
|
|
596
|
-
setCustomDataOnce: (values: CustomDataValues) => void;
|
|
597
|
-
setCustomData: (values: CustomDataValues) => void;
|
|
598
|
-
getCurrentImpressionId: () => string | undefined;
|
|
599
|
-
getUserId: () => string;
|
|
600
|
-
setDuration(duration: number): void;
|
|
601
|
-
setState(state: string): void;
|
|
602
|
-
setPlaybackVideoPropertiesFromEvent(event: any): void;
|
|
603
|
-
setPlaybackAudioPropertiesFromEvent(event: any): void;
|
|
604
|
-
setPlaybackInfoFromAdapter(): void;
|
|
605
|
-
setupSample(): Sample;
|
|
606
|
-
sendAnalyticsRequest(): void;
|
|
607
|
-
sendAnalyticsRequestAndClearValues(): void;
|
|
608
|
-
sendUnloadRequest(): void;
|
|
609
|
-
sendAnalyticsRequestSynchronous(): void;
|
|
610
|
-
clearValues(): void;
|
|
611
|
-
getIsLiveFromConfigOrPlaybackInfo(config: AnalyticsConfig, isLiveFromPlayback?: boolean): boolean;
|
|
612
|
-
/**
|
|
613
|
-
* This method sanitizes the input and updates the analytics config.
|
|
614
|
-
* @param values Object containing the customData and other fields
|
|
615
|
-
*/
|
|
616
|
-
private changeCustomData;
|
|
617
|
-
private buildDefaultAnalyticsConfigValues;
|
|
618
|
-
private checkForErrorsInConfig;
|
|
619
|
-
private getDomainFromConfig;
|
|
620
|
-
private createBackend;
|
|
621
|
-
private getDomain;
|
|
622
|
-
private setCompletionValues;
|
|
623
|
-
private setVideoTimeStart;
|
|
624
|
-
private setVideoTimeEnd;
|
|
625
|
-
private sendQualityChange;
|
|
626
|
-
static create(config: AnalyticsConfig, adapter: InternalAdapterAPI, ssaiService?: SsaiService): Analytics;
|
|
121
|
+
export interface AnalyticsStateMachineOptions {
|
|
122
|
+
starttime: any;
|
|
627
123
|
}
|
|
628
|
-
declare
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
124
|
+
export declare class AmazonIVSAdapter implements AdapterAPI {
|
|
125
|
+
private readonly internalAdapter;
|
|
126
|
+
private readonly analytics;
|
|
127
|
+
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
128
|
+
private wrapPlayerLoad;
|
|
129
|
+
static readonly version: string;
|
|
632
130
|
get version(): string;
|
|
633
131
|
getCurrentImpressionId(): string | undefined;
|
|
634
132
|
getUserId(): string | undefined;
|
|
635
133
|
setCustomData(values: CustomDataValues): void;
|
|
636
134
|
setCustomDataOnce(values: CustomDataValues): void;
|
|
637
135
|
sourceChange(config: AnalyticsConfig): void;
|
|
638
|
-
protected hasPlayerAlreadyBeenAugmented(player: any): boolean;
|
|
639
|
-
protected markPlayerInstanceAsAugmented(player: any): void;
|
|
640
|
-
protected guardAgainstNotInitializedAnalytics(): boolean;
|
|
641
136
|
}
|
|
642
|
-
export declare class
|
|
643
|
-
|
|
644
|
-
private
|
|
645
|
-
}
|
|
646
|
-
export declare class Bitmovin8Adapter extends Adapter implements AdapterAPI {
|
|
137
|
+
export declare class Bitmovin8Adapter implements AdapterAPI {
|
|
138
|
+
private readonly internalAdapter;
|
|
139
|
+
private readonly analytics;
|
|
647
140
|
constructor(player: any, opts?: AnalyticsStateMachineOptions);
|
|
648
|
-
ssai: SsaiApi;
|
|
649
|
-
/**
|
|
650
|
-
* intercept `player.load` with automated sourceChange handling
|
|
651
|
-
*/
|
|
141
|
+
readonly ssai: SsaiApi;
|
|
652
142
|
private wrapPlayerLoad;
|
|
143
|
+
static readonly version: string;
|
|
144
|
+
get version(): string;
|
|
145
|
+
getCurrentImpressionId(): string | undefined;
|
|
146
|
+
getUserId(): string | undefined;
|
|
147
|
+
setCustomData(values: CustomDataValues): void;
|
|
148
|
+
setCustomDataOnce(values: CustomDataValues): void;
|
|
149
|
+
sourceChange(config: AnalyticsConfig): void;
|
|
653
150
|
}
|
|
654
151
|
export declare const BitmovinPwxAnalyticsPackage: any;
|
|
655
|
-
export declare class CAFv3Adapter
|
|
152
|
+
export declare class CAFv3Adapter implements AdapterAPI {
|
|
153
|
+
private readonly internalAdapter;
|
|
154
|
+
private readonly analytics;
|
|
656
155
|
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
156
|
+
static readonly version: string;
|
|
157
|
+
get version(): string;
|
|
158
|
+
getCurrentImpressionId(): string | undefined;
|
|
159
|
+
getUserId(): string | undefined;
|
|
160
|
+
setCustomData(values: CustomDataValues): void;
|
|
161
|
+
setCustomDataOnce(values: CustomDataValues): void;
|
|
162
|
+
sourceChange(config: AnalyticsConfig): void;
|
|
657
163
|
}
|
|
658
|
-
export declare class DashjsAdapter
|
|
164
|
+
export declare class DashjsAdapter implements AdapterAPI {
|
|
165
|
+
private readonly internalAdapter;
|
|
166
|
+
private readonly analytics;
|
|
659
167
|
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
168
|
+
static readonly version: string;
|
|
169
|
+
get version(): string;
|
|
170
|
+
getCurrentImpressionId(): string | undefined;
|
|
171
|
+
getUserId(): string | undefined;
|
|
172
|
+
setCustomData(values: CustomDataValues): void;
|
|
173
|
+
setCustomDataOnce(values: CustomDataValues): void;
|
|
174
|
+
sourceChange(config: AnalyticsConfig): void;
|
|
660
175
|
}
|
|
661
|
-
export declare class HlsAdapter
|
|
176
|
+
export declare class HlsAdapter implements AdapterAPI {
|
|
177
|
+
private readonly internalAdapter;
|
|
178
|
+
private readonly analytics;
|
|
662
179
|
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
180
|
+
static readonly version: string;
|
|
181
|
+
get version(): string;
|
|
182
|
+
getCurrentImpressionId(): string | undefined;
|
|
183
|
+
getUserId(): string | undefined;
|
|
184
|
+
setCustomData(values: CustomDataValues): void;
|
|
185
|
+
setCustomDataOnce(values: CustomDataValues): void;
|
|
186
|
+
sourceChange(config: AnalyticsConfig): void;
|
|
663
187
|
}
|
|
664
|
-
export declare class HTMLVideoElementAdapter
|
|
188
|
+
export declare class HTMLVideoElementAdapter implements AdapterAPI {
|
|
189
|
+
private readonly internalAdapter;
|
|
190
|
+
private readonly analytics;
|
|
665
191
|
constructor(config: AnalyticsConfig, player: HTMLVideoElement, opts?: AnalyticsStateMachineOptions, sourceMetadata?: {
|
|
666
192
|
audioCodec?: string;
|
|
667
193
|
audioLanguage?: string;
|
|
@@ -673,6 +199,12 @@ export declare class HTMLVideoElementAdapter extends Adapter implements AdapterA
|
|
|
673
199
|
readonly setSubtitleEnabled: (enabled: boolean) => void;
|
|
674
200
|
readonly setSubtitleLanguage: (subtitleLanguage: string) => void;
|
|
675
201
|
};
|
|
202
|
+
static readonly version: string;
|
|
203
|
+
get version(): string;
|
|
204
|
+
getCurrentImpressionId(): string | undefined;
|
|
205
|
+
getUserId(): string | undefined;
|
|
206
|
+
setCustomData(values: CustomDataValues): void;
|
|
207
|
+
setCustomDataOnce(values: CustomDataValues): void;
|
|
676
208
|
sourceChange(config: AnalyticsConfig, sourceMetadata?: {
|
|
677
209
|
audioCodec?: string;
|
|
678
210
|
audioLanguage?: string;
|
|
@@ -680,12 +212,30 @@ export declare class HTMLVideoElementAdapter extends Adapter implements AdapterA
|
|
|
680
212
|
videoCodec?: string;
|
|
681
213
|
}): void;
|
|
682
214
|
}
|
|
683
|
-
export declare class ShakaAdapter
|
|
215
|
+
export declare class ShakaAdapter implements AdapterAPI {
|
|
216
|
+
private readonly internalAdapter;
|
|
217
|
+
private readonly analytics;
|
|
684
218
|
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
685
219
|
private wrapPlayerLoad;
|
|
220
|
+
static readonly version: string;
|
|
221
|
+
get version(): string;
|
|
222
|
+
getCurrentImpressionId(): string | undefined;
|
|
223
|
+
getUserId(): string | undefined;
|
|
224
|
+
setCustomData(values: CustomDataValues): void;
|
|
225
|
+
setCustomDataOnce(values: CustomDataValues): void;
|
|
226
|
+
sourceChange(config: AnalyticsConfig): void;
|
|
686
227
|
}
|
|
687
|
-
export declare class VideojsAdapter
|
|
228
|
+
export declare class VideojsAdapter implements AdapterAPI {
|
|
229
|
+
private readonly internalAdapter;
|
|
230
|
+
private readonly analytics;
|
|
688
231
|
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
232
|
+
static readonly version: string;
|
|
233
|
+
get version(): string;
|
|
234
|
+
getCurrentImpressionId(): string | undefined;
|
|
235
|
+
getUserId(): string | undefined;
|
|
236
|
+
setCustomData(values: CustomDataValues): void;
|
|
237
|
+
setCustomDataOnce(values: CustomDataValues): void;
|
|
238
|
+
sourceChange(config: AnalyticsConfig): void;
|
|
689
239
|
}
|
|
690
240
|
declare enum CdnProvider {
|
|
691
241
|
AKAMAI = "akamai",
|
|
@@ -709,9 +259,6 @@ declare enum Player {
|
|
|
709
259
|
SHAKA = "shaka",
|
|
710
260
|
VIDEOJS = "videojs"
|
|
711
261
|
}
|
|
712
|
-
/**
|
|
713
|
-
* @see https://github.com/bitmovin-engineering/bitdash/blob/ccd3227dac82d1416a471711b40ee0f65d7f9ddb/src/ModuleDefinition.ts#L17
|
|
714
|
-
*/
|
|
715
262
|
export declare const PlayerModule: {
|
|
716
263
|
readonly name: "analytics";
|
|
717
264
|
readonly module: {
|