@xibosignage/xibo-layout-renderer 1.0.24 → 1.0.26
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/README.md +49 -0
- package/dist/src/Modules/Generators/Generators.d.ts +17 -1
- package/dist/src/Modules/Generators/index.d.ts +1 -1
- package/dist/src/Modules/Layout/Layout.d.ts +1 -0
- package/dist/src/Modules/Media/Media.d.ts +2 -0
- package/dist/src/Modules/Media/VideoMedia.d.ts +5 -1
- package/dist/src/Types/Layout/Layout.types.d.ts +2 -0
- package/dist/src/Types/Media/Media.types.d.ts +2 -1
- package/dist/src/Types/Media/index.d.ts +1 -1
- package/dist/src/Types/XLR/XLR.types.d.ts +2 -0
- package/dist/xibo-layout-renderer.cjs.js +814 -448
- package/dist/xibo-layout-renderer.cjs.js.map +1 -1
- package/dist/xibo-layout-renderer.d.ts +30 -3
- package/dist/xibo-layout-renderer.esm.js +813 -448
- package/dist/xibo-layout-renderer.esm.js.map +1 -1
- package/dist/xibo-layout-renderer.js +814 -448
- package/dist/xibo-layout-renderer.min.js +9 -9
- package/dist/xibo-layout-renderer.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -149,6 +149,7 @@ declare class Layout implements ILayout {
|
|
|
149
149
|
resetLayout(): Promise<void>;
|
|
150
150
|
finishAllRegions(): Promise<void[]>;
|
|
151
151
|
removeLayout(caller?: LayoutPlaybackType): void;
|
|
152
|
+
discardLayout(caller?: LayoutPlaybackType): void;
|
|
152
153
|
getXlf(): string;
|
|
153
154
|
isInterrupt(): boolean;
|
|
154
155
|
on<E extends keyof ILayoutEvents>(event: E, callback: ILayoutEvents[E]): nanoevents.Unsubscribe;
|
|
@@ -196,6 +197,7 @@ type IXlrEvents = {
|
|
|
196
197
|
overlayEnd: (overlay: ILayout) => void;
|
|
197
198
|
commandCodeReceived: (commandCode: string) => void;
|
|
198
199
|
commandStringReceived: (commandString: string) => void;
|
|
200
|
+
navLayout: (layoutCode: string, url: string) => void;
|
|
199
201
|
};
|
|
200
202
|
interface IXlrPlayback {
|
|
201
203
|
currentLayout: ILayout | undefined;
|
|
@@ -221,6 +223,7 @@ interface IXlr {
|
|
|
221
223
|
inputLayouts: InputLayoutType[];
|
|
222
224
|
isInterrupted: boolean;
|
|
223
225
|
isLayoutInDOM(containerName: string, layoutId: number): boolean;
|
|
226
|
+
cleanupOrphanedLayouts(keepCurrent?: ILayout | null, keepNext?: ILayout | null): void;
|
|
224
227
|
isSspEnabled: boolean;
|
|
225
228
|
isUpdatingLoop: boolean;
|
|
226
229
|
isUpdatingOverlays: boolean;
|
|
@@ -256,9 +259,13 @@ declare const vjsDefaultOptions: (opts?: any) => any;
|
|
|
256
259
|
interface IVideoMediaHandler {
|
|
257
260
|
player: Player | undefined;
|
|
258
261
|
duration: number;
|
|
262
|
+
init(): void;
|
|
263
|
+
play(): void;
|
|
259
264
|
stop(disposeOnly?: boolean): void;
|
|
260
265
|
}
|
|
266
|
+
declare const reportToPlayerPlatform: ConsumerPlatform[];
|
|
261
267
|
declare function VideoMedia(media: IMedia, xlr: IXlr): {
|
|
268
|
+
player: Player | undefined;
|
|
262
269
|
duration: number;
|
|
263
270
|
init: () => void;
|
|
264
271
|
stop: (disposeOnly?: boolean) => void;
|
|
@@ -276,6 +283,7 @@ declare class Media implements IMedia {
|
|
|
276
283
|
enableStat: boolean;
|
|
277
284
|
fileId: string;
|
|
278
285
|
finished: boolean;
|
|
286
|
+
fromDt: string;
|
|
279
287
|
html: HTMLElement | null;
|
|
280
288
|
id: string;
|
|
281
289
|
idCounter: number;
|
|
@@ -299,6 +307,7 @@ declare class Media implements IMedia {
|
|
|
299
307
|
state: MediaState;
|
|
300
308
|
tempSrc: string;
|
|
301
309
|
timeoutId: ReturnType<typeof setTimeout>;
|
|
310
|
+
toDt: string;
|
|
302
311
|
type: string;
|
|
303
312
|
uri: string;
|
|
304
313
|
url: string | null;
|
|
@@ -347,6 +356,7 @@ interface IMedia {
|
|
|
347
356
|
enableStat: boolean;
|
|
348
357
|
fileId: string;
|
|
349
358
|
finished: boolean;
|
|
359
|
+
fromDt: string;
|
|
350
360
|
html: HTMLElement | null;
|
|
351
361
|
id: string;
|
|
352
362
|
idCounter: number;
|
|
@@ -372,6 +382,7 @@ interface IMedia {
|
|
|
372
382
|
stop(): Promise<void>;
|
|
373
383
|
tempSrc: string;
|
|
374
384
|
timeoutId: ReturnType<typeof setTimeout>;
|
|
385
|
+
toDt: string;
|
|
375
386
|
type: string;
|
|
376
387
|
uri: string;
|
|
377
388
|
url: string | null;
|
|
@@ -380,7 +391,6 @@ interface IMedia {
|
|
|
380
391
|
videoHandler?: IVideoMediaHandler;
|
|
381
392
|
mediaTimer: ReturnType<typeof setInterval> | undefined;
|
|
382
393
|
}
|
|
383
|
-
declare const initialMedia: IMedia;
|
|
384
394
|
|
|
385
395
|
interface IRegion {
|
|
386
396
|
complete: boolean;
|
|
@@ -454,6 +464,7 @@ type InputLayoutType = {
|
|
|
454
464
|
getXlf?(): string;
|
|
455
465
|
duration?: number;
|
|
456
466
|
isOverlay?: boolean;
|
|
467
|
+
shareOfVoice?: number;
|
|
457
468
|
};
|
|
458
469
|
type OptionsType = {
|
|
459
470
|
xlfUrl: string;
|
|
@@ -528,6 +539,7 @@ interface ILayout {
|
|
|
528
539
|
finishAllRegions(): Promise<void[]>;
|
|
529
540
|
inLoop: boolean;
|
|
530
541
|
removeLayout(caller?: LayoutPlaybackType): void;
|
|
542
|
+
discardLayout(caller?: LayoutPlaybackType): void;
|
|
531
543
|
xlfString: string;
|
|
532
544
|
getXlf(): string;
|
|
533
545
|
ad: any;
|
|
@@ -590,6 +602,17 @@ declare function getAllAttributes(elem: Element): {
|
|
|
590
602
|
* @returns JSON string format of date
|
|
591
603
|
*/
|
|
592
604
|
declare function setExpiry(numDays: number): string;
|
|
605
|
+
/**
|
|
606
|
+
* Check whether a media item is currently within its valid date window.
|
|
607
|
+
* Returns true when the media should be shown, false when it should be skipped.
|
|
608
|
+
*
|
|
609
|
+
* Rules:
|
|
610
|
+
* - Empty / invalid fromDt → treat as "no start restriction"
|
|
611
|
+
* - Empty / invalid toDt → treat as "no expiry"
|
|
612
|
+
* - now < fromDt → not yet active → skip
|
|
613
|
+
* - now > toDt → expired → skip
|
|
614
|
+
*/
|
|
615
|
+
declare function isMediaActive(fromDt: string, toDt: string): boolean;
|
|
593
616
|
/**
|
|
594
617
|
* Check if given layout exists in the loop using layoutId
|
|
595
618
|
* @param layouts Schedule loop unique layouts (uniqueLayouts)
|
|
@@ -606,7 +629,11 @@ declare function prepareVideoMedia(media: IMedia, region: IRegion): void;
|
|
|
606
629
|
declare function prepareImageMedia(media: IMedia, region: IRegion): void;
|
|
607
630
|
declare function prepareAudioMedia(media: IMedia, region: IRegion): void;
|
|
608
631
|
declare function prepareHtmlMedia(media: IMedia, region: IRegion): void;
|
|
609
|
-
declare
|
|
632
|
+
declare enum FaultCodes {
|
|
633
|
+
FaultVideoSource = 2001,
|
|
634
|
+
FaultVideoUnexpected = 2099
|
|
635
|
+
}
|
|
636
|
+
declare function playerReportFault(msg: string, media: IMedia, code?: number): Promise<void>;
|
|
610
637
|
|
|
611
638
|
declare class Region implements IRegion {
|
|
612
639
|
layout: ILayout;
|
|
@@ -759,4 +786,4 @@ type flyTransitionParams = {
|
|
|
759
786
|
};
|
|
760
787
|
declare const flyTransitionKeyframes: (params: flyTransitionParams) => KeyframeOptionsType;
|
|
761
788
|
|
|
762
|
-
export { Action, ActionsWrapper, AudioMedia, ConsumerPlatform, ELayoutState, ELayoutType, type EventEmitter, type EventUnsubscriber, type GetLayoutParamType, type GetLayoutType, type ILayout, type ILayoutEvents, type IMedia, type IMediaEvents, type IRegion, type IRegionEvents, type ISplashScreen, type IVideoMediaHandler, type IXlr, type IXlrEvents, type IXlrPlayback, type InactOptions, type InputLayoutType, type KeyframeOptionsType, LayoutPlaybackType, Media, MediaState, type MediaTypes, type OptionsType, type PrepareLayoutsType, type PreviewSplashElement, Region, type TransitionElementOptions, type TransitionNameType, VideoMedia, audioFileType, capitalizeStr, type compassPoints, composeBgUrlByPlatform, composeMediaUrl, composeResourceUrl, composeResourceUrlByPlatform, composeVideoSource, createMediaElement, XiboLayoutRenderer as default, defaultTrans, defaultVjsOpts, fadeInElem, fadeOutElem, fetchJSON, fetchText, flyInElem, flyOutElem, flyTransitionKeyframes, type flyTransitionParams, getAllAttributes, getDataBlob, getFileExt, getIndexByLayoutId, getLayout, getLayoutIndexByLayoutId, getMediaId, getXlf, hasDefaultOnly, hasSspLayout, initRenderingDOM, initialLayout,
|
|
789
|
+
export { Action, ActionsWrapper, AudioMedia, ConsumerPlatform, ELayoutState, ELayoutType, type EventEmitter, type EventUnsubscriber, FaultCodes, type GetLayoutParamType, type GetLayoutType, type ILayout, type ILayoutEvents, type IMedia, type IMediaEvents, type IRegion, type IRegionEvents, type ISplashScreen, type IVideoMediaHandler, type IXlr, type IXlrEvents, type IXlrPlayback, type InactOptions, type InputLayoutType, type KeyframeOptionsType, LayoutPlaybackType, Media, MediaState, type MediaTypes, type OptionsType, type PrepareLayoutsType, type PreviewSplashElement, Region, type TransitionElementOptions, type TransitionNameType, VideoMedia, audioFileType, capitalizeStr, type compassPoints, composeBgUrlByPlatform, composeMediaUrl, composeResourceUrl, composeResourceUrlByPlatform, composeVideoSource, createMediaElement, XiboLayoutRenderer as default, defaultTrans, defaultVjsOpts, fadeInElem, fadeOutElem, fetchJSON, fetchText, flyInElem, flyOutElem, flyTransitionKeyframes, type flyTransitionParams, getAllAttributes, getDataBlob, getFileExt, getIndexByLayoutId, getLayout, getLayoutIndexByLayoutId, getMediaId, getXlf, hasDefaultOnly, hasSspLayout, initRenderingDOM, initialLayout, initialRegion, initialXlr, isEmpty, isLayoutValid, isMediaActive, nextId, playerReportFault, preloadMediaBlob, prepareAudioMedia, prepareHtmlMedia, prepareImageMedia, prepareVideoMedia, reportToPlayerPlatform, setExpiry, transitionElement, videoFileType, vjsDefaultOptions };
|