stormcloud-video-player 0.7.49 → 0.8.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/README.md +269 -228
- package/dist/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +5197 -6741
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +196 -195
- package/lib/index.d.ts +196 -195
- package/lib/index.js +5326 -6862
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +4802 -3170
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +113 -70
- package/lib/players/FilePlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +4810 -3179
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +4877 -3246
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +1021 -0
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -0
- package/lib/sdk/hlsAdPlayer.d.cts +10 -0
- package/lib/sdk/pal.cjs +358 -0
- package/lib/sdk/pal.cjs.map +1 -0
- package/lib/sdk/pal.d.cts +28 -0
- package/lib/{types-CIHDHY7A.d.cts → types-DDwAfBLt.d.cts} +11 -10
- package/lib/ui/StormcloudVideoPlayer.cjs +5070 -6603
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -14
- package/lib/utils/browserCompat.cjs +10 -114
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/browserCompat.d.cts +3 -7
- package/lib/utils/polyfills.cjs.map +1 -1
- package/lib/utils/tracking.cjs +179 -150
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/tracking.d.cts +11 -6
- package/package.json +1 -2
- package/lib/sdk/adstormPlayer.cjs +0 -1567
- package/lib/sdk/adstormPlayer.cjs.map +0 -1
- package/lib/sdk/adstormPlayer.d.cts +0 -23
- package/lib/sdk/vastParser.cjs +0 -517
- package/lib/sdk/vastParser.cjs.map +0 -1
- package/lib/sdk/vastParser.d.cts +0 -45
- package/lib/ui/OverlayRenderer.cjs +0 -2370
- package/lib/ui/OverlayRenderer.cjs.map +0 -1
- package/lib/ui/OverlayRenderer.d.cts +0 -17
- package/lib/utils/adcision.cjs +0 -282
- package/lib/utils/adcision.cjs.map +0 -1
- package/lib/utils/adcision.d.cts +0 -31
- package/lib/utils/overlays.cjs +0 -354
- package/lib/utils/overlays.cjs.map +0 -1
- package/lib/utils/overlays.d.cts +0 -70
package/lib/index.d.cts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { CSSProperties, lazy as lazy$1 } from 'react';
|
|
2
2
|
import * as csstype from 'csstype';
|
|
3
|
+
import Hls from 'hls.js';
|
|
3
4
|
|
|
4
5
|
type LateJoinPolicy = "play_remaining" | "skip_to_content";
|
|
5
6
|
interface AdBreak {
|
|
6
7
|
id?: string;
|
|
7
8
|
startTimeMs: number;
|
|
8
9
|
durationMs?: number;
|
|
10
|
+
vastTagUrl?: string;
|
|
9
11
|
}
|
|
10
12
|
interface AdSchedule {
|
|
11
13
|
breaks: AdBreak[];
|
|
@@ -30,17 +32,14 @@ interface StormcloudVideoPlayerConfig {
|
|
|
30
32
|
onFullscreenToggle?: () => void;
|
|
31
33
|
onControlClick?: () => void;
|
|
32
34
|
licenseKey?: string;
|
|
35
|
+
vastTagUrl?: string;
|
|
36
|
+
vmapUrl?: string;
|
|
37
|
+
vastMode?: 'adstorm' | 'default';
|
|
33
38
|
minSegmentsBeforePlay?: number;
|
|
34
|
-
disableAds?: boolean;
|
|
35
|
-
disableFiller?: boolean;
|
|
36
|
-
adTransitionGapMs?: number;
|
|
37
|
-
singlePipelineMode?: boolean;
|
|
38
|
-
projectId?: string;
|
|
39
|
-
channelId?: number;
|
|
40
39
|
}
|
|
41
40
|
interface AdController {
|
|
42
41
|
initialize: () => void;
|
|
43
|
-
requestAds: () => Promise<void>;
|
|
42
|
+
requestAds: (vastTagUrl: string) => Promise<void>;
|
|
44
43
|
play: () => Promise<void>;
|
|
45
44
|
pause: () => void;
|
|
46
45
|
resume: () => void;
|
|
@@ -58,6 +57,12 @@ interface AdController {
|
|
|
58
57
|
showPlaceholder: () => void;
|
|
59
58
|
hidePlaceholder: () => void;
|
|
60
59
|
}
|
|
60
|
+
type ImaController = AdController;
|
|
61
|
+
interface AdControllerOptions {
|
|
62
|
+
maxRetries?: number;
|
|
63
|
+
backoffBaseMs?: number;
|
|
64
|
+
}
|
|
65
|
+
type ImaControllerOptions = AdControllerOptions;
|
|
61
66
|
interface ClientInfo {
|
|
62
67
|
brand: string;
|
|
63
68
|
os: string;
|
|
@@ -94,40 +99,60 @@ interface ClientInfo {
|
|
|
94
99
|
interface TrackingData extends ClientInfo {
|
|
95
100
|
browserId: string;
|
|
96
101
|
}
|
|
102
|
+
interface PlayerAnalyticsContext {
|
|
103
|
+
inputStreamType?: string;
|
|
104
|
+
}
|
|
97
105
|
interface HeartbeatData {
|
|
98
106
|
browserId: string;
|
|
107
|
+
player_id: string;
|
|
108
|
+
device_type: ClientInfo["deviceType"];
|
|
109
|
+
input_stream_type?: string;
|
|
110
|
+
os: string;
|
|
111
|
+
ad_loaded?: boolean;
|
|
112
|
+
ad_detect?: boolean;
|
|
113
|
+
license_key?: string;
|
|
114
|
+
capture_at: string;
|
|
99
115
|
timestamp: string;
|
|
100
116
|
}
|
|
101
|
-
interface
|
|
102
|
-
|
|
103
|
-
|
|
117
|
+
interface AdDetectInfo {
|
|
118
|
+
source: "scte35";
|
|
119
|
+
durationSeconds?: number;
|
|
120
|
+
ptsSeconds?: number;
|
|
121
|
+
detectedAtFragmentSn?: number;
|
|
122
|
+
timestamp: string;
|
|
123
|
+
}
|
|
124
|
+
interface AdLoadedInfo {
|
|
125
|
+
source: "vast" | "hls";
|
|
104
126
|
vastUrl?: string;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
127
|
+
durationSeconds?: number;
|
|
128
|
+
timestamp: string;
|
|
129
|
+
}
|
|
130
|
+
interface AdImpressionInfo {
|
|
131
|
+
source: "vast" | "hls";
|
|
132
|
+
adIndex: number;
|
|
133
|
+
adUrl?: string;
|
|
134
|
+
durationSeconds?: number;
|
|
135
|
+
timestamp: string;
|
|
114
136
|
}
|
|
115
137
|
|
|
116
|
-
type DebugLogLevel = "info" | "warn" | "error";
|
|
117
138
|
declare class StormcloudVideoPlayer {
|
|
118
139
|
private readonly video;
|
|
119
140
|
private readonly config;
|
|
120
141
|
private hls?;
|
|
121
|
-
private
|
|
122
|
-
private pendingNextAdBids;
|
|
123
|
-
private continuousFetchLoopPromise;
|
|
142
|
+
private adPlayer;
|
|
124
143
|
private attached;
|
|
125
144
|
private inAdBreak;
|
|
126
145
|
private currentAdBreakStartWallClockMs;
|
|
127
146
|
private expectedAdBreakDurationMs;
|
|
128
147
|
private adStopTimerId;
|
|
148
|
+
private adStartTimerId;
|
|
129
149
|
private adFailsafeTimerId;
|
|
150
|
+
private ptsDriftEmaMs;
|
|
130
151
|
private adPodQueue;
|
|
152
|
+
private apiVastTagUrl;
|
|
153
|
+
private apiNumberAds;
|
|
154
|
+
private vmapBreaks;
|
|
155
|
+
private consumedVmapBreakIds;
|
|
131
156
|
private lastHeartbeatTime;
|
|
132
157
|
private heartbeatInterval;
|
|
133
158
|
private currentAdIndex;
|
|
@@ -139,115 +164,164 @@ declare class StormcloudVideoPlayer {
|
|
|
139
164
|
private bufferedSegmentsCount;
|
|
140
165
|
private shouldAutoplayAfterBuffering;
|
|
141
166
|
private hasInitialBufferCompleted;
|
|
167
|
+
private adRequestTokenCounter;
|
|
142
168
|
private activeAdRequestToken;
|
|
143
169
|
private adRequestWatchdogId;
|
|
144
170
|
private adRequestWatchdogToken;
|
|
145
171
|
private adFailsafeToken;
|
|
172
|
+
private failedVastUrls;
|
|
173
|
+
private temporaryFailureUrls;
|
|
174
|
+
private readonly temporaryFailureCooldownMs;
|
|
146
175
|
private continuousFetchingActive;
|
|
147
|
-
private
|
|
176
|
+
private adRequestQueue;
|
|
148
177
|
private maxPlaceholderDurationMs;
|
|
149
178
|
private isShowingPlaceholder;
|
|
150
179
|
private timeUpdateHandler?;
|
|
151
180
|
private emptiedHandler?;
|
|
152
|
-
private
|
|
153
|
-
private
|
|
154
|
-
private
|
|
155
|
-
private
|
|
181
|
+
private readonly tsScte35Pids;
|
|
182
|
+
private readonly pmtPids;
|
|
183
|
+
private readonly processedTsScte35Sections;
|
|
184
|
+
private readonly pendingScte35Cues;
|
|
185
|
+
private readonly recentScte35CueKeys;
|
|
186
|
+
private readonly recentScte35CueLimit;
|
|
187
|
+
private pendingScte35CueKey;
|
|
188
|
+
private activeScte35BreakKey;
|
|
189
|
+
private scheduledScte35BreakKey;
|
|
156
190
|
private totalAdRequestsInBreak;
|
|
157
191
|
private readonly maxTotalAdRequestsPerBreak;
|
|
158
192
|
private pendingAdBreak;
|
|
159
193
|
private prefetchTimerId;
|
|
160
|
-
private savedMutedStateBeforeAd;
|
|
161
|
-
private adLayerInitialized;
|
|
162
194
|
private consecutiveFailures;
|
|
163
195
|
private readonly maxConsecutiveFailures;
|
|
164
196
|
private lastAdRequestTime;
|
|
165
197
|
private readonly minAdRequestIntervalMs;
|
|
166
198
|
private readonly backoffBaseMs;
|
|
167
199
|
private readonly maxBackoffMs;
|
|
168
|
-
private
|
|
169
|
-
private
|
|
170
|
-
private readonly
|
|
171
|
-
private
|
|
172
|
-
private readonly
|
|
173
|
-
private
|
|
174
|
-
private
|
|
175
|
-
private
|
|
176
|
-
private
|
|
177
|
-
private
|
|
200
|
+
private placeholderContainer;
|
|
201
|
+
private globalConsecutiveNoFills;
|
|
202
|
+
private readonly globalNoFillThreshold;
|
|
203
|
+
private globalNoFillCooldownUntil;
|
|
204
|
+
private readonly globalNoFillBackoffBaseMs;
|
|
205
|
+
private readonly globalNoFillBackoffMaxMs;
|
|
206
|
+
private globalLastGamRequestTime;
|
|
207
|
+
private readonly globalMinGamIntervalMs;
|
|
208
|
+
private preloadPool;
|
|
209
|
+
private readonly maxPreloadPoolSize;
|
|
210
|
+
private preloadPoolActive;
|
|
211
|
+
private preloadPoolLoopRunning;
|
|
212
|
+
private adDetectSentForCurrentBreak;
|
|
213
|
+
private palNonce;
|
|
214
|
+
private palPlaybackStarted;
|
|
178
215
|
constructor(config: StormcloudVideoPlayerConfig);
|
|
179
|
-
private
|
|
216
|
+
private createAdPlayer;
|
|
180
217
|
load(): Promise<void>;
|
|
181
|
-
private
|
|
182
|
-
private
|
|
183
|
-
private
|
|
218
|
+
private attachImaEventListeners;
|
|
219
|
+
private recreateAdController;
|
|
220
|
+
private ensurePlaceholderContainer;
|
|
184
221
|
private showPlaceholderLayer;
|
|
185
222
|
private hidePlaceholderLayer;
|
|
186
|
-
private startFillerBreakTimer;
|
|
187
|
-
private stopFillerBreakTimer;
|
|
188
223
|
private attach;
|
|
189
224
|
private shouldUseNativeHls;
|
|
225
|
+
private onId3Tag;
|
|
226
|
+
private parseScte35FromId3;
|
|
227
|
+
private decodeId3ValueToText;
|
|
228
|
+
private createScte35CueContext;
|
|
229
|
+
private getFragmentStartSeconds;
|
|
230
|
+
private onScte35Cue;
|
|
231
|
+
private createScte35Cue;
|
|
232
|
+
private getScte35CueKey;
|
|
233
|
+
private getPendingScte35CueKey;
|
|
234
|
+
private getScte35MarkerRaw;
|
|
235
|
+
private toIdentityString;
|
|
236
|
+
private isStrongScte35CueKey;
|
|
237
|
+
private hasRecentlyHandledScte35Cue;
|
|
238
|
+
private markScte35CueHandled;
|
|
239
|
+
private trimRecentScte35CueMaps;
|
|
240
|
+
private shouldAcceptScte35EndCue;
|
|
241
|
+
private activatePendingScte35CuesForFragment;
|
|
242
|
+
private onScte35Marker;
|
|
243
|
+
private startScte35AdBreak;
|
|
244
|
+
private parseCueOutDuration;
|
|
245
|
+
private parseCueOutCont;
|
|
246
|
+
private parseAttributeList;
|
|
247
|
+
private toNumber;
|
|
248
|
+
private isManifestBasedMarker;
|
|
249
|
+
private normalizeFragmentPayload;
|
|
250
|
+
private processFragmentScte35Payload;
|
|
251
|
+
private parseScte35FromTsPackets;
|
|
252
|
+
private detectTsPacketFormat;
|
|
253
|
+
private parsePatSection;
|
|
254
|
+
private parsePmtSection;
|
|
255
|
+
private descriptorsIdentifyScte35;
|
|
256
|
+
private collectScte35SectionsFromPayload;
|
|
257
|
+
private appendScte35Bytes;
|
|
258
|
+
private addScte35SectionMarker;
|
|
259
|
+
private hasProcessedTsScte35Section;
|
|
260
|
+
private getPsiSectionStart;
|
|
261
|
+
private getPsiSectionLength;
|
|
262
|
+
private parseScte35Binary;
|
|
263
|
+
private parseScte35SegmentationDescriptors;
|
|
264
|
+
private parseScte35SegmentationDescriptor;
|
|
265
|
+
private markerTypeFromSegmentationTypeId;
|
|
190
266
|
private initializeTracking;
|
|
191
267
|
private sendHeartbeatIfNeeded;
|
|
268
|
+
private fetchAdConfiguration;
|
|
269
|
+
private fetchAndParseVmap;
|
|
270
|
+
private parseVmapToBreaks;
|
|
271
|
+
private parseVmapTimeOffsetToMs;
|
|
272
|
+
private getAdBreakKey;
|
|
273
|
+
private resolveBreakStartMs;
|
|
192
274
|
getCurrentAdIndex(): number;
|
|
193
275
|
getTotalAdsInBreak(): number;
|
|
194
|
-
|
|
276
|
+
getAdRemainingMs(): number;
|
|
277
|
+
private generateVastUrlsWithCorrelators;
|
|
195
278
|
isAdPlaying(): boolean;
|
|
196
279
|
isShowingAds(): boolean;
|
|
197
|
-
isInAdBreak(): boolean;
|
|
198
|
-
private initializeAdLayer;
|
|
199
|
-
setDisableAds(disabled: boolean): void;
|
|
200
|
-
private syncMainContentAudioWhenVisible;
|
|
201
280
|
getStreamType(): "hls" | "other";
|
|
202
281
|
shouldShowNativeControls(): boolean;
|
|
203
282
|
private shouldContinueLiveStreamDuringAds;
|
|
204
283
|
private startAdPrefetch;
|
|
205
|
-
private runAdPrefetch;
|
|
206
284
|
private clearPendingAdBreak;
|
|
207
|
-
private
|
|
208
|
-
private
|
|
209
|
-
private
|
|
210
|
-
private
|
|
211
|
-
private
|
|
212
|
-
private extractTsFilename;
|
|
213
|
-
private fragmentMatchesSegment;
|
|
214
|
-
private clearAdInsertionOffsetTimer;
|
|
215
|
-
private startContinuousFetchLoop;
|
|
216
|
-
private runContinuousFetchLoop;
|
|
285
|
+
private startPreloadPool;
|
|
286
|
+
private preloadAdIntoPool;
|
|
287
|
+
private preloadPoolLoop;
|
|
288
|
+
private getPreloadedAd;
|
|
289
|
+
private stopPreloadPool;
|
|
217
290
|
private handleAdStart;
|
|
291
|
+
private continuousFetchLoopRunning;
|
|
292
|
+
private startContinuousFetching;
|
|
293
|
+
private continuousFetchLoop;
|
|
218
294
|
private stopContinuousFetching;
|
|
219
295
|
private tryNextAvailableAdWithRateLimit;
|
|
220
296
|
private tryNextAvailableAd;
|
|
221
297
|
private showPlaceholderAndWaitForAds;
|
|
298
|
+
private findCurrentOrNextBreak;
|
|
222
299
|
private onTimeUpdate;
|
|
300
|
+
private handleMidAdJoin;
|
|
223
301
|
private scheduleAdStopCountdown;
|
|
224
302
|
private clearAdStopTimer;
|
|
225
303
|
private ensureAdStoppedByTimer;
|
|
304
|
+
private scheduleAdStartIn;
|
|
305
|
+
private clearAdStartTimer;
|
|
306
|
+
private updatePtsDrift;
|
|
307
|
+
private isTemporaryAdError;
|
|
308
|
+
private isUrlInCooldown;
|
|
309
|
+
private cleanupTemporaryFailures;
|
|
310
|
+
private isGamInCooldown;
|
|
311
|
+
private recordGamNoFill;
|
|
312
|
+
private resetGamNoFillCounter;
|
|
313
|
+
private enforceGlobalRateLimit;
|
|
314
|
+
private playSingleAd;
|
|
226
315
|
private handleAdPodComplete;
|
|
227
316
|
private handleAdFailure;
|
|
228
317
|
private startAdRequestWatchdog;
|
|
229
318
|
private clearAdRequestWatchdog;
|
|
230
319
|
private startAdFailsafeTimer;
|
|
231
320
|
private clearAdFailsafeTimer;
|
|
321
|
+
private selectVastTagsForBreak;
|
|
232
322
|
private logAdState;
|
|
233
323
|
private getRemainingAdMs;
|
|
234
|
-
private
|
|
235
|
-
private pushAdInsertionDebug;
|
|
236
|
-
getAdInsertionDebugLog(): ReadonlyArray<{
|
|
237
|
-
timestampMs: number;
|
|
238
|
-
event: string;
|
|
239
|
-
segmentName: string;
|
|
240
|
-
offsetSeconds?: number;
|
|
241
|
-
updatedAt?: string;
|
|
242
|
-
detail?: string;
|
|
243
|
-
}>;
|
|
244
|
-
getDebugLogs(): ReadonlyArray<{
|
|
245
|
-
timestampMs: number;
|
|
246
|
-
level: DebugLogLevel;
|
|
247
|
-
category: string;
|
|
248
|
-
message: string;
|
|
249
|
-
details?: Record<string, unknown>;
|
|
250
|
-
}>;
|
|
324
|
+
private findBreakForTime;
|
|
251
325
|
toggleMute(): void;
|
|
252
326
|
toggleFullscreen(): Promise<void>;
|
|
253
327
|
isMuted(): boolean;
|
|
@@ -256,15 +330,6 @@ declare class StormcloudVideoPlayer {
|
|
|
256
330
|
getVolume(): number;
|
|
257
331
|
isFullscreen(): boolean;
|
|
258
332
|
isLive(): boolean;
|
|
259
|
-
getMinHlsResolution(): {
|
|
260
|
-
width: number;
|
|
261
|
-
height: number;
|
|
262
|
-
} | null;
|
|
263
|
-
getMaxHlsResolution(): {
|
|
264
|
-
width: number;
|
|
265
|
-
height: number;
|
|
266
|
-
} | null;
|
|
267
|
-
getCurrentHlsSegmentDurationMs(): number | null;
|
|
268
333
|
get videoElement(): HTMLVideoElement;
|
|
269
334
|
resize(): void;
|
|
270
335
|
destroy(): void;
|
|
@@ -275,19 +340,6 @@ type StormcloudVideoPlayerProps = Omit<StormcloudVideoPlayerConfig, "videoElemen
|
|
|
275
340
|
wrapperClassName?: string;
|
|
276
341
|
wrapperStyle?: React.CSSProperties;
|
|
277
342
|
licenseKey?: string;
|
|
278
|
-
swirlProjectId?: number;
|
|
279
|
-
swirlShowcaseDemo?: boolean;
|
|
280
|
-
swirlOverlayApiBaseUrl?: string;
|
|
281
|
-
swirlOverlayCoordinateSpace?: {
|
|
282
|
-
width: number;
|
|
283
|
-
height: number;
|
|
284
|
-
} | null;
|
|
285
|
-
adcisionChannelId?: number;
|
|
286
|
-
disableOverlays?: boolean;
|
|
287
|
-
showAdsControl?: boolean;
|
|
288
|
-
showOverlaysControl?: boolean;
|
|
289
|
-
showAiContextControl?: boolean;
|
|
290
|
-
showDebugControl?: boolean;
|
|
291
343
|
};
|
|
292
344
|
declare const StormcloudVideoPlayerComponent: React.FC<StormcloudVideoPlayerProps>;
|
|
293
345
|
|
|
@@ -324,10 +376,9 @@ interface BaseStormcloudPlayerProps {
|
|
|
324
376
|
showCustomControls?: boolean;
|
|
325
377
|
hideLoadingIndicator?: boolean;
|
|
326
378
|
licenseKey?: string;
|
|
379
|
+
vmapUrl?: string;
|
|
327
380
|
adFailsafeTimeoutMs?: number;
|
|
328
381
|
minSegmentsBeforePlay?: number;
|
|
329
|
-
disableAds?: boolean;
|
|
330
|
-
disableFiller?: boolean;
|
|
331
382
|
onReady?: (player: StormcloudVideoPlayer) => void;
|
|
332
383
|
onStart?: () => void;
|
|
333
384
|
onPlay?: () => void;
|
|
@@ -4013,77 +4064,16 @@ declare const SUPPORTS_DASH: () => boolean;
|
|
|
4013
4064
|
|
|
4014
4065
|
declare function getClientInfo(): ClientInfo;
|
|
4015
4066
|
declare function getBrowserID(clientInfo: ClientInfo): Promise<string>;
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
update_interval?: number;
|
|
4027
|
-
scroll_speed?: number;
|
|
4028
|
-
direction?: string;
|
|
4029
|
-
font_size?: number;
|
|
4030
|
-
font_family?: string;
|
|
4031
|
-
font_weight?: string;
|
|
4032
|
-
text_color?: string;
|
|
4033
|
-
background_color?: string;
|
|
4034
|
-
background_opacity?: number;
|
|
4035
|
-
border_color?: string;
|
|
4036
|
-
border_width?: number;
|
|
4037
|
-
border_radius?: number;
|
|
4038
|
-
padding?: number;
|
|
4039
|
-
margin?: number;
|
|
4040
|
-
show_title?: boolean;
|
|
4041
|
-
show_description?: boolean;
|
|
4042
|
-
show_timestamp?: boolean;
|
|
4043
|
-
show_author?: boolean;
|
|
4044
|
-
show_category?: boolean;
|
|
4045
|
-
max_items?: number;
|
|
4046
|
-
item_spacing?: number;
|
|
4047
|
-
fade_in_out?: boolean;
|
|
4048
|
-
fade_distance?: number;
|
|
4049
|
-
auto_refresh?: boolean;
|
|
4050
|
-
use_custom_text?: boolean;
|
|
4051
|
-
custom_text?: string;
|
|
4052
|
-
label?: string;
|
|
4053
|
-
label_line2?: string;
|
|
4054
|
-
label_color?: string;
|
|
4055
|
-
label_text_color?: string;
|
|
4056
|
-
accent_color?: string;
|
|
4057
|
-
show_accent_line?: boolean;
|
|
4058
|
-
separator_char?: string;
|
|
4059
|
-
preset?: string;
|
|
4060
|
-
}
|
|
4061
|
-
type SwirlOverlayType = "image" | "text" | "scroller" | "shape" | "score_bug" | "lower_third" | "qr_code" | "coming_up_next" | "contextual_trigger" | "odds_betting" | "breaking_news" | "countdown";
|
|
4062
|
-
interface SwirlOverlay {
|
|
4063
|
-
id: number;
|
|
4064
|
-
project_id: number;
|
|
4065
|
-
name: string;
|
|
4066
|
-
type: SwirlOverlayType | string;
|
|
4067
|
-
visible: boolean;
|
|
4068
|
-
x: number;
|
|
4069
|
-
y: number;
|
|
4070
|
-
width: number;
|
|
4071
|
-
height: number;
|
|
4072
|
-
opacity: number;
|
|
4073
|
-
start_time: string;
|
|
4074
|
-
duration: string;
|
|
4075
|
-
content?: string;
|
|
4076
|
-
image_url?: string;
|
|
4077
|
-
scroller_config?: SwirlScrollerConfig;
|
|
4078
|
-
z_index: number;
|
|
4079
|
-
created_at?: string;
|
|
4080
|
-
updated_at?: string;
|
|
4081
|
-
}
|
|
4082
|
-
declare function timeStringToSeconds(timeStr: string): number;
|
|
4083
|
-
declare function isOverlayActive(overlay: SwirlOverlay, currentTime: number): boolean;
|
|
4084
|
-
declare function normalizeSwirlOverlay(raw: SwirlOverlay & Record<string, unknown>): SwirlOverlay;
|
|
4085
|
-
declare function fetchProjectOverlays(projectId: number, apiBaseUrl?: string): Promise<SwirlOverlay[]>;
|
|
4086
|
-
declare function resolveImageUrl(imageUrl: string, apiBaseUrl?: string): string;
|
|
4067
|
+
type PlayerMetricFlags = {
|
|
4068
|
+
adLoaded?: boolean;
|
|
4069
|
+
adDetect?: boolean;
|
|
4070
|
+
captureAt?: string;
|
|
4071
|
+
};
|
|
4072
|
+
declare function sendInitialTracking(licenseKey?: string, context?: PlayerAnalyticsContext): Promise<void>;
|
|
4073
|
+
declare function sendAdDetectTracking(licenseKey: string | undefined, adDetectInfo: AdDetectInfo, context?: PlayerAnalyticsContext): Promise<void>;
|
|
4074
|
+
declare function sendAdLoadedTracking(licenseKey: string | undefined, adLoadedInfo: AdLoadedInfo, context?: PlayerAnalyticsContext): Promise<void>;
|
|
4075
|
+
declare function sendAdImpressionTracking(licenseKey: string | undefined, adImpressionInfo: AdImpressionInfo, context?: PlayerAnalyticsContext): Promise<void>;
|
|
4076
|
+
declare function sendHeartbeat(licenseKey?: string, context?: PlayerAnalyticsContext, flags?: PlayerMetricFlags): Promise<void>;
|
|
4087
4077
|
|
|
4088
4078
|
declare function initializePolyfills(): void;
|
|
4089
4079
|
|
|
@@ -4107,39 +4097,50 @@ interface BrowserInfo {
|
|
|
4107
4097
|
isSmartTV: boolean;
|
|
4108
4098
|
isLegacyTV: boolean;
|
|
4109
4099
|
platform: string;
|
|
4110
|
-
supportsIMA: boolean;
|
|
4111
4100
|
supportsModernJS: boolean;
|
|
4112
|
-
recommendedAdPlayer: 'ima' | 'hls';
|
|
4113
4101
|
webOSVersion?: number | undefined;
|
|
4114
4102
|
tizenVersion?: number | undefined;
|
|
4115
4103
|
chromeVersion?: number | undefined;
|
|
4116
4104
|
}
|
|
4117
4105
|
declare function detectBrowser(): BrowserInfo;
|
|
4118
|
-
declare function supportsModernJS(): boolean;
|
|
4119
|
-
declare function logBrowserInfo(debug?: boolean): void;
|
|
4120
4106
|
declare function getBrowserConfigOverrides(): {
|
|
4121
4107
|
allowNativeHls?: boolean;
|
|
4122
4108
|
};
|
|
4109
|
+
declare function supportsModernJS(): boolean;
|
|
4110
|
+
declare function logBrowserInfo(debug?: boolean): void;
|
|
4123
4111
|
declare function supportsFeature(feature: string): boolean;
|
|
4124
4112
|
|
|
4125
|
-
|
|
4126
|
-
licenseKey: string;
|
|
4127
|
-
debug?: boolean;
|
|
4128
|
-
channelId?: number;
|
|
4129
|
-
}
|
|
4130
|
-
interface AdStormLayerOptionsUpdate {
|
|
4113
|
+
declare function createHlsAdPlayer(contentVideo: HTMLVideoElement, options?: {
|
|
4131
4114
|
continueLiveStreamDuringAds?: boolean;
|
|
4132
|
-
|
|
4115
|
+
licenseKey?: string;
|
|
4116
|
+
mainHlsInstance?: Hls;
|
|
4117
|
+
}): AdController;
|
|
4118
|
+
|
|
4119
|
+
declare global {
|
|
4120
|
+
interface Window {
|
|
4121
|
+
goog?: any;
|
|
4122
|
+
}
|
|
4123
|
+
}
|
|
4124
|
+
interface PalNonceOptions {
|
|
4125
|
+
videoWidth?: number;
|
|
4126
|
+
videoHeight?: number;
|
|
4127
|
+
descriptionUrl?: string;
|
|
4128
|
+
ppid?: string;
|
|
4129
|
+
sessionId?: string;
|
|
4130
|
+
adWillAutoPlay?: boolean;
|
|
4131
|
+
adWillPlayMuted?: boolean;
|
|
4132
|
+
continuousPlayback?: boolean;
|
|
4133
4133
|
}
|
|
4134
|
-
interface
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4134
|
+
interface PalNonceManager {
|
|
4135
|
+
generateNonce(options?: PalNonceOptions): Promise<string>;
|
|
4136
|
+
getCurrentNonce(): string;
|
|
4137
|
+
injectNonce(vastTagUrl: string): string;
|
|
4138
|
+
sendPlaybackStart(): void;
|
|
4139
|
+
sendPlaybackEnd(): void;
|
|
4140
|
+
sendAdClick(): void;
|
|
4141
|
+
sendAdTouch(event: MouseEvent | TouchEvent): void;
|
|
4142
|
+
reset(): void;
|
|
4142
4143
|
}
|
|
4143
|
-
declare function
|
|
4144
|
+
declare function createPalNonceManager(): PalNonceManager;
|
|
4144
4145
|
|
|
4145
|
-
export { type AdBreak, type
|
|
4146
|
+
export { type AdBreak, type AdController, type AdControllerOptions, type AdDetectInfo, type AdImpressionInfo, type AdLoadedInfo, type AdSchedule, type BaseStormcloudPlayerProps, type BrowserInfo, type ClientInfo, type HeartbeatData, IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, type ImaController, type ImaControllerOptions, type LateJoinPolicy, type OnProgressProps, type PalNonceManager, type PalNonceOptions, type PlayerAnalyticsContext, SUPPORTS_DASH, SUPPORTS_HLS, StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, type StormcloudVideoPlayerConfig, type StormcloudVideoPlayerProps, type TrackingData, canPlay, createHlsAdPlayer, createPalNonceManager, createStormcloudPlayer, StormcloudVideoPlayerComponent as default, detectBrowser, getBrowserConfigOverrides, getBrowserID, getClientInfo, initializePolyfills, isMediaStream, lazy, logBrowserInfo, merge, omit, parseQuery, players, randomString, sendAdDetectTracking, sendAdImpressionTracking, sendAdLoadedTracking, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode };
|