stormcloud-video-player 0.6.7 → 0.6.9

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/lib/index.d.cts CHANGED
@@ -73,8 +73,19 @@ interface ClientInfo {
73
73
  interface TrackingData extends ClientInfo {
74
74
  browserId: string;
75
75
  }
76
+ interface PlayerAnalyticsContext {
77
+ inputStreamType?: string;
78
+ }
76
79
  interface HeartbeatData {
77
80
  browserId: string;
81
+ player_id: string;
82
+ device_type: ClientInfo["deviceType"];
83
+ input_stream_type?: string;
84
+ os: string;
85
+ ad_loaded?: boolean;
86
+ ad_detect?: boolean;
87
+ license_key?: string;
88
+ capture_at: string;
78
89
  timestamp: string;
79
90
  }
80
91
  interface VastBidResponse {
@@ -125,6 +136,7 @@ declare class StormcloudVideoPlayer {
125
136
  private heartbeatInterval;
126
137
  private currentAdIndex;
127
138
  private totalAdsInBreak;
139
+ private lastServedAdUrl;
128
140
  private showAds;
129
141
  private isLiveStream;
130
142
  private nativeHlsMode;
@@ -162,6 +174,10 @@ declare class StormcloudVideoPlayer {
162
174
  private adRequest;
163
175
  load(): Promise<void>;
164
176
  private getAdSource;
177
+ private getInputStreamType;
178
+ private getAnalyticsContext;
179
+ private getAdUrlFromBids;
180
+ private trackAdLoaded;
165
181
  private attachAdLayerEventListeners;
166
182
  private ensureFillerVideo;
167
183
  private showPlaceholderLayer;
@@ -3959,8 +3975,13 @@ declare const SUPPORTS_DASH: () => boolean;
3959
3975
 
3960
3976
  declare function getClientInfo(): ClientInfo;
3961
3977
  declare function getBrowserID(clientInfo: ClientInfo): Promise<string>;
3962
- declare function sendInitialTracking(licenseKey?: string): Promise<void>;
3963
- declare function sendHeartbeat(licenseKey?: string): Promise<void>;
3978
+ type PlayerMetricFlags = {
3979
+ adLoaded?: boolean;
3980
+ adDetect?: boolean;
3981
+ captureAt?: string;
3982
+ };
3983
+ declare function sendInitialTracking(licenseKey?: string, context?: PlayerAnalyticsContext): Promise<void>;
3984
+ declare function sendHeartbeat(licenseKey?: string, context?: PlayerAnalyticsContext, flags?: PlayerMetricFlags): Promise<void>;
3964
3985
 
3965
3986
  declare function initializePolyfills(): void;
3966
3987
 
package/lib/index.d.ts CHANGED
@@ -73,8 +73,19 @@ interface ClientInfo {
73
73
  interface TrackingData extends ClientInfo {
74
74
  browserId: string;
75
75
  }
76
+ interface PlayerAnalyticsContext {
77
+ inputStreamType?: string;
78
+ }
76
79
  interface HeartbeatData {
77
80
  browserId: string;
81
+ player_id: string;
82
+ device_type: ClientInfo["deviceType"];
83
+ input_stream_type?: string;
84
+ os: string;
85
+ ad_loaded?: boolean;
86
+ ad_detect?: boolean;
87
+ license_key?: string;
88
+ capture_at: string;
78
89
  timestamp: string;
79
90
  }
80
91
  interface VastBidResponse {
@@ -125,6 +136,7 @@ declare class StormcloudVideoPlayer {
125
136
  private heartbeatInterval;
126
137
  private currentAdIndex;
127
138
  private totalAdsInBreak;
139
+ private lastServedAdUrl;
128
140
  private showAds;
129
141
  private isLiveStream;
130
142
  private nativeHlsMode;
@@ -162,6 +174,10 @@ declare class StormcloudVideoPlayer {
162
174
  private adRequest;
163
175
  load(): Promise<void>;
164
176
  private getAdSource;
177
+ private getInputStreamType;
178
+ private getAnalyticsContext;
179
+ private getAdUrlFromBids;
180
+ private trackAdLoaded;
165
181
  private attachAdLayerEventListeners;
166
182
  private ensureFillerVideo;
167
183
  private showPlaceholderLayer;
@@ -3959,8 +3975,13 @@ declare const SUPPORTS_DASH: () => boolean;
3959
3975
 
3960
3976
  declare function getClientInfo(): ClientInfo;
3961
3977
  declare function getBrowserID(clientInfo: ClientInfo): Promise<string>;
3962
- declare function sendInitialTracking(licenseKey?: string): Promise<void>;
3963
- declare function sendHeartbeat(licenseKey?: string): Promise<void>;
3978
+ type PlayerMetricFlags = {
3979
+ adLoaded?: boolean;
3980
+ adDetect?: boolean;
3981
+ captureAt?: string;
3982
+ };
3983
+ declare function sendInitialTracking(licenseKey?: string, context?: PlayerAnalyticsContext): Promise<void>;
3984
+ declare function sendHeartbeat(licenseKey?: string, context?: PlayerAnalyticsContext, flags?: PlayerMetricFlags): Promise<void>;
3964
3985
 
3965
3986
  declare function initializePolyfills(): void;
3966
3987