stormcloud-video-player 0.8.68 → 0.8.69
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/dist/stormcloud-vp.min.js +1 -1
- package/lib/Player.cjs +30 -8
- package/lib/Player.cjs.map +1 -1
- package/lib/Player.d.cts +2 -1
- package/lib/StormcloudPlayer.cjs +5615 -5101
- package/lib/StormcloudPlayer.cjs.map +1 -1
- package/lib/StormcloudPlayer.d.cts +1 -0
- package/lib/index.cjs +5688 -5117
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -1
- package/lib/index.d.ts +81 -1
- package/lib/index.js +5663 -5119
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.cjs +314 -113
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +9 -3
- package/lib/player/FloorLadder.cjs +578 -0
- package/lib/player/FloorLadder.cjs.map +1 -0
- package/lib/player/FloorLadder.d.cts +74 -0
- package/lib/player/StormcloudVideoPlayer.cjs +5615 -5101
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +9 -1
- package/lib/players/HlsPlayer.cjs +5615 -5101
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +5615 -5101
- package/lib/players/index.cjs.map +1 -1
- package/lib/props.cjs +30 -8
- package/lib/props.cjs.map +1 -1
- package/lib/props.d.cts +1 -0
- package/lib/types.d.cts +22 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +5634 -5091
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -0
- package/lib/utils/vastMacros.cjs +4 -0
- package/lib/utils/vastMacros.cjs.map +1 -1
- package/lib/utils/vastMacros.d.cts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { AdFloorLadderConfig, AdPosition } from '../types.cjs';
|
|
2
|
+
|
|
3
|
+
declare const DEFAULT_WEB_FLOOR_LADDER_CONFIG: Readonly<AdFloorLadderConfig>;
|
|
4
|
+
type FloorValidationReason = "not_integer" | "out_of_range" | "not_step_multiple" | "not_ready";
|
|
5
|
+
type FloorValidation = {
|
|
6
|
+
ok: true;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
reason: FloorValidationReason;
|
|
10
|
+
};
|
|
11
|
+
type FloorSource = "selected" | "fallback" | "none";
|
|
12
|
+
/** Levels that have targeting values in GAM; the ladder config can narrow these but never widen them. */
|
|
13
|
+
interface FloorLadderBounds {
|
|
14
|
+
minCents: number;
|
|
15
|
+
maxCents: number;
|
|
16
|
+
stepCents: number;
|
|
17
|
+
}
|
|
18
|
+
declare const DEFAULT_FLOOR_LADDER_BOUNDS: Readonly<FloorLadderBounds>;
|
|
19
|
+
interface FloorSelectionContext {
|
|
20
|
+
position: AdPosition;
|
|
21
|
+
isCtv: boolean;
|
|
22
|
+
bounds: Readonly<FloorLadderBounds>;
|
|
23
|
+
}
|
|
24
|
+
interface FloorSelectorResult {
|
|
25
|
+
floorCents?: number;
|
|
26
|
+
source: FloorSource;
|
|
27
|
+
reason?: string;
|
|
28
|
+
}
|
|
29
|
+
interface FloorSelector {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
select(config: Readonly<AdFloorLadderConfig>, context: FloorSelectionContext): FloorSelectorResult;
|
|
32
|
+
}
|
|
33
|
+
interface OpportunityFloor {
|
|
34
|
+
readonly status: "armed" | "skipped";
|
|
35
|
+
readonly floorCents: number | undefined;
|
|
36
|
+
readonly source: FloorSource;
|
|
37
|
+
readonly reason: string | undefined;
|
|
38
|
+
readonly selector: string;
|
|
39
|
+
readonly position: AdPosition;
|
|
40
|
+
readonly configurationVersion: string;
|
|
41
|
+
readonly targetingKey: string;
|
|
42
|
+
readonly targetAdUnitPath: string;
|
|
43
|
+
}
|
|
44
|
+
interface FloorUrlResult {
|
|
45
|
+
url: string;
|
|
46
|
+
applied: boolean;
|
|
47
|
+
reason: string | undefined;
|
|
48
|
+
}
|
|
49
|
+
interface FloorLadderValidationReport {
|
|
50
|
+
ok: boolean;
|
|
51
|
+
levels: number[];
|
|
52
|
+
errors: string[];
|
|
53
|
+
}
|
|
54
|
+
declare function generateFloorLevels(minCents: number, maxCents: number, stepCents: number): number[];
|
|
55
|
+
declare function resolveFloorLadderBounds(overrides?: Partial<FloorLadderBounds>): FloorLadderBounds;
|
|
56
|
+
declare function validateFloorCents(value: unknown, config: Readonly<AdFloorLadderConfig>, bounds?: Readonly<FloorLadderBounds>): FloorValidation;
|
|
57
|
+
declare function validateFloorLadderConfig(config: Readonly<AdFloorLadderConfig>, bounds?: Readonly<FloorLadderBounds>): FloorLadderValidationReport;
|
|
58
|
+
declare const fixedFloorSelector: FloorSelector;
|
|
59
|
+
declare function resolveOpportunityFloor(config: Readonly<AdFloorLadderConfig>, context: FloorSelectionContext, selector?: FloorSelector): OpportunityFloor;
|
|
60
|
+
declare function applyFloorToVastUrl(url: string, floor: OpportunityFloor): FloorUrlResult;
|
|
61
|
+
declare class FloorLadderController {
|
|
62
|
+
private config;
|
|
63
|
+
private selector;
|
|
64
|
+
private readonly bounds;
|
|
65
|
+
constructor(initial?: Partial<AdFloorLadderConfig>, bounds?: Partial<FloorLadderBounds>, selector?: FloorSelector);
|
|
66
|
+
get(): AdFloorLadderConfig;
|
|
67
|
+
getBounds(): FloorLadderBounds;
|
|
68
|
+
update(update: Partial<AdFloorLadderConfig>): FloorLadderValidationReport;
|
|
69
|
+
validate(): FloorLadderValidationReport;
|
|
70
|
+
setSelector(selector: FloorSelector): void;
|
|
71
|
+
snapshotFor(context: Omit<FloorSelectionContext, "bounds">): OpportunityFloor;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { DEFAULT_FLOOR_LADDER_BOUNDS, DEFAULT_WEB_FLOOR_LADDER_CONFIG, type FloorLadderBounds, FloorLadderController, type FloorLadderValidationReport, type FloorSelectionContext, type FloorSelector, type FloorSelectorResult, type FloorSource, type FloorUrlResult, type FloorValidation, type FloorValidationReason, type OpportunityFloor, applyFloorToVastUrl, fixedFloorSelector, generateFloorLevels, resolveFloorLadderBounds, resolveOpportunityFloor, validateFloorCents, validateFloorLadderConfig };
|