@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.
@@ -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;