@wscsports/blaze-web-sdk 0.1.991 → 0.2.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/package.json +1 -1
- package/publish/index.d.ts +39 -12
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -427,12 +427,13 @@ export * from './database';
|
|
|
427
427
|
interface IAdInfoConfiguration {
|
|
428
428
|
adLocationsIndexes: Array<number>;
|
|
429
429
|
isActive: boolean;
|
|
430
|
+
adsLocationType: 'FixedPages' | 'EveryXStories';
|
|
430
431
|
}
|
|
431
432
|
export interface IAdInfo {
|
|
432
433
|
path?: string;
|
|
433
434
|
tag?: string;
|
|
434
435
|
type: 'Web' | 'IMA';
|
|
435
|
-
configuration
|
|
436
|
+
configuration?: IAdInfoConfiguration;
|
|
436
437
|
}
|
|
437
438
|
|
|
438
439
|
export interface IContent {
|
|
@@ -452,6 +453,7 @@ export interface ICTA {
|
|
|
452
453
|
textColor: string;
|
|
453
454
|
}
|
|
454
455
|
|
|
456
|
+
export * from './ad-info.interface';
|
|
455
457
|
export * from './content.interface';
|
|
456
458
|
export * from './cta.interface';
|
|
457
459
|
export * from './interaction.interface';
|
|
@@ -578,7 +580,8 @@ export declare enum InternalEvent {
|
|
|
578
580
|
NEXT_STORY = "next_story",
|
|
579
581
|
PREV_STORY = "prev_story",
|
|
580
582
|
FULL_SCREEN_CLICK = "full_screen_click",
|
|
581
|
-
AD_ENDED = "ad_ended"
|
|
583
|
+
AD_ENDED = "ad_ended",
|
|
584
|
+
AD_RESUMED = "ad_resumed"
|
|
582
585
|
}
|
|
583
586
|
|
|
584
587
|
export * from './error-codes.enum';
|
|
@@ -811,6 +814,7 @@ export * from './database.interface';
|
|
|
811
814
|
export * from './device.interface';
|
|
812
815
|
export * from './drawable.interface';
|
|
813
816
|
export * from './icons.interface';
|
|
817
|
+
export * from './player.interface';
|
|
814
818
|
export * from './response.interface';
|
|
815
819
|
export * from './service.interface';
|
|
816
820
|
export * from './widget-label-builder.interface';
|
|
@@ -822,6 +826,8 @@ export default interface IntersectionObservable {
|
|
|
822
826
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
823
827
|
}
|
|
824
828
|
|
|
829
|
+
export type ScreenMode = 'Full Screen' | 'Embedded';
|
|
830
|
+
|
|
825
831
|
export interface IResponse<T = any> {
|
|
826
832
|
data: T;
|
|
827
833
|
error?: Error;
|
|
@@ -885,6 +891,7 @@ declare const AdServiceClass_base: {
|
|
|
885
891
|
declare abstract class AdServiceClass extends AdServiceClass_base implements IService {
|
|
886
892
|
canRunAds: boolean;
|
|
887
893
|
init(): Promise<void>;
|
|
894
|
+
pushCustomNativeAdsBetweenStories(defaultAdsInfo: IAdInfo | undefined, widgets: BlazeWidgetStory[], stories: IStory[], index: number, playerLayout: StoryPlayerStyle, showInteraction: boolean, mode?: ScreenMode): void;
|
|
888
895
|
}
|
|
889
896
|
export declare const AdService: AdServiceClass;
|
|
890
897
|
|
|
@@ -1094,6 +1101,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1094
1101
|
assetsExpiryTime: string;
|
|
1095
1102
|
totalItems: number;
|
|
1096
1103
|
result: IStory[];
|
|
1104
|
+
defaultAdsInfo?: IAdInfo | undefined;
|
|
1097
1105
|
};
|
|
1098
1106
|
error?: Error | undefined;
|
|
1099
1107
|
}>;
|
|
@@ -1103,6 +1111,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1103
1111
|
assetsExpiryTime: string;
|
|
1104
1112
|
totalItems: number;
|
|
1105
1113
|
result: IStory[];
|
|
1114
|
+
defaultAdsInfo?: IAdInfo | undefined;
|
|
1106
1115
|
};
|
|
1107
1116
|
error?: Error | undefined;
|
|
1108
1117
|
}>;
|
|
@@ -1247,7 +1256,7 @@ declare abstract class EventServiceClass extends EventServiceClass_base implemen
|
|
|
1247
1256
|
private rootElement;
|
|
1248
1257
|
constructor();
|
|
1249
1258
|
init(): Promise<void>;
|
|
1250
|
-
dispatch(el: HTMLElement, event: Delegation, params?: object): {
|
|
1259
|
+
dispatch(el: HTMLElement | undefined, event: Delegation, params?: object): {
|
|
1251
1260
|
mainEvent: CustomEvent;
|
|
1252
1261
|
};
|
|
1253
1262
|
dispatchAnaltyicsEvent(name: string, event: any): {
|
|
@@ -1364,6 +1373,7 @@ declare abstract class VideoPlayerServiceClass extends VideoPlayerServiceClass_b
|
|
|
1364
1373
|
private _isNavigating;
|
|
1365
1374
|
private _isModalOpen;
|
|
1366
1375
|
private _playReference;
|
|
1376
|
+
muteStateBeforeAd: 'mute' | 'unmute' | 'no-ad';
|
|
1367
1377
|
constructor();
|
|
1368
1378
|
init(): Promise<void>;
|
|
1369
1379
|
get isMuted(): boolean;
|
|
@@ -2089,11 +2099,14 @@ export * from './widget-story-video';
|
|
|
2089
2099
|
export declare class BlazeWidgetStoryAd extends BlazeWidgetStoryBase {
|
|
2090
2100
|
private storyParent;
|
|
2091
2101
|
data: IPage | undefined;
|
|
2092
|
-
private
|
|
2102
|
+
private isCurrentlyDisplay;
|
|
2093
2103
|
private adContainer;
|
|
2094
2104
|
private placeholderContainer;
|
|
2095
2105
|
private googletag;
|
|
2096
2106
|
private failToLoadTimeout?;
|
|
2107
|
+
private onFail?;
|
|
2108
|
+
private isAdFailed;
|
|
2109
|
+
private isPlaying;
|
|
2097
2110
|
constructor(storyParent: BlazeWidgetStory);
|
|
2098
2111
|
connectedCallback(): void;
|
|
2099
2112
|
disconnectedCallback(): void;
|
|
@@ -2106,15 +2119,19 @@ export declare class BlazeWidgetStoryAd extends BlazeWidgetStoryBase {
|
|
|
2106
2119
|
getAdIframeRef(): HTMLIFrameElement | null;
|
|
2107
2120
|
changeAdMutedState(isMuted: boolean): void;
|
|
2108
2121
|
setData(data: IPage): void;
|
|
2122
|
+
startEnter(): Promise<void>;
|
|
2123
|
+
endExit(): void;
|
|
2109
2124
|
play(): void;
|
|
2110
2125
|
get paused(): boolean;
|
|
2111
2126
|
pause(): void;
|
|
2112
2127
|
removeLoader(): void;
|
|
2113
2128
|
loadPoster(): void;
|
|
2114
2129
|
hide(): void;
|
|
2115
|
-
display(onFail?: () => void): void
|
|
2130
|
+
display(onFail?: () => void): Promise<void>;
|
|
2116
2131
|
mainElement(): CanvasImageSource;
|
|
2117
2132
|
private initStyles;
|
|
2133
|
+
isAdContainerConncetedToDOM(): Promise<boolean>;
|
|
2134
|
+
private destroyAd;
|
|
2118
2135
|
}
|
|
2119
2136
|
|
|
2120
2137
|
export declare class BlazeWidgetCtaModal extends BaseWidget {
|
|
@@ -2150,6 +2167,8 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2150
2167
|
modal?: BlazeWidgetStoryModal;
|
|
2151
2168
|
skeleton?: BlazeWidgetItemSkeleton;
|
|
2152
2169
|
shouldReloadData: boolean;
|
|
2170
|
+
defaultAdsInfo?: IAdInfo;
|
|
2171
|
+
isCurrentPlayerFirstPlay: boolean;
|
|
2153
2172
|
bindedOnStoryPlayerDidAppear: (e: Event) => void;
|
|
2154
2173
|
bindedOnStoryPlayerDismissed: (e: Event) => void;
|
|
2155
2174
|
private get theme();
|
|
@@ -2174,7 +2193,7 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2174
2193
|
setMaxItemsSize(size: number): void;
|
|
2175
2194
|
get currentStoryPlayer(): BlazeWidgetStory | undefined;
|
|
2176
2195
|
private loadStories;
|
|
2177
|
-
setCurrentStoryPlayer(
|
|
2196
|
+
setCurrentStoryPlayer(playerIndex: number, pageIndex?: number): void;
|
|
2178
2197
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
2179
2198
|
nextStory(): void;
|
|
2180
2199
|
prevStory(): void;
|
|
@@ -2187,6 +2206,7 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2187
2206
|
pauseCurrentStoryPage(): void;
|
|
2188
2207
|
playCurrentStoryPage(): void;
|
|
2189
2208
|
onCustomNativeAdEnded(): void;
|
|
2209
|
+
onVastAdResumedEnded(): void;
|
|
2190
2210
|
showSkeleton(): void;
|
|
2191
2211
|
hideSkeleton(): void;
|
|
2192
2212
|
private onStoryPlayerDidAppear;
|
|
@@ -2276,6 +2296,7 @@ export declare class BlazeWidgetLabel {
|
|
|
2276
2296
|
export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements Observable, IWidgetView {
|
|
2277
2297
|
modal: BlazeWidgetStoryModal | undefined;
|
|
2278
2298
|
modalMoments: BlazeWidgetMomentModal | undefined;
|
|
2299
|
+
defaultAdsInfo: IAdInfo | undefined;
|
|
2279
2300
|
stories: IStory[];
|
|
2280
2301
|
moments: IMoment[];
|
|
2281
2302
|
skeletonContainer: BlazeDiv | undefined;
|
|
@@ -2618,6 +2639,7 @@ export declare class BlazeWidgetStoryBase extends HTMLElement {
|
|
|
2618
2639
|
shouldShowImaAd?: boolean;
|
|
2619
2640
|
isCurrentlyTryingToRunImaAd?: boolean;
|
|
2620
2641
|
_isAd?: boolean | undefined;
|
|
2642
|
+
adsManager?: any;
|
|
2621
2643
|
constructor();
|
|
2622
2644
|
setData(data: IPage): void;
|
|
2623
2645
|
loadPoster(): void;
|
|
@@ -2643,6 +2665,10 @@ export declare class BlazeWidgetStoryBase extends HTMLElement {
|
|
|
2643
2665
|
connectedCallback(): void;
|
|
2644
2666
|
disconnectedCallback(): void;
|
|
2645
2667
|
render(): void;
|
|
2668
|
+
startEnter(): void;
|
|
2669
|
+
startExit(): void;
|
|
2670
|
+
endEnter(): void;
|
|
2671
|
+
endExit(): void;
|
|
2646
2672
|
}
|
|
2647
2673
|
|
|
2648
2674
|
export declare class BlazeWidgetStoryImage extends BlazeWidgetStoryBase {
|
|
@@ -2686,7 +2712,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
2686
2712
|
constructor(parentWidget: HTMLElement, playerLayout: StoryPlayerStyle);
|
|
2687
2713
|
handleOnStoryChange(mode: StoryDirectionType): void;
|
|
2688
2714
|
setTheme(theme: IWidgetTheme): void;
|
|
2689
|
-
setStories(stories: IStory[], showInteraction?: boolean): void;
|
|
2715
|
+
setStories(stories: IStory[], showInteraction?: boolean, defaultAdsInfo?: IAdInfo): void;
|
|
2690
2716
|
seek(id: string): void;
|
|
2691
2717
|
handleExit(): void;
|
|
2692
2718
|
onKeyDown(ev: KeyboardEvent): void;
|
|
@@ -2735,6 +2761,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
|
|
|
2735
2761
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
2736
2762
|
private setupHammer;
|
|
2737
2763
|
private isTouchOnScreenEdges;
|
|
2764
|
+
private isCurrentlyDisplayingVastAd;
|
|
2738
2765
|
private handlePanStart;
|
|
2739
2766
|
private handlePanMove;
|
|
2740
2767
|
private handlePanEnd;
|
|
@@ -2891,7 +2918,7 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
|
|
|
2891
2918
|
|
|
2892
2919
|
export declare class BlazeWidgetStory extends HTMLElement {
|
|
2893
2920
|
playerStyle: StoryPlayerStyle;
|
|
2894
|
-
mode:
|
|
2921
|
+
mode: ScreenMode;
|
|
2895
2922
|
pages: BlazeWidgetStoryBase[];
|
|
2896
2923
|
data: IStory;
|
|
2897
2924
|
shareModal?: BlazeWidgetShareModal;
|
|
@@ -2946,11 +2973,10 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2946
2973
|
lastPageIndexToResume: number;
|
|
2947
2974
|
elementsToHideOnWebAds: (HTMLElement | undefined)[];
|
|
2948
2975
|
elementsToHideOnImaAds: (HTMLElement | undefined)[];
|
|
2949
|
-
muteStateBeforeAd: 'mute' | 'unmute' | 'no-ad';
|
|
2950
2976
|
longPressHandler?: LongPressHandler;
|
|
2951
2977
|
originalNextPageDesktopClickListener: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null | undefined;
|
|
2952
2978
|
restartStoryOnClickEvent: ((event: MouseEvent) => void) | undefined;
|
|
2953
|
-
constructor(playerStyle: StoryPlayerStyle, mode:
|
|
2979
|
+
constructor(playerStyle: StoryPlayerStyle, mode: ScreenMode);
|
|
2954
2980
|
private isButtonVisible;
|
|
2955
2981
|
private createPlayerButtonsAndAppendToButtonsContainer;
|
|
2956
2982
|
private createNavigationButtonsAndAppendToWidgetStoryContainer;
|
|
@@ -2964,7 +2990,9 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2964
2990
|
setPlayerButtonPosition(state: 'AD' | 'NO_AD'): void;
|
|
2965
2991
|
updatePlayerButtonIcons(): void;
|
|
2966
2992
|
handleCtaAction(event: Event, gestureType: 'Swipe Up' | 'CTA Click'): boolean;
|
|
2967
|
-
playToggle(
|
|
2993
|
+
playToggle(options?: {
|
|
2994
|
+
customIsPlaying?: boolean;
|
|
2995
|
+
}): void;
|
|
2968
2996
|
muteToggle(): boolean;
|
|
2969
2997
|
setWidgetParent(parent: BlazeWidgetItem): void;
|
|
2970
2998
|
resetStoryLocationIndexToLastUnseen(): void;
|
|
@@ -2990,7 +3018,6 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2990
3018
|
updateContainerLayout(): void;
|
|
2991
3019
|
connectedCallback(): void;
|
|
2992
3020
|
onShareModalClose(): void;
|
|
2993
|
-
onCtaModalClick(): void;
|
|
2994
3021
|
onShareModalButtonClick(shareButton: BlazeShareButton): Promise<void>;
|
|
2995
3022
|
onVisibilityChange(): void;
|
|
2996
3023
|
onBlur(): void;
|