@raydiant/playlist-window-manager 0.29.2 → 0.30.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/build/IFrameRenderer.d.ts +1 -0
- package/build/IFrameRenderer.js +14 -0
- package/build/IFrameRenderer.test.d.ts +1 -0
- package/build/IFrameRenderer.test.js +70 -0
- package/build/PlaylistWindowManager.d.ts +7 -0
- package/build/PlaylistWindowManager.js +150 -39
- package/build/PlaylistWindowManager.test.d.ts +1 -0
- package/build/PlaylistWindowManager.test.js +1763 -0
- package/build/PresentationWindow.d.ts +31 -1
- package/build/PresentationWindow.js +538 -30
- package/build/PresentationWindow.test.js +323 -0
- package/build/SurfaceBroker.d.ts +30 -0
- package/build/SurfaceBroker.js +311 -0
- package/build/SurfaceBroker.test.d.ts +1 -0
- package/build/SurfaceBroker.test.js +432 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/surfaces.d.ts +52 -0
- package/build/surfaces.js +15 -0
- package/build/testUtils.d.ts +56 -0
- package/build/testUtils.js +327 -5
- package/build/types.d.ts +1 -0
- package/package.json +2 -1
- package/src/IFrameRenderer.test.ts +88 -0
- package/src/IFrameRenderer.ts +21 -0
- package/src/PlaylistWindowManager.test.ts +1466 -0
- package/src/PlaylistWindowManager.ts +134 -7
- package/src/PresentationWindow.test.ts +247 -0
- package/src/PresentationWindow.ts +644 -3
- package/src/SurfaceBroker.test.ts +278 -0
- package/src/SurfaceBroker.ts +281 -0
- package/src/__snapshots__/PlaylistWindowManager.test.ts.snap +26 -0
- package/src/index.ts +1 -0
- package/src/surfaces.ts +82 -0
- package/src/testUtils.ts +335 -1
- package/src/types.ts +5 -0
|
@@ -2,6 +2,7 @@ import * as RE from '@raydiant/playlist-rule-engine';
|
|
|
2
2
|
import PlaylistWindowManagerState from './PlaylistWindowManagerState';
|
|
3
3
|
import PlaylistWindowManager from './PlaylistWindowManager';
|
|
4
4
|
import { Presentation, ApplicationVersion, Theme, Device, PresentationWindowRenderer, WindowBounds, Logger, BuilderState, WorkerState, AnalyticsEvent, Charge, ChargeRequest, ChargeResponse, Terminal } from './types';
|
|
5
|
+
import SurfaceBroker from './SurfaceBroker';
|
|
5
6
|
export interface PresentationWindowOptions {
|
|
6
7
|
windowManager?: PlaylistWindowManager;
|
|
7
8
|
windowId: string;
|
|
@@ -34,6 +35,8 @@ export interface PresentationWindowOptions {
|
|
|
34
35
|
}) => void;
|
|
35
36
|
getTerminal?: () => Terminal | null;
|
|
36
37
|
getOnlineStatus?: () => boolean;
|
|
38
|
+
surfaceBroker?: SurfaceBroker;
|
|
39
|
+
surfaceShowDeadlineMs?: number;
|
|
37
40
|
}
|
|
38
41
|
export default class PresentationWindow {
|
|
39
42
|
private options;
|
|
@@ -73,9 +76,19 @@ export default class PresentationWindow {
|
|
|
73
76
|
private createObjectURLTimeouts;
|
|
74
77
|
private interruptLocks;
|
|
75
78
|
private previouslyLocked;
|
|
79
|
+
private surface;
|
|
80
|
+
private surfaceWithdrawn;
|
|
81
|
+
private surfaceShow;
|
|
82
|
+
private wakeSurfaceShow;
|
|
83
|
+
private holeOpenWaiter;
|
|
84
|
+
private playingWaiter;
|
|
85
|
+
private isPlayHeld;
|
|
86
|
+
private isRemoved;
|
|
87
|
+
private frameBackground;
|
|
76
88
|
constructor(options: PresentationWindowOptions);
|
|
77
89
|
load(): Promise<void>;
|
|
78
|
-
show(isFocused?: boolean): void
|
|
90
|
+
show(isFocused?: boolean, onReveal?: () => void, showAfterRevealMs?: number): Promise<void>;
|
|
91
|
+
private showFrame;
|
|
79
92
|
hide(): void;
|
|
80
93
|
remove(): Promise<void>;
|
|
81
94
|
reinitializePresentationWindowRuleEngineState(newRulesDataStoreObj: RE.RulesDataStore): void;
|
|
@@ -86,6 +99,9 @@ export default class PresentationWindow {
|
|
|
86
99
|
waitForFirstPaint(timeoutMs: number): Promise<void>;
|
|
87
100
|
detachCallbacks(): void;
|
|
88
101
|
mute(): void;
|
|
102
|
+
wasRemoved(): boolean;
|
|
103
|
+
holdsSurface(): boolean;
|
|
104
|
+
muteSurfaceOrFrame(): void;
|
|
89
105
|
private resolveFirstPaintWaiters;
|
|
90
106
|
onComplete(callback: (() => void) | null): void;
|
|
91
107
|
onError(callback: ((err: Error) => void) | null): void;
|
|
@@ -130,6 +146,20 @@ export default class PresentationWindow {
|
|
|
130
146
|
private getEmbeddedAppUrl;
|
|
131
147
|
private handleEmbeddedMessage;
|
|
132
148
|
private handleLegacyMessage;
|
|
149
|
+
private handleOpenVideo;
|
|
150
|
+
private handleVideoBounds;
|
|
151
|
+
private handleSurfaceEvent;
|
|
152
|
+
private isSurfaceReady;
|
|
153
|
+
private isOfferedVideoUrl;
|
|
154
|
+
private showSurface;
|
|
155
|
+
private showSurfaceAfterReveal;
|
|
156
|
+
private revealOverHole;
|
|
157
|
+
private withdrawSurface;
|
|
158
|
+
private dropSurface;
|
|
159
|
+
private wakeSurfaceShowWaiters;
|
|
160
|
+
private releaseHeldPlay;
|
|
161
|
+
private refuseVideo;
|
|
162
|
+
private sendVideoMessage;
|
|
133
163
|
private handleReady;
|
|
134
164
|
private handleComplete;
|
|
135
165
|
private handleError;
|