bitmovin-analytics 2.29.2 → 2.29.3-beta.1
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/README.md +1 -0
- package/bitmovin-analytics.d.ts +34 -25
- package/bitmovinanalytics.min.js +2 -2
- package/bitmovinanalytics.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Bitmovin Analytics Collector
|
|
2
2
|
|
|
3
3
|
[](https://dl.circleci.com/status-badge/redirect/gh/bitmovin-engineering/bitmovin-analytics-collector/tree/main)
|
|
4
|
+
[](https://packagephobia.com/result?p=bitmovin-analytics)
|
|
4
5
|
|
|
5
6
|
Instruments adaptive streaming video players and collects information to be sent to the Bitmovin Analytics service.
|
|
6
7
|
|
package/bitmovin-analytics.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
declare const VERSION: string;
|
|
1
2
|
export interface AnalyticsDebugConfig {
|
|
2
3
|
fields?: string[];
|
|
3
4
|
}
|
|
@@ -92,9 +93,6 @@ export interface AdapterAPI {
|
|
|
92
93
|
setCustomDataOnce: (values: CustomDataValues) => void;
|
|
93
94
|
sourceChange: (config: AnalyticsConfig) => void;
|
|
94
95
|
}
|
|
95
|
-
export interface AnalyticsStateMachineOptions {
|
|
96
|
-
starttime: any;
|
|
97
|
-
}
|
|
98
96
|
export interface Timespan {
|
|
99
97
|
start: number;
|
|
100
98
|
end: number;
|
|
@@ -374,6 +372,18 @@ export interface StateMachineCallbacks {
|
|
|
374
372
|
release: () => void;
|
|
375
373
|
playlistTransition: (event: Readonly<AnalyticsEventBase>) => void;
|
|
376
374
|
}
|
|
375
|
+
export interface Subscribable<TArgs> {
|
|
376
|
+
subscribe(callback: EventHandler<TArgs>): () => void;
|
|
377
|
+
unsubscribe(callback: EventHandler<TArgs>): any;
|
|
378
|
+
}
|
|
379
|
+
export type EventHandler<TArgs> = (args: TArgs) => void;
|
|
380
|
+
export interface DeferredLicenseLoadingAdapterAPI {
|
|
381
|
+
readonly supportsDeferredLicenseLoading?: boolean;
|
|
382
|
+
readonly onLicenseKeyReceived: Subscribable<{
|
|
383
|
+
licenseKey: string;
|
|
384
|
+
}>;
|
|
385
|
+
readonly onLicenseCallFailed: Subscribable<any>;
|
|
386
|
+
}
|
|
377
387
|
declare class AdCallbacks {
|
|
378
388
|
onAdStarted: (event: any) => void;
|
|
379
389
|
onAdFinished: (event: any) => void;
|
|
@@ -398,18 +408,6 @@ export interface AdModuleAPI {
|
|
|
398
408
|
};
|
|
399
409
|
currentTime: () => number;
|
|
400
410
|
}
|
|
401
|
-
export interface Subscribable<TArgs> {
|
|
402
|
-
subscribe(callback: EventHandler<TArgs>): () => void;
|
|
403
|
-
unsubscribe(callback: EventHandler<TArgs>): any;
|
|
404
|
-
}
|
|
405
|
-
export type EventHandler<TArgs> = (args: TArgs) => void;
|
|
406
|
-
export interface DeferredLicenseLoadingAdapterAPI {
|
|
407
|
-
readonly supportsDeferredLicenseLoading?: boolean;
|
|
408
|
-
readonly onLicenseKeyReceived: Subscribable<{
|
|
409
|
-
licenseKey: string;
|
|
410
|
-
}>;
|
|
411
|
-
readonly onLicenseCallFailed: Subscribable<{}>;
|
|
412
|
-
}
|
|
413
411
|
export interface InternalAdapterAPI extends DeferredLicenseLoadingAdapterAPI {
|
|
414
412
|
readonly downloadSpeedInfo: DownloadSpeedInfo;
|
|
415
413
|
readonly segments: SegmentInfo[];
|
|
@@ -512,9 +510,9 @@ declare class Analytics {
|
|
|
512
510
|
generateNewImpressionId(): void;
|
|
513
511
|
setUserId(): void;
|
|
514
512
|
setupStateMachineCallbacks(): void;
|
|
515
|
-
guardAgainstMissingVideoTitle: (oldConfig: AnalyticsConfig, newConfig: AnalyticsConfig) => void;
|
|
516
|
-
guardAgainstMissingIsLive: (oldConfig: AnalyticsConfig, newConfig: AnalyticsConfig) => void;
|
|
517
|
-
sourceChange: (config: AnalyticsConfig) => void;
|
|
513
|
+
guardAgainstMissingVideoTitle: (oldConfig: AnalyticsConfig, newConfig: AnalyticsConfig | undefined) => void;
|
|
514
|
+
guardAgainstMissingIsLive: (oldConfig: AnalyticsConfig, newConfig: AnalyticsConfig | undefined) => void;
|
|
515
|
+
sourceChange: (config: AnalyticsConfig | undefined) => void;
|
|
518
516
|
setCustomDataOnce: (values: CustomDataValues) => void;
|
|
519
517
|
setCustomData: (values: CustomDataValues) => void;
|
|
520
518
|
getCurrentImpressionId: () => string | undefined;
|
|
@@ -531,8 +529,8 @@ declare class Analytics {
|
|
|
531
529
|
sendAnalyticsRequestSynchronous(): void;
|
|
532
530
|
clearValues(): void;
|
|
533
531
|
getIsLiveFromConfigOrPlaybackInfo(config: AnalyticsConfig, isLiveFromPlayback?: boolean): boolean;
|
|
534
|
-
getMergedCollectorConfig(newConfig: AnalyticsConfig, oldConfig?: AnalyticsConfig): CollectorConfig | undefined;
|
|
535
|
-
getMergedAnalyticsConfig(newConfig: AnalyticsConfig, oldConfig?: AnalyticsConfig): AnalyticsConfig;
|
|
532
|
+
getMergedCollectorConfig(newConfig: AnalyticsConfig | undefined, oldConfig?: AnalyticsConfig): CollectorConfig | undefined;
|
|
533
|
+
getMergedAnalyticsConfig(newConfig: AnalyticsConfig | undefined, oldConfig?: AnalyticsConfig): AnalyticsConfig;
|
|
536
534
|
/**
|
|
537
535
|
* This method sanitizes the input and updates the analytics config.
|
|
538
536
|
* @param values Object containing the customData and other fields
|
|
@@ -561,6 +559,12 @@ declare abstract class Adapter {
|
|
|
561
559
|
protected markPlayerInstanceAsAugmented(player: any): void;
|
|
562
560
|
private guardAgainstNotInitializedAnalytics;
|
|
563
561
|
}
|
|
562
|
+
export declare class AmazonIVSAdapter extends Adapter implements AdapterAPI {
|
|
563
|
+
constructor(config: AnalyticsConfig, player: any);
|
|
564
|
+
}
|
|
565
|
+
export interface AnalyticsStateMachineOptions {
|
|
566
|
+
starttime: any;
|
|
567
|
+
}
|
|
564
568
|
export declare class Bitmovin8Adapter extends Adapter implements AdapterAPI {
|
|
565
569
|
constructor(player: any, opts?: AnalyticsStateMachineOptions);
|
|
566
570
|
private wrapPlayerLoad;
|
|
@@ -571,12 +575,12 @@ export declare class CAFv3Adapter extends Adapter implements AdapterAPI {
|
|
|
571
575
|
export declare class DashjsAdapter extends Adapter implements AdapterAPI {
|
|
572
576
|
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
573
577
|
}
|
|
574
|
-
export declare class HlsAdapter extends Adapter implements AdapterAPI {
|
|
575
|
-
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
576
|
-
}
|
|
577
578
|
export declare class HTMLVideoElementAdapter extends Adapter implements AdapterAPI {
|
|
578
579
|
constructor(config: AnalyticsConfig, player: HTMLVideoElement, opts?: AnalyticsStateMachineOptions);
|
|
579
580
|
}
|
|
581
|
+
export declare class HlsAdapter extends Adapter implements AdapterAPI {
|
|
582
|
+
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
583
|
+
}
|
|
580
584
|
export declare class ShakaAdapter extends Adapter implements AdapterAPI {
|
|
581
585
|
constructor(config: AnalyticsConfig, player: any, opts?: AnalyticsStateMachineOptions);
|
|
582
586
|
private wrapPlayerLoad;
|
|
@@ -603,9 +607,9 @@ declare enum Player {
|
|
|
603
607
|
SHAKA = "shaka",
|
|
604
608
|
DASHJS = "dashjs",
|
|
605
609
|
HTML5 = "html5",
|
|
606
|
-
CHROMECAST_SHAKA = "chromecast-shaka"
|
|
610
|
+
CHROMECAST_SHAKA = "chromecast-shaka",
|
|
611
|
+
AMAZON_IVS = "amazonivs"
|
|
607
612
|
}
|
|
608
|
-
declare const VERSION: string;
|
|
609
613
|
declare const AnalyticsPlayerModule: {
|
|
610
614
|
name: string;
|
|
611
615
|
module: {
|
|
@@ -623,6 +627,7 @@ export declare const adapters: {
|
|
|
623
627
|
DashjsAdapter: typeof DashjsAdapter;
|
|
624
628
|
CAFv3Adapter: typeof CAFv3Adapter;
|
|
625
629
|
HTMLVideoElementAdapter: typeof HTMLVideoElementAdapter;
|
|
630
|
+
AmazonIVSAdapter: typeof AmazonIVSAdapter;
|
|
626
631
|
};
|
|
627
632
|
declare const _default: {
|
|
628
633
|
PlayerModule: {
|
|
@@ -637,6 +642,10 @@ declare const _default: {
|
|
|
637
642
|
};
|
|
638
643
|
|
|
639
644
|
export {
|
|
645
|
+
AnalyticsPlayerModule as PlayerModule,
|
|
646
|
+
CdnProvider as CdnProviders,
|
|
647
|
+
Player as Players,
|
|
648
|
+
VERSION as version,
|
|
640
649
|
_default as default,
|
|
641
650
|
};
|
|
642
651
|
|