stormcloud-video-player 0.4.0 → 0.5.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 +245 -156
- package/dist/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +9759 -5311
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +193 -17
- package/lib/index.d.ts +193 -17
- package/lib/index.js +9761 -5329
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +7090 -1508
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +95 -9
- package/lib/players/HlsPlayer.cjs +7107 -1525
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +7098 -1516
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +302 -266
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +2 -2
- package/lib/sdk/ima.cjs +1375 -0
- package/lib/sdk/ima.cjs.map +1 -0
- package/lib/sdk/ima.d.cts +12 -0
- package/lib/sdk/prebid.cjs +564 -0
- package/lib/sdk/prebid.cjs.map +1 -0
- package/lib/sdk/prebid.d.cts +5 -0
- package/lib/sdk/prebidController.cjs +1560 -0
- package/lib/sdk/prebidController.cjs.map +1 -0
- package/lib/sdk/prebidController.d.cts +11 -0
- package/lib/sdk/vastParser.cjs +393 -0
- package/lib/sdk/vastParser.cjs.map +1 -0
- package/lib/sdk/vastParser.d.cts +45 -0
- package/lib/{types-Ca4ZDaWw.d.cts → types-g2d4Akez.d.cts} +72 -3
- package/lib/ui/StormcloudVideoPlayer.cjs +7130 -1530
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/browserCompat.cjs +222 -20
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/browserCompat.d.cts +9 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/package.json +2 -1
- package/lib/sdk/adstormPlayer.cjs +0 -908
- package/lib/sdk/adstormPlayer.cjs.map +0 -1
- package/lib/sdk/adstormPlayer.d.cts +0 -9
|
@@ -1,56 +1,142 @@
|
|
|
1
|
-
import { S as StormcloudVideoPlayerConfig } from '../types-
|
|
1
|
+
import { S as StormcloudVideoPlayerConfig } from '../types-g2d4Akez.cjs';
|
|
2
2
|
|
|
3
3
|
declare class StormcloudVideoPlayer {
|
|
4
4
|
private readonly video;
|
|
5
5
|
private readonly config;
|
|
6
6
|
private hls?;
|
|
7
|
-
private
|
|
7
|
+
private ima;
|
|
8
8
|
private attached;
|
|
9
9
|
private inAdBreak;
|
|
10
|
+
private currentAdBreakStartWallClockMs;
|
|
10
11
|
private expectedAdBreakDurationMs;
|
|
11
12
|
private adStopTimerId;
|
|
13
|
+
private adStartTimerId;
|
|
14
|
+
private adFailsafeTimerId;
|
|
12
15
|
private ptsDriftEmaMs;
|
|
16
|
+
private adPodQueue;
|
|
17
|
+
private apiVastTagUrl;
|
|
18
|
+
private apiNumberAds;
|
|
19
|
+
private lastHeartbeatTime;
|
|
20
|
+
private heartbeatInterval;
|
|
21
|
+
private currentAdIndex;
|
|
22
|
+
private totalAdsInBreak;
|
|
23
|
+
private showAds;
|
|
13
24
|
private isLiveStream;
|
|
14
25
|
private nativeHlsMode;
|
|
15
26
|
private videoSrcProtection;
|
|
16
27
|
private bufferedSegmentsCount;
|
|
17
28
|
private shouldAutoplayAfterBuffering;
|
|
18
29
|
private hasInitialBufferCompleted;
|
|
30
|
+
private adRequestTokenCounter;
|
|
31
|
+
private activeAdRequestToken;
|
|
32
|
+
private adRequestWatchdogId;
|
|
33
|
+
private adRequestWatchdogToken;
|
|
34
|
+
private adFailsafeToken;
|
|
35
|
+
private failedVastUrls;
|
|
36
|
+
private temporaryFailureUrls;
|
|
37
|
+
private readonly temporaryFailureCooldownMs;
|
|
38
|
+
private continuousFetchingActive;
|
|
39
|
+
private adRequestQueue;
|
|
40
|
+
private maxPlaceholderDurationMs;
|
|
41
|
+
private isShowingPlaceholder;
|
|
19
42
|
private timeUpdateHandler?;
|
|
20
43
|
private emptiedHandler?;
|
|
44
|
+
private totalAdRequestsInBreak;
|
|
45
|
+
private readonly maxTotalAdRequestsPerBreak;
|
|
46
|
+
private pendingAdBreak;
|
|
47
|
+
private prefetchTimerId;
|
|
48
|
+
private consecutiveFailures;
|
|
49
|
+
private readonly maxConsecutiveFailures;
|
|
50
|
+
private lastAdRequestTime;
|
|
51
|
+
private readonly minAdRequestIntervalMs;
|
|
52
|
+
private readonly backoffBaseMs;
|
|
53
|
+
private readonly maxBackoffMs;
|
|
54
|
+
private placeholderContainer;
|
|
55
|
+
private preloadPool;
|
|
56
|
+
private readonly maxPreloadPoolSize;
|
|
57
|
+
private preloadPoolActive;
|
|
58
|
+
private preloadPoolLoopRunning;
|
|
21
59
|
constructor(config: StormcloudVideoPlayerConfig);
|
|
60
|
+
private createAdPlayer;
|
|
22
61
|
load(): Promise<void>;
|
|
62
|
+
private attachImaEventListeners;
|
|
63
|
+
private recreateImaController;
|
|
64
|
+
private ensurePlaceholderContainer;
|
|
65
|
+
private showPlaceholderLayer;
|
|
66
|
+
private hidePlaceholderLayer;
|
|
23
67
|
private attach;
|
|
24
68
|
private shouldUseNativeHls;
|
|
25
69
|
private onId3Tag;
|
|
26
70
|
private parseScte35FromId3;
|
|
27
71
|
private decodeId3ValueToText;
|
|
28
72
|
private onScte35Marker;
|
|
29
|
-
private handleAdStart;
|
|
30
73
|
private parseCueOutDuration;
|
|
31
74
|
private parseCueOutCont;
|
|
32
75
|
private parseAttributeList;
|
|
33
76
|
private toNumber;
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
private
|
|
77
|
+
private isManifestBasedMarker;
|
|
78
|
+
private parseScte35Binary;
|
|
79
|
+
private initializeTracking;
|
|
80
|
+
private sendHeartbeatIfNeeded;
|
|
81
|
+
private fetchAdConfiguration;
|
|
82
|
+
private isPrebidMode;
|
|
83
|
+
getCurrentAdIndex(): number;
|
|
84
|
+
getTotalAdsInBreak(): number;
|
|
85
|
+
private generateVastUrlsWithCorrelators;
|
|
38
86
|
isAdPlaying(): boolean;
|
|
39
87
|
isShowingAds(): boolean;
|
|
40
88
|
getStreamType(): "hls" | "other";
|
|
41
89
|
shouldShowNativeControls(): boolean;
|
|
90
|
+
private shouldContinueLiveStreamDuringAds;
|
|
91
|
+
private startAdPrefetch;
|
|
92
|
+
private clearPendingAdBreak;
|
|
93
|
+
private startPreloadPool;
|
|
94
|
+
private preloadAdIntoPool;
|
|
95
|
+
private preloadPoolLoop;
|
|
96
|
+
private getPreloadedAd;
|
|
97
|
+
private stopPreloadPool;
|
|
98
|
+
private handleAdStart;
|
|
99
|
+
private continuousFetchLoopRunning;
|
|
100
|
+
private startContinuousFetching;
|
|
101
|
+
private continuousFetchLoop;
|
|
102
|
+
private stopContinuousFetching;
|
|
103
|
+
private tryNextAvailableAdWithRateLimit;
|
|
104
|
+
private tryNextAvailableAd;
|
|
105
|
+
private showPlaceholderAndWaitForAds;
|
|
106
|
+
private findCurrentOrNextBreak;
|
|
107
|
+
private onTimeUpdate;
|
|
108
|
+
private handleMidAdJoin;
|
|
109
|
+
private scheduleAdStopCountdown;
|
|
110
|
+
private clearAdStopTimer;
|
|
111
|
+
private ensureAdStoppedByTimer;
|
|
112
|
+
private scheduleAdStartIn;
|
|
113
|
+
private clearAdStartTimer;
|
|
114
|
+
private updatePtsDrift;
|
|
115
|
+
private isTemporaryAdError;
|
|
116
|
+
private isUrlInCooldown;
|
|
117
|
+
private cleanupTemporaryFailures;
|
|
118
|
+
private playSingleAd;
|
|
119
|
+
private handleAdPodComplete;
|
|
120
|
+
private handleAdFailure;
|
|
121
|
+
private startAdRequestWatchdog;
|
|
122
|
+
private clearAdRequestWatchdog;
|
|
123
|
+
private startAdFailsafeTimer;
|
|
124
|
+
private clearAdFailsafeTimer;
|
|
125
|
+
private selectVastTagsForBreak;
|
|
126
|
+
private logAdState;
|
|
127
|
+
private getRemainingAdMs;
|
|
128
|
+
private findBreakForTime;
|
|
42
129
|
toggleMute(): void;
|
|
43
130
|
toggleFullscreen(): Promise<void>;
|
|
44
131
|
isMuted(): boolean;
|
|
45
132
|
setMuted(muted: boolean): void;
|
|
46
133
|
setVolume(volume: number): void;
|
|
134
|
+
getVolume(): number;
|
|
47
135
|
isFullscreen(): boolean;
|
|
48
136
|
isLive(): boolean;
|
|
49
137
|
get videoElement(): HTMLVideoElement;
|
|
50
138
|
resize(): void;
|
|
51
139
|
destroy(): void;
|
|
52
|
-
getCurrentAdIndex(): number;
|
|
53
|
-
getTotalAdsInBreak(): number;
|
|
54
140
|
}
|
|
55
141
|
|
|
56
142
|
export { StormcloudVideoPlayer };
|