@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
|
@@ -24,15 +24,17 @@ export default class ActionController {
|
|
|
24
24
|
constructor(parent: ILayout, actions: Action[], options: InactOptions);
|
|
25
25
|
init(): void;
|
|
26
26
|
openLayoutInNewTab(layoutCode: string, options: InactOptions): void;
|
|
27
|
-
openLayoutInPlayer(layoutCode: string,
|
|
27
|
+
openLayoutInPlayer(layoutCode: string, _options: InactOptions): void;
|
|
28
28
|
prevOrNextLayout(targetId: string, actionType: string): void;
|
|
29
29
|
/** Change media in region (next/previous) */
|
|
30
|
-
|
|
30
|
+
gotoMediaInRegion(regionId: string, actionType: string): void;
|
|
31
31
|
loadMediaInRegion(regionId: string, widgetId: string): void;
|
|
32
32
|
/** Run action based on action data */
|
|
33
33
|
runAction(actionData: {
|
|
34
34
|
[k: string]: any;
|
|
35
35
|
}, options: InactOptions): void;
|
|
36
36
|
initTouchActions(): void;
|
|
37
|
+
/** Dispatch an incoming webhook trigger to any matching actions on this layout. */
|
|
38
|
+
handleWebhookTrigger(triggerCode: string, widgetId?: string): void;
|
|
37
39
|
initKeyboardActions(): void;
|
|
38
40
|
}
|
|
@@ -50,6 +50,9 @@ export declare class Media implements IMedia {
|
|
|
50
50
|
xml: Element | null;
|
|
51
51
|
videoHandler?: IVideoMediaHandler;
|
|
52
52
|
mediaTimer: ReturnType<typeof setInterval> | undefined;
|
|
53
|
+
sspImpressionUrls: string[] | undefined;
|
|
54
|
+
sspErrorUrls: string[] | undefined;
|
|
55
|
+
private isSspWidget;
|
|
53
56
|
private mediaTimeCount;
|
|
54
57
|
private xlr;
|
|
55
58
|
private readonly statsBC;
|
|
@@ -59,6 +62,7 @@ export declare class Media implements IMedia {
|
|
|
59
62
|
private on;
|
|
60
63
|
private init;
|
|
61
64
|
run(): void;
|
|
65
|
+
setSspAdUrl(url: string, adMediaType: 'image' | 'video', impressionUrls?: string[], errorUrls?: string[]): void;
|
|
62
66
|
stop(): Promise<void>;
|
|
63
67
|
/**
|
|
64
68
|
* Emits a command from the shell command widget.
|
|
@@ -42,6 +42,9 @@ export interface IMedia {
|
|
|
42
42
|
region: IRegion;
|
|
43
43
|
render: string;
|
|
44
44
|
run(): void;
|
|
45
|
+
setSspAdUrl(url: string, adMediaType: 'image' | 'video', impressionUrls?: string[], errorUrls?: string[]): void;
|
|
46
|
+
sspImpressionUrls: string[] | undefined;
|
|
47
|
+
sspErrorUrls: string[] | undefined;
|
|
45
48
|
schemaVersion: string;
|
|
46
49
|
singlePlay: boolean;
|
|
47
50
|
state: MediaState;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Emitter, Unsubscribe } from 'nanoevents';
|
|
2
2
|
import { ILayout, InputLayoutType, OptionsType } from '../Layout';
|
|
3
|
+
import { IMedia } from '../Media';
|
|
3
4
|
import { OverlayLayoutManager } from "../../Modules/Layout/OverlayLayoutManager";
|
|
4
5
|
export type PrepareLayoutsType = {
|
|
5
6
|
moveNext?: boolean;
|
|
@@ -17,6 +18,8 @@ export type IXlrEvents = {
|
|
|
17
18
|
widgetEnd: (widgetId: number) => void;
|
|
18
19
|
widgetError: (widgetId: number) => void;
|
|
19
20
|
adRequest: (sspLayoutIndex: number) => void;
|
|
21
|
+
sspWidgetRequest: (media: IMedia) => void;
|
|
22
|
+
sspWidgetEnd: (impressionUrls: string[], errorUrls: string[], duration: number) => void;
|
|
20
23
|
updateLoop: (inputLayouts: InputLayoutType[]) => void;
|
|
21
24
|
updateOverlays: (overlays: InputLayoutType[]) => void;
|
|
22
25
|
overlayStart: (overlay: ILayout) => void;
|
|
@@ -45,6 +48,23 @@ export interface IXlr {
|
|
|
45
48
|
getLayoutById(layoutId: number, layoutIndex?: number): ILayout | undefined;
|
|
46
49
|
gotoNextLayout(): void;
|
|
47
50
|
gotoPrevLayout(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Navigate directly to a layout identified by its CMS code string.
|
|
53
|
+
* Searches parsed layouts first, then fetches unparsed XLF files via appHost.
|
|
54
|
+
* No-ops silently if the code is not found in the current loop.
|
|
55
|
+
*/
|
|
56
|
+
gotoLayoutByCode(layoutCode: string): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Play the given layout once as an interrupt, then resume the current loop.
|
|
59
|
+
* Used by non-CMS platforms for Navigate to Layout interactive actions.
|
|
60
|
+
* The interrupt is not part of inputLayouts and is spliced in temporarily.
|
|
61
|
+
*/
|
|
62
|
+
playInterruptLayout(inputLayout: InputLayoutType): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Dispatch an incoming webhook trigger code to the current layout's
|
|
65
|
+
* action controller. Pass an optional widgetId to narrow the match.
|
|
66
|
+
*/
|
|
67
|
+
triggerAction(triggerCode: string, widgetId?: string): void;
|
|
48
68
|
init(): Promise<IXlr>;
|
|
49
69
|
inputLayouts: InputLayoutType[];
|
|
50
70
|
isInterrupted: boolean;
|
|
@@ -65,7 +85,7 @@ export interface IXlr {
|
|
|
65
85
|
prepareLayoutXlf(inputLayout: ILayout | undefined): Promise<ILayout>;
|
|
66
86
|
prepareLayouts(): Promise<IXlr>;
|
|
67
87
|
renderOverlayLayouts(): Promise<void>;
|
|
68
|
-
uniqueLayouts:
|
|
88
|
+
uniqueLayouts: Map<string, InputLayoutType>;
|
|
69
89
|
updateInputLayout(layoutIndex: number, layout: InputLayoutType): void;
|
|
70
90
|
updateLayouts(inputLayouts: InputLayoutType[]): void;
|
|
71
91
|
updateLoop(inputLayouts: InputLayoutType[]): Promise<void>;
|