@xibosignage/xibo-layout-renderer 1.0.26 → 1.0.28
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/src/Modules/ActionController/ActionController.d.ts +4 -2
- package/dist/src/Modules/Media/Media.d.ts +4 -0
- package/dist/src/Types/Layout/Layout.types.d.ts +1 -0
- package/dist/src/Types/Media/Media.types.d.ts +3 -0
- package/dist/src/Types/Region/Region.types.d.ts +1 -0
- package/dist/src/Types/XLR/XLR.types.d.ts +21 -1
- package/dist/xibo-layout-renderer.cjs.js +798 -220
- package/dist/xibo-layout-renderer.cjs.js.map +1 -1
- package/dist/xibo-layout-renderer.d.ts +33 -3
- package/dist/xibo-layout-renderer.esm.js +798 -220
- package/dist/xibo-layout-renderer.esm.js.map +1 -1
- package/dist/xibo-layout-renderer.js +798 -220
- package/dist/xibo-layout-renderer.min.js +8 -8
- package/dist/xibo-layout-renderer.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -75,16 +75,18 @@ declare class ActionController {
|
|
|
75
75
|
constructor(parent: ILayout, actions: Action[], options: InactOptions);
|
|
76
76
|
init(): void;
|
|
77
77
|
openLayoutInNewTab(layoutCode: string, options: InactOptions): void;
|
|
78
|
-
openLayoutInPlayer(layoutCode: string,
|
|
78
|
+
openLayoutInPlayer(layoutCode: string, _options: InactOptions): void;
|
|
79
79
|
prevOrNextLayout(targetId: string, actionType: string): void;
|
|
80
80
|
/** Change media in region (next/previous) */
|
|
81
|
-
|
|
81
|
+
gotoMediaInRegion(regionId: string, actionType: string): void;
|
|
82
82
|
loadMediaInRegion(regionId: string, widgetId: string): void;
|
|
83
83
|
/** Run action based on action data */
|
|
84
84
|
runAction(actionData: {
|
|
85
85
|
[k: string]: any;
|
|
86
86
|
}, options: InactOptions): void;
|
|
87
87
|
initTouchActions(): void;
|
|
88
|
+
/** Dispatch an incoming webhook trigger to any matching actions on this layout. */
|
|
89
|
+
handleWebhookTrigger(triggerCode: string, widgetId?: string): void;
|
|
88
90
|
initKeyboardActions(): void;
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -191,6 +193,8 @@ type IXlrEvents = {
|
|
|
191
193
|
widgetEnd: (widgetId: number) => void;
|
|
192
194
|
widgetError: (widgetId: number) => void;
|
|
193
195
|
adRequest: (sspLayoutIndex: number) => void;
|
|
196
|
+
sspWidgetRequest: (media: IMedia) => void;
|
|
197
|
+
sspWidgetEnd: (impressionUrls: string[], errorUrls: string[], duration: number) => void;
|
|
194
198
|
updateLoop: (inputLayouts: InputLayoutType[]) => void;
|
|
195
199
|
updateOverlays: (overlays: InputLayoutType[]) => void;
|
|
196
200
|
overlayStart: (overlay: ILayout) => void;
|
|
@@ -219,6 +223,23 @@ interface IXlr {
|
|
|
219
223
|
getLayoutById(layoutId: number, layoutIndex?: number): ILayout | undefined;
|
|
220
224
|
gotoNextLayout(): void;
|
|
221
225
|
gotoPrevLayout(): void;
|
|
226
|
+
/**
|
|
227
|
+
* Navigate directly to a layout identified by its CMS code string.
|
|
228
|
+
* Searches parsed layouts first, then fetches unparsed XLF files via appHost.
|
|
229
|
+
* No-ops silently if the code is not found in the current loop.
|
|
230
|
+
*/
|
|
231
|
+
gotoLayoutByCode(layoutCode: string): Promise<void>;
|
|
232
|
+
/**
|
|
233
|
+
* Play the given layout once as an interrupt, then resume the current loop.
|
|
234
|
+
* Used by non-CMS platforms for Navigate to Layout interactive actions.
|
|
235
|
+
* The interrupt is not part of inputLayouts and is spliced in temporarily.
|
|
236
|
+
*/
|
|
237
|
+
playInterruptLayout(inputLayout: InputLayoutType): Promise<void>;
|
|
238
|
+
/**
|
|
239
|
+
* Dispatch an incoming webhook trigger code to the current layout's
|
|
240
|
+
* action controller. Pass an optional widgetId to narrow the match.
|
|
241
|
+
*/
|
|
242
|
+
triggerAction(triggerCode: string, widgetId?: string): void;
|
|
222
243
|
init(): Promise<IXlr>;
|
|
223
244
|
inputLayouts: InputLayoutType[];
|
|
224
245
|
isInterrupted: boolean;
|
|
@@ -239,7 +260,7 @@ interface IXlr {
|
|
|
239
260
|
prepareLayoutXlf(inputLayout: ILayout | undefined): Promise<ILayout>;
|
|
240
261
|
prepareLayouts(): Promise<IXlr>;
|
|
241
262
|
renderOverlayLayouts(): Promise<void>;
|
|
242
|
-
uniqueLayouts:
|
|
263
|
+
uniqueLayouts: Map<string, InputLayoutType>;
|
|
243
264
|
updateInputLayout(layoutIndex: number, layout: InputLayoutType): void;
|
|
244
265
|
updateLayouts(inputLayouts: InputLayoutType[]): void;
|
|
245
266
|
updateLoop(inputLayouts: InputLayoutType[]): Promise<void>;
|
|
@@ -315,6 +336,9 @@ declare class Media implements IMedia {
|
|
|
315
336
|
xml: Element | null;
|
|
316
337
|
videoHandler?: IVideoMediaHandler;
|
|
317
338
|
mediaTimer: ReturnType<typeof setInterval> | undefined;
|
|
339
|
+
sspImpressionUrls: string[] | undefined;
|
|
340
|
+
sspErrorUrls: string[] | undefined;
|
|
341
|
+
private isSspWidget;
|
|
318
342
|
private mediaTimeCount;
|
|
319
343
|
private xlr;
|
|
320
344
|
private readonly statsBC;
|
|
@@ -324,6 +348,7 @@ declare class Media implements IMedia {
|
|
|
324
348
|
private on;
|
|
325
349
|
private init;
|
|
326
350
|
run(): void;
|
|
351
|
+
setSspAdUrl(url: string, adMediaType: 'image' | 'video', impressionUrls?: string[], errorUrls?: string[]): void;
|
|
327
352
|
stop(): Promise<void>;
|
|
328
353
|
/**
|
|
329
354
|
* Emits a command from the shell command widget.
|
|
@@ -376,6 +401,9 @@ interface IMedia {
|
|
|
376
401
|
region: IRegion;
|
|
377
402
|
render: string;
|
|
378
403
|
run(): void;
|
|
404
|
+
setSspAdUrl(url: string, adMediaType: 'image' | 'video', impressionUrls?: string[], errorUrls?: string[]): void;
|
|
405
|
+
sspImpressionUrls: string[] | undefined;
|
|
406
|
+
sspErrorUrls: string[] | undefined;
|
|
379
407
|
schemaVersion: string;
|
|
380
408
|
singlePlay: boolean;
|
|
381
409
|
state: MediaState;
|
|
@@ -424,6 +452,7 @@ interface IRegion {
|
|
|
424
452
|
};
|
|
425
453
|
playNextMedia(): void;
|
|
426
454
|
playPreviousMedia(): void;
|
|
455
|
+
prepareMedia(media: IMedia): void;
|
|
427
456
|
prepareMediaObjects(): void;
|
|
428
457
|
prepareRegion(): void;
|
|
429
458
|
ready: boolean;
|
|
@@ -465,6 +494,7 @@ type InputLayoutType = {
|
|
|
465
494
|
duration?: number;
|
|
466
495
|
isOverlay?: boolean;
|
|
467
496
|
shareOfVoice?: number;
|
|
497
|
+
code?: string;
|
|
468
498
|
};
|
|
469
499
|
type OptionsType = {
|
|
470
500
|
xlfUrl: string;
|