@wscsports/blaze-web-sdk 0.3.17 → 0.3.19
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 +6 -4
- package/publish/index.d.ts +1274 -127
- package/publish/index.js +1 -1
package/publish/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
type PlayContentOptions = {
|
|
2
|
+
dataSource: BlazeDataSourceType;
|
|
3
|
+
actionHandlers?: ActionHandler[];
|
|
4
|
+
style?: StoryPlayerStyle | VideoPlayerStyle;
|
|
5
|
+
};
|
|
1
6
|
export declare function setDoNotTrack(value: boolean): void;
|
|
2
7
|
export declare function setGeoLocation(value: string): void;
|
|
3
8
|
export declare function setExternalUserId(value: string): Promise<void>;
|
|
@@ -7,6 +12,7 @@ export declare function WidgetGridView(containerId: string, options: IWidgetView
|
|
|
7
12
|
export declare function WidgetEmbeddedStory(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
8
13
|
export declare function Theme(theme: ThemeType, contentType: 'moment'): IWidgetTheme<MomentPlayerStyle>;
|
|
9
14
|
export declare function Theme(theme: ThemeType, contentType: 'story'): IWidgetTheme<StoryPlayerStyle>;
|
|
15
|
+
export declare function Theme(theme: ThemeType, contentType: 'video'): IWidgetTheme<VideoPlayerStyle>;
|
|
10
16
|
export declare function Theme(theme: ThemeType): IWidgetTheme<StoryPlayerStyle>;
|
|
11
17
|
export declare function addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
12
18
|
export declare const Delegations: typeof Delegation;
|
|
@@ -16,8 +22,9 @@ export declare function pauseCurrentPlayer(): void;
|
|
|
16
22
|
export declare function resumeCurrentPlayer(): void;
|
|
17
23
|
export declare function setGoogleCustomNativeAdsHandler(handler: CustomNativeAdHandler): void;
|
|
18
24
|
export declare function setImaHandler(handler: ImaAdHandler): void;
|
|
19
|
-
export declare function playStory(storyId: string, style?: StoryPlayerStyle): Promise<void>;
|
|
20
|
-
export declare function playStories(dataSource: BlazeDataSourceType, style?: StoryPlayerStyle): Promise<void>;
|
|
25
|
+
export declare function playStory(storyId: string, style?: StoryPlayerStyle, actionHandlers?: ActionHandler[]): Promise<void>;
|
|
26
|
+
export declare function playStories(dataSource: BlazeDataSourceType, style?: StoryPlayerStyle, actionHandlers?: ActionHandler[]): Promise<void>;
|
|
27
|
+
export declare function playContent(contentType: ContentType, options: PlayContentOptions): Promise<void>;
|
|
21
28
|
export declare function setAbTestParams(abTestParams: BlazeAbTestType): void;
|
|
22
29
|
declare const _default: {
|
|
23
30
|
Initialize: typeof Initialize;
|
|
@@ -38,6 +45,7 @@ declare const _default: {
|
|
|
38
45
|
setExternalUserId: typeof setExternalUserId;
|
|
39
46
|
playStory: typeof playStory;
|
|
40
47
|
playStories: typeof playStories;
|
|
48
|
+
playContent: typeof playContent;
|
|
41
49
|
setAbTestParams: typeof setAbTestParams;
|
|
42
50
|
};
|
|
43
51
|
export default _default;
|
|
@@ -47,7 +55,7 @@ export interface IAPIOptions {
|
|
|
47
55
|
analyticsBaseUrl: string | undefined;
|
|
48
56
|
}
|
|
49
57
|
export interface IRequestOptions {
|
|
50
|
-
init?: Pick<RequestInit, 'method' | 'body' | 'headers' | 'credentials'>;
|
|
58
|
+
init?: Pick<RequestInit, 'method' | 'body' | 'headers' | 'credentials' | 'keepalive'>;
|
|
51
59
|
baseUrl?: string;
|
|
52
60
|
urlSearchParams?: {};
|
|
53
61
|
auth?: boolean;
|
|
@@ -68,6 +76,7 @@ export declare enum Category {
|
|
|
68
76
|
Story = "story",
|
|
69
77
|
Moment = "moment",
|
|
70
78
|
Widget = "widget",
|
|
79
|
+
Video = "video",
|
|
71
80
|
Ad = "ad",
|
|
72
81
|
Interaction = "interaction"
|
|
73
82
|
}
|
|
@@ -156,6 +165,7 @@ export declare class AnalyticsEvent {
|
|
|
156
165
|
story: Partial<StoryEvent> | undefined;
|
|
157
166
|
moment: Partial<MomentEvent> | undefined;
|
|
158
167
|
widget: Partial<WidgetEvent> | undefined;
|
|
168
|
+
video: Partial<VideoEvent> | undefined;
|
|
159
169
|
ad: Partial<AdEvent> | undefined;
|
|
160
170
|
interaction: Partial<InteractionEvent> | undefined;
|
|
161
171
|
}
|
|
@@ -187,6 +197,7 @@ export declare class StoryEvent {
|
|
|
187
197
|
'player_orientation': ContentAspectRatio;
|
|
188
198
|
'cc_state': string;
|
|
189
199
|
'content_extra_info': string;
|
|
200
|
+
'custom_action_button_name': string;
|
|
190
201
|
}
|
|
191
202
|
export declare class MomentEvent {
|
|
192
203
|
'moments_session_id': string;
|
|
@@ -200,11 +211,12 @@ export declare class MomentEvent {
|
|
|
200
211
|
'moment_duration': number;
|
|
201
212
|
'moment_duration_viewed_percent': number;
|
|
202
213
|
'playback_action_method': string;
|
|
203
|
-
'audio_state':
|
|
214
|
+
'audio_state': 'Mute' | 'Unmute';
|
|
204
215
|
'loop_number': string;
|
|
205
216
|
'gesture_type': MomentGestureType;
|
|
206
217
|
'cc_state': string;
|
|
207
218
|
'content_extra_info': string;
|
|
219
|
+
'custom_action_button_name': string;
|
|
208
220
|
}
|
|
209
221
|
export declare class WidgetEvent {
|
|
210
222
|
'page_view_id': string;
|
|
@@ -229,6 +241,28 @@ export declare class WidgetEvent {
|
|
|
229
241
|
'page_type': string;
|
|
230
242
|
'page_size': string;
|
|
231
243
|
}
|
|
244
|
+
export declare class VideoEvent {
|
|
245
|
+
'video_session_id': string;
|
|
246
|
+
'video_id': string;
|
|
247
|
+
'video_title': string;
|
|
248
|
+
'video_duration': number;
|
|
249
|
+
'video_start_trigger': string;
|
|
250
|
+
'video_time_start': number;
|
|
251
|
+
'video_time_end': number;
|
|
252
|
+
'video_end_trigger': string;
|
|
253
|
+
'next_video_id': string;
|
|
254
|
+
'cta_config': CtaConfiguration | string;
|
|
255
|
+
'screen_state': ScreenChangeState;
|
|
256
|
+
'player_orientation': string;
|
|
257
|
+
'device_orientation': string;
|
|
258
|
+
'audio_state': string;
|
|
259
|
+
'cc_state': string;
|
|
260
|
+
'quality': string;
|
|
261
|
+
'seek_type': string;
|
|
262
|
+
'seek_total_time': number;
|
|
263
|
+
'seek_direction': string;
|
|
264
|
+
'content_extra_info': string;
|
|
265
|
+
}
|
|
232
266
|
export declare class AdEvent {
|
|
233
267
|
'advertiser_id': string;
|
|
234
268
|
'advertiser_name': string;
|
|
@@ -270,6 +304,9 @@ export declare class ImaAdEvent {
|
|
|
270
304
|
'ima_ad_provider': string;
|
|
271
305
|
'player_orientation': ContentAspectRatio;
|
|
272
306
|
'content_extra_info': string;
|
|
307
|
+
'ad_index': string;
|
|
308
|
+
'audio_state': string;
|
|
309
|
+
'content_type': string;
|
|
273
310
|
}
|
|
274
311
|
export declare class InteractionEvent {
|
|
275
312
|
'interaction_id': string;
|
|
@@ -295,8 +332,9 @@ export declare abstract class BaseWidget extends HTMLElement {
|
|
|
295
332
|
removeElement(): void;
|
|
296
333
|
}
|
|
297
334
|
|
|
335
|
+
type BlazeSourceType = 'labels' | 'ids';
|
|
298
336
|
export interface BlazeDataSourceType {
|
|
299
|
-
type:
|
|
337
|
+
type: BlazeSourceType;
|
|
300
338
|
labels?: string | string[] | BlazeWidgetLabel;
|
|
301
339
|
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
302
340
|
ids?: string[];
|
|
@@ -330,19 +368,20 @@ export declare const Platform: {
|
|
|
330
368
|
readonly Embedded: "embedded";
|
|
331
369
|
readonly Desktop: "desktop";
|
|
332
370
|
};
|
|
333
|
-
|
|
371
|
+
export declare const DEVICE_EVENTS: {
|
|
372
|
+
SCREEN_ORIENTATION_CHANGE: string;
|
|
373
|
+
};
|
|
334
374
|
type Platform = 'console' | 'mobile' | 'tablet' | 'smarttv' | 'wearable' | 'embedded' | 'desktop';
|
|
335
375
|
type OS = 'AIX' | 'Amiga OS' | 'Android' | 'Arch' | 'Bada' | 'BeOS' | 'BlackBerry' | 'CentOS' | 'Chromium OS' | 'Contiki' | 'Fedora' | 'Firefox OS' | 'FreeBSD' | 'Debian' | 'DragonFly' | 'Gentoo' | 'GNU' | 'Haiku' | 'Hurd' | 'iOS' | 'Joli' | 'Linpus' | 'Linux' | 'Mac OS' | 'Mageia' | 'Mandriva' | 'MeeGo' | 'Minix' | 'Mint' | 'Morph OS' | 'NetBSD' | 'Nintendo' | 'OpenBSD' | 'OpenVMS' | 'OS/2' | 'Palm' | 'PCLinuxOS' | 'Plan9' | 'Playstation' | 'QNX' | 'RedHat' | 'RIM Tablet OS' | 'RISC OS' | 'Sailfish' | 'Series40' | 'Slackware' | 'Solaris' | 'SUSE' | 'Symbian' | 'Tizen' | 'Ubuntu' | 'UNIX' | 'VectorLinux' | 'WebOS' | 'Windows Phone/Mobile' | 'Zenwalk';
|
|
336
376
|
type Browser = 'Amaya' | 'Android Browser' | 'Arora' | 'Avant' | 'Baidu' | 'Blazer' | 'Bolt' | 'Camino' | 'Chimera' | 'Chrome' | 'Chromium' | 'Comodo Dragon' | 'Conkeror' | 'Dillo' | 'Dolphin' | 'Doris' | 'Edge' | 'Epiphany' | 'Fennec' | 'Firebird' | 'Firefox' | 'Flock' | 'GoBrowser' | 'iCab' | 'ICE Browser' | 'IceApe' | 'IceCat' | 'IceDragon' | 'Iceweasel' | 'IE' | 'Iron' | 'Jasmine' | 'K-Meleon' | 'Konqueror' | 'Kindle' | 'Links' | 'Lunascape' | 'Lynx' | 'Maemo' | 'Maxthon' | 'Midori' | 'Minimo' | 'MIUI Browser' | 'Safari' | 'Mosaic' | 'Mozilla' | 'Netfront' | 'Netscape' | 'NetSurf' | 'Nokia' | 'OmniWeb' | 'Opera' | 'Phoenix' | 'Polaris' | 'QQBrowser' | 'RockMelt' | 'Silk' | 'Skyfire' | 'SeaMonkey' | 'SlimBrowser' | 'Swiftfox' | 'Tizen' | 'UCBrowser' | 'Vivaldi' | 'w3m' | 'Yandex' | 'Mobile Safari';
|
|
337
377
|
declare class DeviceDetector {
|
|
338
378
|
private static instance;
|
|
339
379
|
private parser;
|
|
340
|
-
private
|
|
380
|
+
private boundResizeListener;
|
|
341
381
|
OS: OS;
|
|
342
382
|
platform: Platform;
|
|
343
383
|
browser: Browser;
|
|
344
|
-
screenOrientation:
|
|
345
|
-
private orientationChangeEvent;
|
|
384
|
+
screenOrientation: DeviceScreenOrientation;
|
|
346
385
|
private constructor();
|
|
347
386
|
removeResizeListener(): void;
|
|
348
387
|
static getInstance(): DeviceDetector;
|
|
@@ -355,6 +394,7 @@ declare class DeviceDetector {
|
|
|
355
394
|
private getScreenOrientation;
|
|
356
395
|
private handleResize;
|
|
357
396
|
isIOSMobileTabletSafari(): boolean;
|
|
397
|
+
get isFullscreenSupported(): boolean;
|
|
358
398
|
}
|
|
359
399
|
export declare const deviceDetector: DeviceDetector;
|
|
360
400
|
|
|
@@ -369,6 +409,23 @@ export declare class EventsListener {
|
|
|
369
409
|
removeAll(): void;
|
|
370
410
|
}
|
|
371
411
|
|
|
412
|
+
export declare class FullscreenManager {
|
|
413
|
+
private isFullscreen;
|
|
414
|
+
private isProgrammaticChange;
|
|
415
|
+
private container;
|
|
416
|
+
private boundOnFullscreenChange;
|
|
417
|
+
onFullscreenChangeByBrowser: (() => void) | undefined;
|
|
418
|
+
constructor(container: HTMLElement);
|
|
419
|
+
toggleFullscreen(): Promise<void>;
|
|
420
|
+
waitForFullscreenExit(): Promise<void>;
|
|
421
|
+
private enterFullscreen;
|
|
422
|
+
exitFullscreen(): Promise<void>;
|
|
423
|
+
private handleFullscreenChange;
|
|
424
|
+
isFullscreenMode(): boolean;
|
|
425
|
+
private attachEventListeners;
|
|
426
|
+
destroy(): void;
|
|
427
|
+
}
|
|
428
|
+
|
|
372
429
|
export * from './analytics.class';
|
|
373
430
|
export * from './base-element.class';
|
|
374
431
|
export * from './debounce';
|
|
@@ -380,6 +437,8 @@ export * from './singleton.class';
|
|
|
380
437
|
export * from './throttle';
|
|
381
438
|
export * from './url';
|
|
382
439
|
export * from './data-source.class';
|
|
440
|
+
export * from './fullscreen-manager.class';
|
|
441
|
+
export * from './visiblity-manager.class';
|
|
383
442
|
|
|
384
443
|
export declare class BlazeWidgetLabel {
|
|
385
444
|
value: string;
|
|
@@ -418,7 +477,7 @@ export declare function Singleton<T>(): {
|
|
|
418
477
|
};
|
|
419
478
|
|
|
420
479
|
export type EventHandler<E extends Event> = (event: E) => void;
|
|
421
|
-
export declare function throttle<
|
|
480
|
+
export declare function throttle<F extends (...args: any[]) => void>(func: F, _delay: number): (...args: Parameters<F>) => Promise<void>;
|
|
422
481
|
|
|
423
482
|
interface UpdateLocationContentHashParams {
|
|
424
483
|
contentType?: ContentType;
|
|
@@ -435,6 +494,7 @@ export declare class URLManager {
|
|
|
435
494
|
static isBackWasCalled: boolean;
|
|
436
495
|
static isAutoAdvancingEnabled: boolean;
|
|
437
496
|
static resetLocationAfterContentClose(): void;
|
|
497
|
+
static get shouldModifyUrlWithId(): boolean;
|
|
438
498
|
static resetLocation(): void;
|
|
439
499
|
static updateLocationContentHash(params: UpdateLocationContentHashParams): void;
|
|
440
500
|
static getHashMatch(): boolean;
|
|
@@ -449,6 +509,26 @@ export declare class URLManager {
|
|
|
449
509
|
static navigateTo(navigationFeature: 'AUTO_ADVANCE'): Promise<void>;
|
|
450
510
|
}
|
|
451
511
|
|
|
512
|
+
export interface IVideoPlayerController {
|
|
513
|
+
isConnected: boolean;
|
|
514
|
+
resumeAfterFocus: boolean;
|
|
515
|
+
pause(): void;
|
|
516
|
+
resume(): void;
|
|
517
|
+
currentVideoItem: BlazeVideoElement;
|
|
518
|
+
}
|
|
519
|
+
export declare class VisibilityManager {
|
|
520
|
+
private controller;
|
|
521
|
+
private boundHandleVisibilityChange;
|
|
522
|
+
private boundHandleFocus;
|
|
523
|
+
private BoundHandleBlur;
|
|
524
|
+
constructor(controller: IVideoPlayerController);
|
|
525
|
+
private attachEventListeners;
|
|
526
|
+
private handleVisibilityChange;
|
|
527
|
+
private handleBlur;
|
|
528
|
+
private handleFocus;
|
|
529
|
+
detach(): void;
|
|
530
|
+
}
|
|
531
|
+
|
|
452
532
|
export declare class BlazeAlert extends BaseWidget {
|
|
453
533
|
titleContainer: HTMLDivElement;
|
|
454
534
|
textContainer: HTMLDivElement;
|
|
@@ -479,7 +559,6 @@ type DrawerAttributes = 'open' | 'background-color' | 'border-color' | 'border-r
|
|
|
479
559
|
export declare class BlazeDrawer extends BaseWidget {
|
|
480
560
|
backdropContainer: BlazeDiv;
|
|
481
561
|
drawerContainer: BlazeDiv;
|
|
482
|
-
isOpen: boolean;
|
|
483
562
|
drawerOptions: IDrawerOptions | undefined;
|
|
484
563
|
drawerComponent: BaseWidget | undefined;
|
|
485
564
|
onOpen: (() => void) | undefined;
|
|
@@ -496,8 +575,8 @@ export declare class BlazeDrawer extends BaseWidget {
|
|
|
496
575
|
init(options: IDrawerOptions): void;
|
|
497
576
|
private buildBackdrop;
|
|
498
577
|
private buildModal;
|
|
499
|
-
open():
|
|
500
|
-
close():
|
|
578
|
+
open(): void;
|
|
579
|
+
close(): void;
|
|
501
580
|
private animateDrawer;
|
|
502
581
|
}
|
|
503
582
|
|
|
@@ -523,7 +602,11 @@ export * from './typography';
|
|
|
523
602
|
|
|
524
603
|
export declare class BlazeLoader extends HTMLElement {
|
|
525
604
|
constructor();
|
|
605
|
+
static get observedAttributes(): string[];
|
|
606
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
526
607
|
connectedCallback(): void;
|
|
608
|
+
private updateLoaderSize;
|
|
609
|
+
private updateLoaderColor;
|
|
527
610
|
}
|
|
528
611
|
|
|
529
612
|
export declare class BlazeWidgetItemSkeleton extends BaseWidget {
|
|
@@ -551,18 +634,35 @@ export declare class BlazeTypography extends BaseWidget {
|
|
|
551
634
|
get fontSize(): ".8rem" | "1rem" | ".5rem";
|
|
552
635
|
}
|
|
553
636
|
|
|
554
|
-
type
|
|
637
|
+
export type ButtonAttribute = (typeof BUTTON_ATTRIBUTES)[keyof typeof BUTTON_ATTRIBUTES];
|
|
638
|
+
export declare const BUTTON_ATTRIBUTES: {
|
|
639
|
+
readonly Disabled: "disabled";
|
|
640
|
+
readonly BlazeBtnHidden: "blaze-btn-hidden";
|
|
641
|
+
readonly BlazeBtnVisible: "blaze-btn-visible";
|
|
642
|
+
readonly Height: "height";
|
|
643
|
+
readonly Width: "width";
|
|
644
|
+
readonly IconColor: "icon-color";
|
|
645
|
+
readonly Order: "order";
|
|
646
|
+
readonly ButtonDesktopAnimation: "button-desktop-animation";
|
|
647
|
+
};
|
|
555
648
|
export declare class BlazeButton extends BaseWidget {
|
|
556
649
|
buttonElement: HTMLButtonElement;
|
|
650
|
+
buttonIcon: string;
|
|
651
|
+
isAnimationOnDesktopInitialized: boolean;
|
|
557
652
|
get refElement(): ShadowRoot | this;
|
|
558
653
|
constructor();
|
|
559
|
-
static observedAttributes:
|
|
654
|
+
static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-hidden" | "blaze-btn-visible" | "button-desktop-animation")[];
|
|
655
|
+
private onMouseEnter;
|
|
656
|
+
private onMouseLeave;
|
|
657
|
+
private onClick;
|
|
560
658
|
connectedCallback(): void;
|
|
561
659
|
disconnectedCallback(): void;
|
|
562
|
-
attributeChangedCallback(name:
|
|
660
|
+
attributeChangedCallback(name: ButtonAttribute, oldValue: string, newValue: string): void;
|
|
563
661
|
get height(): string | number | boolean;
|
|
564
662
|
get width(): string | number | boolean;
|
|
565
663
|
setIconUrl(value: string): void;
|
|
664
|
+
setIconUrlAnimation(value: string): void;
|
|
665
|
+
private applyIconStyles;
|
|
566
666
|
private setIsHidden;
|
|
567
667
|
private setIsVisible;
|
|
568
668
|
private setIsDisabled;
|
|
@@ -570,6 +670,45 @@ export declare class BlazeButton extends BaseWidget {
|
|
|
570
670
|
private setWidth;
|
|
571
671
|
}
|
|
572
672
|
|
|
673
|
+
export declare const CTA_BUTTON_ATTRIBUTES: {
|
|
674
|
+
HiddenBtn: string;
|
|
675
|
+
Width: string;
|
|
676
|
+
Height: string;
|
|
677
|
+
Margin: string;
|
|
678
|
+
Text: string;
|
|
679
|
+
Href: string;
|
|
680
|
+
IconUrl: string;
|
|
681
|
+
IconSize: string;
|
|
682
|
+
IconColor: string;
|
|
683
|
+
ArrowIconDisplay: string;
|
|
684
|
+
ArrowIconColor: string;
|
|
685
|
+
DisplayIcon: string;
|
|
686
|
+
};
|
|
687
|
+
export declare class BlazeCallToActionButton extends BaseWidget {
|
|
688
|
+
private anchorButtonElement;
|
|
689
|
+
private iconButtonElement;
|
|
690
|
+
private iconArrowElement;
|
|
691
|
+
private ctaTextElement;
|
|
692
|
+
private isButtonCreated;
|
|
693
|
+
private animationTimeouts;
|
|
694
|
+
constructor();
|
|
695
|
+
private initializeAttributes;
|
|
696
|
+
private initializeStyles;
|
|
697
|
+
static get observedAttributes(): string[];
|
|
698
|
+
connectedCallback(): void;
|
|
699
|
+
disconnectedCallback(): void;
|
|
700
|
+
attributeChangedCallback(name: keyof typeof CTA_BUTTON_ATTRIBUTES, oldValue: string, newValue: string): void;
|
|
701
|
+
private createButton;
|
|
702
|
+
private animateElement;
|
|
703
|
+
animateButton(animationType: AnimationType): void;
|
|
704
|
+
animateIcon(animationType: AnimationType): void;
|
|
705
|
+
setAnchorButtonStyles(styles: Partial<CSSStyleDeclaration>): void;
|
|
706
|
+
setCtaTextStyle(styles: Partial<CSSStyleDeclaration>): void;
|
|
707
|
+
setCtaIconStyles(styles: Partial<CSSStyleDeclaration>): void;
|
|
708
|
+
clearAllAnimations(): void;
|
|
709
|
+
getIconElement(): BlazeButton;
|
|
710
|
+
}
|
|
711
|
+
|
|
573
712
|
type AttributeType = 'hidden-btn' | 'width' | 'height' | 'margin' | 'text' | 'href' | 'icon-url' | 'icon-size' | 'icon-color' | 'arrow-icon-display' | 'arrow-icon-color' | 'display-icon';
|
|
574
713
|
export declare class BlazeCtaButton extends BaseWidget {
|
|
575
714
|
anchorButtonElement: HTMLAnchorElement;
|
|
@@ -599,6 +738,7 @@ export declare class BlazeCtaButton extends BaseWidget {
|
|
|
599
738
|
export * from './share-button';
|
|
600
739
|
export * from './button';
|
|
601
740
|
export * from './cta-button';
|
|
741
|
+
export * from './call-to-action.button';
|
|
602
742
|
|
|
603
743
|
export type ShareButtonType = 'copy-link' | 'linked-in';
|
|
604
744
|
type AttributeType = 'size' | 'button-type';
|
|
@@ -639,7 +779,8 @@ export declare enum StoryAction {
|
|
|
639
779
|
Expand = "expand",
|
|
640
780
|
Minimize = "minimize",
|
|
641
781
|
ClosedCaptionsOff = "cc_off",
|
|
642
|
-
ClosedCaptionsOn = "cc_on"
|
|
782
|
+
ClosedCaptionsOn = "cc_on",
|
|
783
|
+
CustomActionButtonClick = "custom_action_button_click"
|
|
643
784
|
}
|
|
644
785
|
export declare enum MomentAction {
|
|
645
786
|
MomentsPlaylistStart = "moments_playlist_start",
|
|
@@ -655,7 +796,25 @@ export declare enum MomentAction {
|
|
|
655
796
|
PlaybackPause = "playback_pause",
|
|
656
797
|
PlaybackPlay = "playback_play",
|
|
657
798
|
ClosedCaptionsOff = "cc_off",
|
|
658
|
-
ClosedCaptionsOn = "cc_on"
|
|
799
|
+
ClosedCaptionsOn = "cc_on",
|
|
800
|
+
CustomActionButtonClick = "custom_action_button_click"
|
|
801
|
+
}
|
|
802
|
+
export declare enum VideoAction {
|
|
803
|
+
VideoStart = "video_start",
|
|
804
|
+
VideoEnd = "video_end",
|
|
805
|
+
PlaybackPause = "playback_pause",
|
|
806
|
+
PlaybackPlay = "playback_play",
|
|
807
|
+
Seek = "seek",
|
|
808
|
+
Like = "like",
|
|
809
|
+
Unlike = "unlike",
|
|
810
|
+
Share = "share",
|
|
811
|
+
Audio = "audio",
|
|
812
|
+
CtaVisible = "cta_visible",
|
|
813
|
+
CtaClick = "cta_click",
|
|
814
|
+
CtaDismissed = "cta_dismissed",
|
|
815
|
+
ClosedCaptionsOff = "cc_off",
|
|
816
|
+
ClosedCaptionsOn = "cc_on",
|
|
817
|
+
ScreenChange = "screen_change"
|
|
659
818
|
}
|
|
660
819
|
export declare enum WidgetAction {
|
|
661
820
|
Load = "widget_load",
|
|
@@ -704,7 +863,7 @@ export declare const MomentToAdActionMapper: {
|
|
|
704
863
|
cta_click: AdAction;
|
|
705
864
|
};
|
|
706
865
|
type ExposedFields = {
|
|
707
|
-
[key in StoryAction | MomentAction | WidgetAction | AdAction]?: string[];
|
|
866
|
+
[key in StoryAction | MomentAction | WidgetAction | AdAction | VideoAction]?: string[];
|
|
708
867
|
};
|
|
709
868
|
export declare const exposedFieldsByAction: ExposedFields;
|
|
710
869
|
|
|
@@ -736,15 +895,27 @@ export declare const ONE_SECOND = 1000;
|
|
|
736
895
|
export declare const ONE_AND_HALF_SECOND = 1500;
|
|
737
896
|
export declare const FAIL_TO_LOAD_TIMEOUT_MS = 3000;
|
|
738
897
|
|
|
898
|
+
export declare const DB_NAMES: {
|
|
899
|
+
readonly MOMENTS: "moments";
|
|
900
|
+
readonly INTERACTIONS: "interactions";
|
|
901
|
+
readonly USER: "user";
|
|
902
|
+
readonly STORIES: "stories";
|
|
903
|
+
readonly VIDEOS: "videos";
|
|
904
|
+
};
|
|
739
905
|
export declare class Database implements IDatabase {
|
|
740
906
|
private readonly options;
|
|
741
907
|
constructor(options: IDatabaseOptions);
|
|
742
908
|
dbInstance?: IDBDatabase;
|
|
743
|
-
init(
|
|
744
|
-
|
|
909
|
+
init(): Promise<void>;
|
|
910
|
+
private openDatabase;
|
|
911
|
+
private onUpgradeNeeded;
|
|
912
|
+
private onOpen;
|
|
913
|
+
private onError;
|
|
914
|
+
private deleteDatabase;
|
|
915
|
+
createTransaction(tableName: string, mode: 'readonly' | 'readwrite'): IDBObjectStore | null;
|
|
745
916
|
get<T>(tableName: string, key: string): Promise<IResponse<T>>;
|
|
746
917
|
update<T>(tableName: string, value: any): Promise<IResponse<T>>;
|
|
747
|
-
private
|
|
918
|
+
private throttledReinit;
|
|
748
919
|
}
|
|
749
920
|
|
|
750
921
|
export * from './database';
|
|
@@ -782,6 +953,11 @@ export interface AppConfiguration {
|
|
|
782
953
|
};
|
|
783
954
|
}
|
|
784
955
|
|
|
956
|
+
export type ContentEntities = {
|
|
957
|
+
gameId: string | null;
|
|
958
|
+
teamId: string | null;
|
|
959
|
+
playerId: string | null;
|
|
960
|
+
};
|
|
785
961
|
export interface IContent {
|
|
786
962
|
id: string;
|
|
787
963
|
title: string;
|
|
@@ -791,16 +967,12 @@ export interface IContent {
|
|
|
791
967
|
hasViewed: boolean;
|
|
792
968
|
type?: string;
|
|
793
969
|
isAd: boolean;
|
|
794
|
-
entities?:
|
|
795
|
-
gameId: string | null;
|
|
796
|
-
teamId: string | null;
|
|
797
|
-
playerId: string | null;
|
|
798
|
-
};
|
|
970
|
+
entities?: ContentEntities;
|
|
799
971
|
bannerAdInfo?: IBannerAdInfo;
|
|
800
972
|
closedCaptions?: IClosedCaption[];
|
|
801
973
|
}
|
|
802
974
|
|
|
803
|
-
export interface
|
|
975
|
+
export interface ICta {
|
|
804
976
|
type: 'Deeplink' | 'Web' | null;
|
|
805
977
|
text: string;
|
|
806
978
|
url: string;
|
|
@@ -809,6 +981,13 @@ export interface ICTA {
|
|
|
809
981
|
enhancements: EnhancementsType;
|
|
810
982
|
}
|
|
811
983
|
|
|
984
|
+
export interface IEntity {
|
|
985
|
+
gameId: string | null;
|
|
986
|
+
teamId: string | null;
|
|
987
|
+
playerId: string | null;
|
|
988
|
+
roundId: string | null;
|
|
989
|
+
}
|
|
990
|
+
|
|
812
991
|
export * from './ad-info.interface';
|
|
813
992
|
export * from './content.interface';
|
|
814
993
|
export * from './cta.interface';
|
|
@@ -820,6 +999,9 @@ export * from './page.interface';
|
|
|
820
999
|
export * from './rendition.interface';
|
|
821
1000
|
export * from './story.interface';
|
|
822
1001
|
export * from './thumbnail.interface';
|
|
1002
|
+
export * from './video.interface';
|
|
1003
|
+
export * from './entity.interface';
|
|
1004
|
+
export * from './app-configuration';
|
|
823
1005
|
|
|
824
1006
|
export type InteractionType = 'Poll' | 'Quiz';
|
|
825
1007
|
export type Interaction = {
|
|
@@ -878,7 +1060,7 @@ export interface IMoment extends IContent {
|
|
|
878
1060
|
rendition: IRendition;
|
|
879
1061
|
type: string;
|
|
880
1062
|
};
|
|
881
|
-
cta:
|
|
1063
|
+
cta: ICta;
|
|
882
1064
|
adPath?: string;
|
|
883
1065
|
subtitle?: string;
|
|
884
1066
|
description?: string;
|
|
@@ -902,7 +1084,7 @@ export interface IContentPage extends IBasePage {
|
|
|
902
1084
|
isSkippable: boolean;
|
|
903
1085
|
thumbnail: IThumbnail;
|
|
904
1086
|
baseLayer: ILayer;
|
|
905
|
-
cta:
|
|
1087
|
+
cta: ICta;
|
|
906
1088
|
shouldShowImaAd?: boolean;
|
|
907
1089
|
adInfo?: IAdInfo;
|
|
908
1090
|
interaction?: Interaction;
|
|
@@ -918,6 +1100,8 @@ export type IPage = IAdPage | IContentPage;
|
|
|
918
1100
|
export interface IRendition {
|
|
919
1101
|
url: string;
|
|
920
1102
|
aspectRatio: ContentAspectRatio;
|
|
1103
|
+
bitRate: number;
|
|
1104
|
+
fileSize: number;
|
|
921
1105
|
}
|
|
922
1106
|
|
|
923
1107
|
export interface IStory extends IContent {
|
|
@@ -933,6 +1117,38 @@ export interface IThumbnail {
|
|
|
933
1117
|
renditions?: IRendition[];
|
|
934
1118
|
}
|
|
935
1119
|
|
|
1120
|
+
export interface IVideo extends IContent {
|
|
1121
|
+
description: string;
|
|
1122
|
+
isLive: boolean;
|
|
1123
|
+
pages: IPage[];
|
|
1124
|
+
adInfo?: IAdInfo;
|
|
1125
|
+
duration: number;
|
|
1126
|
+
poster: IThumbnail;
|
|
1127
|
+
cta: ICta;
|
|
1128
|
+
baseLayer: ILayer;
|
|
1129
|
+
subtitle: string;
|
|
1130
|
+
likes: number;
|
|
1131
|
+
}
|
|
1132
|
+
export interface VideoDBData {
|
|
1133
|
+
liked: boolean | PromiseLike<boolean>;
|
|
1134
|
+
id: string;
|
|
1135
|
+
currentTime: number;
|
|
1136
|
+
posterCurrentTime: string;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
export declare enum ActionHandlerId {
|
|
1140
|
+
AddCustomActionButton = "addCustomActionButton"
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
export declare enum ButtonState {
|
|
1144
|
+
Play = 0,
|
|
1145
|
+
Pause = 1,
|
|
1146
|
+
Mute = 2,
|
|
1147
|
+
Unmute = 3,
|
|
1148
|
+
CC_ON = 4,
|
|
1149
|
+
CC_OFF = 5
|
|
1150
|
+
}
|
|
1151
|
+
|
|
936
1152
|
export declare enum ErrorCode {
|
|
937
1153
|
FailedToFindContainerId = 1,
|
|
938
1154
|
FailedContainerIdHasWidgetAlready = 2,
|
|
@@ -942,6 +1158,8 @@ export declare enum ErrorCode {
|
|
|
942
1158
|
FailedToHaveLabels = 103,
|
|
943
1159
|
FailedLoadingMoments = 110,
|
|
944
1160
|
FailedEnrichMoments = 111,
|
|
1161
|
+
FailedLoadingVideos = 120,
|
|
1162
|
+
FailedEnrichVideos = 121,
|
|
945
1163
|
VisualViewportScaled = 150,
|
|
946
1164
|
VideoError = 200,
|
|
947
1165
|
PreviewStoryNotFound = 300,
|
|
@@ -949,13 +1167,13 @@ export declare enum ErrorCode {
|
|
|
949
1167
|
PreviewMomentNotFound = 310,
|
|
950
1168
|
PreviewMomentLoadFailed = 311
|
|
951
1169
|
}
|
|
1170
|
+
export declare const ErrorLoadingCodeMapper: Record<ContentType, ErrorCode>;
|
|
952
1171
|
|
|
953
1172
|
export declare enum Delegation {
|
|
954
1173
|
onEventTriggered = "blaze-event-triggered",
|
|
955
1174
|
onErrorThrown = "blaze-error-event",
|
|
956
1175
|
onPlayerDidAppear = "blaze-player-did-appear",
|
|
957
1176
|
onPlayerDismissed = "blaze-player-dismissed",
|
|
958
|
-
onGetAds = "blaze-get-ads",
|
|
959
1177
|
onWidgetDataLoadStarted = "blaze-widget-data-load-started",
|
|
960
1178
|
onWidgetDataLoadCompleted = "blaze-widget-data-load-completed",
|
|
961
1179
|
onWidgetPlayerDismissed = "blaze-widget-player-dismissed",
|
|
@@ -970,6 +1188,7 @@ export declare enum InternalEvent {
|
|
|
970
1188
|
FULL_SCREEN_CLICK = "full_screen_click",
|
|
971
1189
|
AD_ENDED = "ad_ended",
|
|
972
1190
|
AD_RESUMED = "ad_resumed",
|
|
1191
|
+
AD_STARTED = "ad_started",
|
|
973
1192
|
BANNER_ANALYTICS = "banner_analytics"
|
|
974
1193
|
}
|
|
975
1194
|
export interface InternalEventDetails {
|
|
@@ -993,9 +1212,12 @@ export declare const HttpStatus: {
|
|
|
993
1212
|
export * from './error-codes.enum';
|
|
994
1213
|
export * from './event.enum';
|
|
995
1214
|
export * from './http-status.enum';
|
|
1215
|
+
export * from './button.enum';
|
|
1216
|
+
export * from './action-handler-id.enum';
|
|
996
1217
|
|
|
997
1218
|
export interface WidgetsTagNameMap {
|
|
998
1219
|
'blaze-sdk': BlazeWidgetSDK;
|
|
1220
|
+
'blaze-widget-vast-ad': BlazeWidgetVastAd;
|
|
999
1221
|
'blaze-widget-ad': BlazeWidgetAd;
|
|
1000
1222
|
'blaze-widget-embedded-story': BlazeWidgetEmbeddedStory;
|
|
1001
1223
|
'blaze-widget-modal': BlazeWidgetModal;
|
|
@@ -1014,6 +1236,12 @@ export interface WidgetsTagNameMap {
|
|
|
1014
1236
|
'blaze-widget-interaction': BlazeWidgetInteraction;
|
|
1015
1237
|
'blaze-widget-banner-ad': BlazeWidgetBannerAd;
|
|
1016
1238
|
'blaze-widget-captions': BlazeWidgetCaptions;
|
|
1239
|
+
'blaze-video-element': BlazeVideoElement;
|
|
1240
|
+
'blaze-video-long-form-overlay': BlazeLongFormControlsOverlay;
|
|
1241
|
+
'blaze-widget-video-player': BlazeWidgetVideoPlayer;
|
|
1242
|
+
'blaze-video-modal': BlazeWidgetVideoModal;
|
|
1243
|
+
'blaze-video-navigation-overlay': BlazeVideoNavigationOverlay;
|
|
1244
|
+
'blaze-video-seek-bar': BlazeVideoSeekBar;
|
|
1017
1245
|
'blaze-loader': BlazeLoader;
|
|
1018
1246
|
'blaze-chip': BlazeChip;
|
|
1019
1247
|
'blaze-image': BlazeImage;
|
|
@@ -1023,10 +1251,13 @@ export interface WidgetsTagNameMap {
|
|
|
1023
1251
|
'blaze-share-button': BlazeShareButton;
|
|
1024
1252
|
'blaze-button': BlazeButton;
|
|
1025
1253
|
'blaze-button-cta': BlazeCtaButton;
|
|
1254
|
+
'blaze-call-to-action-button': BlazeCallToActionButton;
|
|
1026
1255
|
'blaze-typography': BlazeTypography;
|
|
1256
|
+
'blaze-timer': BlazeTimer;
|
|
1027
1257
|
}
|
|
1028
1258
|
interface WidgetsTagNameOptionsMap {
|
|
1029
1259
|
'blaze-sdk': {};
|
|
1260
|
+
'blaze-widget-vast-ad': {};
|
|
1030
1261
|
'blaze-widget-ad': {};
|
|
1031
1262
|
'blaze-widget-embedded-story': {};
|
|
1032
1263
|
'blaze-widget-modal': {};
|
|
@@ -1047,6 +1278,13 @@ interface WidgetsTagNameOptionsMap {
|
|
|
1047
1278
|
'blaze-widget-interaction': {};
|
|
1048
1279
|
'blaze-widget-banner-ad': {};
|
|
1049
1280
|
'blaze-widget-captions': {};
|
|
1281
|
+
'blaze-video-element': {};
|
|
1282
|
+
'blaze-video-long-form-overlay': {};
|
|
1283
|
+
'blaze-widget-video-player': {};
|
|
1284
|
+
'blaze-video-modal': {};
|
|
1285
|
+
'blaze-video-navigation-overlay': {};
|
|
1286
|
+
'blaze-video-seek-bar': {};
|
|
1287
|
+
'blaze-timer': {};
|
|
1050
1288
|
'blaze-loader': {};
|
|
1051
1289
|
'blaze-chip': {};
|
|
1052
1290
|
'blaze-image': {};
|
|
@@ -1056,6 +1294,7 @@ interface WidgetsTagNameOptionsMap {
|
|
|
1056
1294
|
'blaze-share-button': {};
|
|
1057
1295
|
'blaze-button': {};
|
|
1058
1296
|
'blaze-button-cta': {};
|
|
1297
|
+
'blaze-call-to-action-button': {};
|
|
1059
1298
|
'blaze-typography': {};
|
|
1060
1299
|
}
|
|
1061
1300
|
export declare abstract class WidgetsFactory {
|
|
@@ -1068,7 +1307,12 @@ export * from './elements.factory';
|
|
|
1068
1307
|
export * from './player.factory';
|
|
1069
1308
|
|
|
1070
1309
|
export declare class PlayerViewFactory {
|
|
1071
|
-
static create(dataSource: BlazeDataSourceType,
|
|
1310
|
+
static create(type: ContentType, dataSource: BlazeDataSourceType, options: {
|
|
1311
|
+
style: StoryPlayerStyle | VideoPlayerStyle;
|
|
1312
|
+
actionHandlers?: ActionHandler[];
|
|
1313
|
+
}): Promise<void>;
|
|
1314
|
+
static createStory(dataSource: BlazeDataSourceType, style: StoryPlayerStyle, actionHandlers?: ActionHandler[]): Promise<void>;
|
|
1315
|
+
static createVideos(dataSource: BlazeDataSourceType, style: VideoPlayerStyle): Promise<void>;
|
|
1072
1316
|
}
|
|
1073
1317
|
|
|
1074
1318
|
export * from './widget-theme.guard';
|
|
@@ -1097,12 +1341,15 @@ export declare const playResumeIconSvg = "data:image/svg+xml;base64,PHN2ZyB3aWR0
|
|
|
1097
1341
|
export declare const pauseResumeIconSvg = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InBsYXlfYXJyb3ciPgo8cmVjdCB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHJ4PSIyNCIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42Ii8+CjxwYXRoIGlkPSJwYXVzZSIgZD0iTTI3IDM2VjEySDMzVjM2SDI3Wk0xNSAzNlYxMkgyMVYzNkgxNVoiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuOTIiLz4KPC9nPgo8L3N2Zz4K";
|
|
1098
1342
|
export declare const arrowUpCtaIconSvg = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZ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UgMyAxOVYxNUg1VjE5SDlWMjFINVpNMTUgMjFWMTlIMTlWMTVIMjFWMTlDMjEgMTkuNTUgMjAuODA0MiAyMC4wMjA4IDIwLjQxMjUgMjAuNDEyNUMyMC4wMjA4IDIwLjgwNDIgMTkuNTUgMjEgMTkgMjFIMTVaTTMgOVY1QzMgNC40NSAzLjE5NTgzIDMuOTc5MTcgMy41ODc1IDMuNTg3NUMzLjk3OTE3IDMuMTk1ODMgNC40NSAzIDUgM0g5VjVINVY5SDNaTTE5IDlWNUgxNVYzSDE5QzE5LjU1IDMgMjAuMDIwOCAzLjE5NTgzIDIwLjQxMjUgMy41ODc1QzIwLjgwNDIgMy45NzkxNyAyMSA0LjQ1IDIxIDVWOUgxOVoiIGZpbGw9IiNGMEYwRjAiLz4KPC9nPgo8L3N2Zz4K";
|
|
1345
|
+
export declare const fullscreenExitIconSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNMjQwLTEyMHYtMTIwSDEyMHYtODBoMjAwdjIwMGgtODBabTQwMCAwdi0yMDBoMjAwdjgwSDcyMHYxMjBoLTgwWk0xMjAtNjQwdi04MGgxMjB2LTEyMGg4MHYyMDBIMTIwWm01MjAgMHYtMjAwaDgwdjEyMGgxMjB2ODBINjQwWiIvPjwvc3ZnPg==";
|
|
1101
1346
|
export declare const arrowDownMomentIconSvg = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjY2NjcgMThWNS43MzMzMkwxLjg2NjY3IDEwLjUzMzNMMCA4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tNDgwcTAtMTctMTEuNS0yOC41VDIwMC01MjBxLTE3IDAtMjguNSAxMS41VDE2MC00ODBxMCAxNyAxMS41IDI4LjVUMjAwLTQ0MFptNDgwLTI4MHExNyAwIDI4LjUtMTEuNVQ3MjAtNzYwcTAtMTctMTEuNS0yOC41VDY4MC04MDBxLTE3IDAtMjguNSAxMS41VDY0MC03NjBxMCAxNyAxMS41IDI4LjVUNjgwLTcyMFptMCA1MjBaTTIwMC00ODBabTQ4MC0yODBaIi8+PC9zdmc+";
|
|
1352
|
+
export declare const linkIconSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNNDQwLTI4MEgyODBxLTgzIDAtMTQxLjUtNTguNVQ4MC00ODBxMC04MyA1OC41LTE0MS41VDI4MC02ODBoMTYwdjgwSDI4MHEtNTAgMC04NSAzNXQtMzUgODVxMCA1MCAzNSA4NXQ4NSAzNWgxNjB2ODBaTTMyMC00NDB2LTgwaDMyMHY4MEgzMjBabTIwMCAxNjB2LTgwaDE2MHE1MCAwIDg1LTM1dDM1LTg1cTAtNTAtMzUtODV0LTg1LTM1SDUyMHYtODBoMTYwcTgzIDAgMTQxLjUgNTguNVQ4ODAtNDgwcTAgODMtNTguNSAxNDEuNVQ2ODAtMjgwSDUyMFoiLz48L3N2Zz4=";
|
|
1106
1353
|
|
|
1107
1354
|
type CustomNativeTargeting = Record<string, string | string[]>;
|
|
1108
1355
|
type CustomNativeArgs = {
|
|
@@ -1133,6 +1380,7 @@ export interface IBlazeSDKOptions {
|
|
|
1133
1380
|
runInShadowDom?: boolean;
|
|
1134
1381
|
playerStyleCustomization?: Partial<StoryPlayerStyle>;
|
|
1135
1382
|
shouldModifyUrlWithStoryId?: boolean;
|
|
1383
|
+
shouldModifyUrlWithContentId?: boolean;
|
|
1136
1384
|
shouldDismissPlayer?: boolean;
|
|
1137
1385
|
shouldCreateUser?: boolean;
|
|
1138
1386
|
externalUserId?: string | null;
|
|
@@ -1174,7 +1422,7 @@ export interface IdsDataSourceParams {
|
|
|
1174
1422
|
}
|
|
1175
1423
|
|
|
1176
1424
|
export interface IDatabase {
|
|
1177
|
-
init: (
|
|
1425
|
+
init: () => Promise<void>;
|
|
1178
1426
|
get: <T>(tableName: string, key: string) => Promise<IResponse<T>>;
|
|
1179
1427
|
update: <T>(tableName: string, value: any) => Promise<IResponse<T>>;
|
|
1180
1428
|
}
|
|
@@ -1221,40 +1469,51 @@ export interface IHttpResponse<T = any> extends IResponse<T> {
|
|
|
1221
1469
|
httpStatus?: number;
|
|
1222
1470
|
}
|
|
1223
1471
|
|
|
1224
|
-
export
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
closedCaptionsOn:
|
|
1232
|
-
closedCaptionsOff:
|
|
1233
|
-
|
|
1234
|
-
|
|
1472
|
+
export type SvgIconData = `data:image/svg+xml;base64,${string}`;
|
|
1473
|
+
export type BaseBlazeIcons = {
|
|
1474
|
+
play: SvgIconData;
|
|
1475
|
+
pause: SvgIconData;
|
|
1476
|
+
mute: SvgIconData;
|
|
1477
|
+
unmute: SvgIconData;
|
|
1478
|
+
share: SvgIconData;
|
|
1479
|
+
closedCaptionsOn: SvgIconData;
|
|
1480
|
+
closedCaptionsOff: SvgIconData;
|
|
1481
|
+
};
|
|
1482
|
+
export type BlazeStoryIcons = BaseBlazeIcons & {
|
|
1483
|
+
fullscreen: SvgIconData;
|
|
1484
|
+
exitMobileTablet: SvgIconData;
|
|
1485
|
+
exitDesktop: SvgIconData;
|
|
1486
|
+
customActionButtonOne?: SvgIconData;
|
|
1487
|
+
customActionButtonTwo?: SvgIconData;
|
|
1235
1488
|
navigation: {
|
|
1236
|
-
nextPage:
|
|
1237
|
-
prevPage:
|
|
1238
|
-
nextStory:
|
|
1239
|
-
prevStory:
|
|
1489
|
+
nextPage: SvgIconData;
|
|
1490
|
+
prevPage: SvgIconData;
|
|
1491
|
+
nextStory: SvgIconData;
|
|
1492
|
+
prevStory: SvgIconData;
|
|
1240
1493
|
};
|
|
1241
|
-
}
|
|
1242
|
-
export
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
exit: string;
|
|
1249
|
-
like: string;
|
|
1250
|
-
unlike: string;
|
|
1251
|
-
closedCaptionsOn: string;
|
|
1252
|
-
closedCaptionsOff: string;
|
|
1494
|
+
};
|
|
1495
|
+
export type BlazeMomentIconsStyle = BaseBlazeIcons & {
|
|
1496
|
+
exit: SvgIconData;
|
|
1497
|
+
like: SvgIconData;
|
|
1498
|
+
unlike: SvgIconData;
|
|
1499
|
+
customActionButtonOne?: SvgIconData;
|
|
1500
|
+
customActionButtonTwo?: SvgIconData;
|
|
1253
1501
|
navigation: {
|
|
1254
|
-
nextMoment:
|
|
1255
|
-
prevMoment:
|
|
1502
|
+
nextMoment: SvgIconData;
|
|
1503
|
+
prevMoment: SvgIconData;
|
|
1256
1504
|
};
|
|
1257
|
-
}
|
|
1505
|
+
};
|
|
1506
|
+
export type BlazeVideoIconsStyle = BaseBlazeIcons & {
|
|
1507
|
+
exit: SvgIconData;
|
|
1508
|
+
like: SvgIconData;
|
|
1509
|
+
unlike: SvgIconData;
|
|
1510
|
+
fullscreenEnter: SvgIconData;
|
|
1511
|
+
fullscreenExit: SvgIconData;
|
|
1512
|
+
navigation: {
|
|
1513
|
+
prevVideo: SvgIconData;
|
|
1514
|
+
nextVideo: SvgIconData;
|
|
1515
|
+
};
|
|
1516
|
+
};
|
|
1258
1517
|
|
|
1259
1518
|
export * from './ad-handler.interface';
|
|
1260
1519
|
export * from './behaviors.interface';
|
|
@@ -1295,7 +1554,7 @@ export interface IWidgetLabelBuilder {
|
|
|
1295
1554
|
atLeastOneOf(...labels: Array<string | BlazeWidgetLabel>): BlazeWidgetLabel;
|
|
1296
1555
|
}
|
|
1297
1556
|
|
|
1298
|
-
export type ContentType = 'story' | 'moment';
|
|
1557
|
+
export type ContentType = 'story' | 'moment' | 'video';
|
|
1299
1558
|
export interface IWidgetViewOptionsBase {
|
|
1300
1559
|
labelsPriority?: string;
|
|
1301
1560
|
orderType?: OrderType;
|
|
@@ -1307,6 +1566,7 @@ export interface IWidgetViewOptionsBase {
|
|
|
1307
1566
|
perItemStyleOverrides?: PerItemStyleOverrides;
|
|
1308
1567
|
shouldOrderWidgetByReadStatus?: boolean;
|
|
1309
1568
|
contentIds?: string[];
|
|
1569
|
+
actionHandlers?: ActionHandler[];
|
|
1310
1570
|
}
|
|
1311
1571
|
export interface IWidgetViewOptionsWithLabels extends IWidgetViewOptionsBase {
|
|
1312
1572
|
labels: string | string[] | BlazeWidgetLabel;
|
|
@@ -1328,17 +1588,17 @@ export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptio
|
|
|
1328
1588
|
export interface IWidgetView extends HTMLElement {
|
|
1329
1589
|
setTheme: (theme: IWidgetTheme | ThemeType) => void;
|
|
1330
1590
|
getTheme: () => IWidgetTheme;
|
|
1331
|
-
setLabels: (labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions) => void;
|
|
1332
|
-
setLabelsPriority: (labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions) => void;
|
|
1333
|
-
setContentIds: (storyIds: string[], options?: ISetWidgetOptions) => void;
|
|
1334
1591
|
reload: () => void;
|
|
1335
1592
|
updateWidgetUI: () => void;
|
|
1336
1593
|
setMaxItemsDisplaySize: (size: number) => void;
|
|
1337
1594
|
setDelegations: (delegates: Record<Delegation, EventListenerOrEventListenerObject>) => void;
|
|
1338
1595
|
updateOverrideStyles: (perItemStyleOverrides: PerItemStyleOverrides) => void;
|
|
1339
1596
|
setId: (id: string) => void;
|
|
1340
|
-
setMaxItemsSize: (size: number) => void;
|
|
1341
1597
|
updateDataSource: (dataSource: BlazeDataSourceType) => void;
|
|
1598
|
+
setLabels: (labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions) => void;
|
|
1599
|
+
setLabelsPriority: (labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions) => void;
|
|
1600
|
+
setContentIds: (storyIds: string[], options?: ISetWidgetOptions) => void;
|
|
1601
|
+
setMaxItemsSize: (size: number) => void;
|
|
1342
1602
|
}
|
|
1343
1603
|
export interface ISetWidgetOptions {
|
|
1344
1604
|
shouldReloadData?: boolean;
|
|
@@ -1373,6 +1633,7 @@ declare abstract class AnalyticsServiceClass extends AnalyticsServiceClass_base
|
|
|
1373
1633
|
bulkEvent(body: Partial<AnalyticsEvent>[]): Promise<any>;
|
|
1374
1634
|
pushStoryEvent(action: StoryAction, body: Partial<StoryEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
1375
1635
|
pushMomentEvent(action: MomentAction, body: Partial<MomentEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
1636
|
+
pushVideoEvent(action: VideoAction, body: Partial<VideoEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
1376
1637
|
pushAdEvent(action: AdAction, body: Partial<AdEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
1377
1638
|
pushImaAdEvent(action: ImaAdAction, body: Partial<ImaAdEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
1378
1639
|
pushInteractionEvent(action: InteractionAction, body: Partial<InteractionEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
@@ -1389,6 +1650,7 @@ export interface ApiResponse<T> {
|
|
|
1389
1650
|
}
|
|
1390
1651
|
export type MomentsResponse = ApiResponse<IMoment>;
|
|
1391
1652
|
export type StoriesResponse = ApiResponse<IStory>;
|
|
1653
|
+
export type VideosResponse = ApiResponse<IVideo>;
|
|
1392
1654
|
declare const ApiServiceClass_base: {
|
|
1393
1655
|
new (): {};
|
|
1394
1656
|
_instance: ApiServiceClass;
|
|
@@ -1421,6 +1683,20 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1421
1683
|
setLiked: boolean;
|
|
1422
1684
|
}): Promise<void>;
|
|
1423
1685
|
getStaticStories(): Promise<IStory | null>;
|
|
1686
|
+
getVideosByIds(ids: string[], orderType?: OrderType): Promise<{
|
|
1687
|
+
httpStatus?: number | undefined;
|
|
1688
|
+
data?: VideosResponse | undefined;
|
|
1689
|
+
error?: Error | undefined;
|
|
1690
|
+
}>;
|
|
1691
|
+
getVideosByLabels(labels: string, orderType?: OrderType, maxItems?: number, labelsPriority?: string): Promise<{
|
|
1692
|
+
httpStatus?: number | undefined;
|
|
1693
|
+
data?: VideosResponse | undefined;
|
|
1694
|
+
error?: Error | undefined;
|
|
1695
|
+
}>;
|
|
1696
|
+
updateVideosLikeStatus(options: {
|
|
1697
|
+
videoId: string;
|
|
1698
|
+
setLiked: boolean;
|
|
1699
|
+
}): Promise<void>;
|
|
1424
1700
|
preview(storyId: string, publishedOnly?: boolean): Promise<import("../interfaces").IHttpResponse<IStory & {
|
|
1425
1701
|
status: number;
|
|
1426
1702
|
}>>;
|
|
@@ -1468,6 +1744,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1468
1744
|
private _staticContent;
|
|
1469
1745
|
private _runInShadowDom;
|
|
1470
1746
|
private _shouldModifyUrlWithStoryId;
|
|
1747
|
+
private _shouldModifyUrlWithContentId;
|
|
1471
1748
|
private _shouldDismissPlayer;
|
|
1472
1749
|
private _shouldAutoAdvance;
|
|
1473
1750
|
private _autoAdvanceUrl;
|
|
@@ -1509,6 +1786,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1509
1786
|
get playerStyleCustomization(): Partial<StoryPlayerStyle>;
|
|
1510
1787
|
set playerStyleCustomization(value: Partial<StoryPlayerStyle>);
|
|
1511
1788
|
get shouldModifyUrlWithStoryId(): boolean;
|
|
1789
|
+
get shouldModifyUrlWithContentId(): boolean;
|
|
1512
1790
|
get shouldDismissPlayer(): boolean;
|
|
1513
1791
|
get shouldAutoAdvance(): boolean;
|
|
1514
1792
|
get autoAdvanceUrl(): string | undefined;
|
|
@@ -1534,9 +1812,6 @@ declare const DatabaseServiceClass_base: {
|
|
|
1534
1812
|
declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base implements IService {
|
|
1535
1813
|
database: IDatabase;
|
|
1536
1814
|
init(): Promise<void>;
|
|
1537
|
-
onOpen(): Promise<void>;
|
|
1538
|
-
onError(e: Event): Promise<void>;
|
|
1539
|
-
onUpgradeNeeded(db: IDBDatabase): Promise<void>;
|
|
1540
1815
|
getUserId(): Promise<IResponse<{
|
|
1541
1816
|
id: string;
|
|
1542
1817
|
value: string;
|
|
@@ -1551,11 +1826,16 @@ declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base im
|
|
|
1551
1826
|
enrichStories(stories: IStory[]): Promise<IStory[]>;
|
|
1552
1827
|
updateInteraction(data: InteractionDB): Promise<any>;
|
|
1553
1828
|
getInteraction(id: string): Promise<IResponse<InteractionDB> | null>;
|
|
1554
|
-
|
|
1555
|
-
|
|
1829
|
+
updateMomentLike(momentId: string, isLike: boolean): Promise<IResponse | null>;
|
|
1830
|
+
getMomentLike(momentId: string): Promise<IResponse<MomentDB> | null>;
|
|
1556
1831
|
updateViewedMoment(momentId: string): Promise<any>;
|
|
1557
1832
|
getViewedMoment(momentId: string): Promise<boolean>;
|
|
1558
1833
|
enrichMoments(moments: IMoment[]): Promise<IMoment[]>;
|
|
1834
|
+
updateVideoReadStatus(videoId: string, poster: string): Promise<void>;
|
|
1835
|
+
getVideoData(videoId: string): Promise<VideoDBData | null>;
|
|
1836
|
+
updateVideoData(videoId: string, data: Partial<VideoDBData>): Promise<void>;
|
|
1837
|
+
getVideoLike(videoId: string): Promise<IResponse<VideoDBData> | null>;
|
|
1838
|
+
getVideoPosterById(videoId: string): Promise<string | undefined>;
|
|
1559
1839
|
}
|
|
1560
1840
|
export declare const DatabaseService: DatabaseServiceClass;
|
|
1561
1841
|
|
|
@@ -1631,6 +1911,7 @@ export * from './startup.service';
|
|
|
1631
1911
|
export * from './user.service';
|
|
1632
1912
|
export * from './video-cache.service';
|
|
1633
1913
|
export * from './video-player.service';
|
|
1914
|
+
export * from './video.service';
|
|
1634
1915
|
export * from './widgets.service';
|
|
1635
1916
|
export * from './moment.service';
|
|
1636
1917
|
export * from './story.service';
|
|
@@ -1656,8 +1937,10 @@ declare const LikeServiceClass_base: {
|
|
|
1656
1937
|
declare abstract class LikeServiceClass extends LikeServiceClass_base implements IService {
|
|
1657
1938
|
constructor();
|
|
1658
1939
|
init(): Promise<void>;
|
|
1659
|
-
|
|
1660
|
-
|
|
1940
|
+
updateMomentLike(isLike: boolean, momentId: string): Promise<void>;
|
|
1941
|
+
isMomentLiked(momentId: string): Promise<boolean>;
|
|
1942
|
+
updateVideoLike(isLike: boolean, videoId: string): Promise<void>;
|
|
1943
|
+
isVideoLiked(videoId: string): Promise<boolean>;
|
|
1661
1944
|
}
|
|
1662
1945
|
export declare const LikeService: LikeServiceClass;
|
|
1663
1946
|
|
|
@@ -1805,8 +2088,8 @@ declare abstract class VideoPlayerServiceClass extends VideoPlayerServiceClass_b
|
|
|
1805
2088
|
private _isClosedCaptioningEnabled;
|
|
1806
2089
|
private _playReference;
|
|
1807
2090
|
private _currentPlayedContentId;
|
|
2091
|
+
private _playerLayoutDisplay;
|
|
1808
2092
|
muteStateBeforeAd: 'mute' | 'unmute' | 'no-ad';
|
|
1809
|
-
playerLoadingSpinner: HTMLElement | undefined;
|
|
1810
2093
|
constructor();
|
|
1811
2094
|
init(): Promise<void>;
|
|
1812
2095
|
get isMuted(): boolean;
|
|
@@ -1824,11 +2107,29 @@ declare abstract class VideoPlayerServiceClass extends VideoPlayerServiceClass_b
|
|
|
1824
2107
|
set isModalOpen(value: boolean);
|
|
1825
2108
|
get isSeekBarDragging(): boolean;
|
|
1826
2109
|
set isSeekBarDragging(value: boolean);
|
|
1827
|
-
get
|
|
1828
|
-
set
|
|
2110
|
+
get isClosedCaptionsEnabled(): boolean;
|
|
2111
|
+
set isClosedCaptionsEnabled(value: boolean);
|
|
2112
|
+
get playerLayout(): PlayerLayoutDisplay;
|
|
2113
|
+
set playerLayout(value: PlayerLayoutDisplay);
|
|
1829
2114
|
}
|
|
1830
2115
|
export declare const VideoPlayerService: VideoPlayerServiceClass;
|
|
1831
2116
|
|
|
2117
|
+
declare const VideoServiceClass_base: {
|
|
2118
|
+
new (): {};
|
|
2119
|
+
_instance: VideoServiceClass;
|
|
2120
|
+
getInstance(): VideoServiceClass;
|
|
2121
|
+
};
|
|
2122
|
+
declare abstract class VideoServiceClass extends VideoServiceClass_base implements IService {
|
|
2123
|
+
init(): Promise<void>;
|
|
2124
|
+
private loadHlsScript;
|
|
2125
|
+
fetchContent(dataSource: BlazeDataSourceType): Promise<VideosResponse>;
|
|
2126
|
+
enrichVideos(videos: IVideo[]): Promise<IVideo[]>;
|
|
2127
|
+
getVideoDataById(videoId: string): Promise<VideoDBData | null>;
|
|
2128
|
+
updateVideoDataById(videoId: string, data: Partial<VideoDBData>): Promise<void>;
|
|
2129
|
+
markVideoAsViewed(videoId: string, poster: string): Promise<void>;
|
|
2130
|
+
}
|
|
2131
|
+
export declare const VideoService: VideoServiceClass;
|
|
2132
|
+
|
|
1832
2133
|
declare const WidgetsServiceClass_base: {
|
|
1833
2134
|
new (): {};
|
|
1834
2135
|
_instance: WidgetsServiceClass;
|
|
@@ -1864,6 +2165,7 @@ export declare class Presets {
|
|
|
1864
2165
|
static Default: LayoutStyle;
|
|
1865
2166
|
static DefaultStoryStyle: StoryPlayerStyle;
|
|
1866
2167
|
static DefaultMomentStyle: MomentPlayerStyle;
|
|
2168
|
+
static DefaultVideoStyle: VideoPlayerStyle;
|
|
1867
2169
|
}
|
|
1868
2170
|
|
|
1869
2171
|
export interface IndicatorStyle {
|
|
@@ -1975,6 +2277,13 @@ type BlazeMomentsPlayerButtonsStyle = {
|
|
|
1975
2277
|
share: BlazeMomentsPlayerButtonStyle;
|
|
1976
2278
|
like_unlike: BlazeMomentsPlayerButtonStyle;
|
|
1977
2279
|
closed_captions: BlazeMomentsPlayerButtonStyle;
|
|
2280
|
+
custom_action_button_one: BlazeMomentsPlayerButtonStyle;
|
|
2281
|
+
custom_action_button_two: BlazeMomentsPlayerButtonStyle;
|
|
2282
|
+
};
|
|
2283
|
+
type BlazeMomentsPlayerButtonStyle = {
|
|
2284
|
+
mobile: BlazeMomentsPlayerButtonDeviceStyle;
|
|
2285
|
+
tablet: BlazeMomentsPlayerButtonDeviceStyle;
|
|
2286
|
+
desktop: BlazeMomentsPlayerButtonDeviceStyle;
|
|
1978
2287
|
};
|
|
1979
2288
|
export type BlazeMomentsPlayerButtonDeviceStyle = {
|
|
1980
2289
|
width: string;
|
|
@@ -1985,13 +2294,44 @@ export type BlazeMomentsPlayerButtonDeviceStyle = {
|
|
|
1985
2294
|
borderRadius: string;
|
|
1986
2295
|
backgroundColor: string;
|
|
1987
2296
|
};
|
|
1988
|
-
type
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2297
|
+
export type BlazeButtonDeviceStyle = {
|
|
2298
|
+
width: string;
|
|
2299
|
+
height: string;
|
|
2300
|
+
color: string;
|
|
2301
|
+
padding: string;
|
|
2302
|
+
isVisible: boolean;
|
|
2303
|
+
borderRadius: string;
|
|
2304
|
+
backgroundColor: string;
|
|
2305
|
+
};
|
|
2306
|
+
export type BlazeButtonStyle = {
|
|
2307
|
+
mobile: BlazeButtonDeviceStyle;
|
|
2308
|
+
tablet: BlazeButtonDeviceStyle;
|
|
2309
|
+
desktop: BlazeButtonDeviceStyle;
|
|
2310
|
+
};
|
|
2311
|
+
export type BlazeTextDeviceStyle = {
|
|
2312
|
+
fontSize: string;
|
|
2313
|
+
fontWeight: FontWeightType;
|
|
2314
|
+
lineHeight?: string;
|
|
2315
|
+
letterSpacing?: string;
|
|
2316
|
+
textTransform?: TextTransformType;
|
|
2317
|
+
};
|
|
2318
|
+
export type BlazeTextStyle = {
|
|
2319
|
+
mobile: BlazeTextDeviceStyle;
|
|
2320
|
+
tablet: BlazeTextDeviceStyle;
|
|
2321
|
+
desktop: BlazeTextDeviceStyle;
|
|
2322
|
+
};
|
|
2323
|
+
export type BlazeVideosPlayerButtonsStyle = {
|
|
2324
|
+
mute_unmute: BlazeButtonStyle;
|
|
2325
|
+
exit: BlazeButtonStyle;
|
|
2326
|
+
share: BlazeButtonStyle;
|
|
2327
|
+
like_unlike: BlazeButtonStyle;
|
|
2328
|
+
closed_captions: BlazeButtonStyle;
|
|
2329
|
+
play_pause: BlazeButtonStyle;
|
|
2330
|
+
prev_next: BlazeButtonStyle;
|
|
2331
|
+
fullscreen: BlazeButtonStyle;
|
|
1992
2332
|
};
|
|
1993
2333
|
export type BlazeMomentsPlayerCtaStyle = {
|
|
1994
|
-
|
|
2334
|
+
borderRadius: string;
|
|
1995
2335
|
textSize: string;
|
|
1996
2336
|
font: string;
|
|
1997
2337
|
fontWeight: FontWeightType;
|
|
@@ -1999,6 +2339,9 @@ export type BlazeMomentsPlayerCtaStyle = {
|
|
|
1999
2339
|
layoutPositioning: BlazeMomentsPlayerCTAPositioning;
|
|
2000
2340
|
horizontalAlignment: BlazeMomentsPlayerCTAHorizontalAlignment;
|
|
2001
2341
|
icon: BlazeMomentsPlayerCtaIconStyle;
|
|
2342
|
+
fontFamily: string;
|
|
2343
|
+
backgroundColor?: string;
|
|
2344
|
+
borderColor?: string;
|
|
2002
2345
|
};
|
|
2003
2346
|
type BlazeMomentsPlayerCTAPositioning = 'CTA_BELLOW_BOTTOM_BUTTONS_BOX' | 'CTA_NEXT_TO_BOTTOM_BUTTONS_BOX';
|
|
2004
2347
|
type BlazeMomentsPlayerCTAHorizontalAlignment = 'START' | 'CENTER' | 'END' | 'FULL_AVAILABLE_WIDTH';
|
|
@@ -2014,14 +2357,15 @@ type BlazeSeekBarStyle = {
|
|
|
2014
2357
|
isThumbVisible: boolean;
|
|
2015
2358
|
backgroundColor: string;
|
|
2016
2359
|
progressColor: string;
|
|
2360
|
+
bufferProgressColor?: string;
|
|
2017
2361
|
height: string;
|
|
2018
|
-
|
|
2362
|
+
borderRadius: string;
|
|
2019
2363
|
thumbColor: string;
|
|
2020
2364
|
thumbSize: string;
|
|
2021
2365
|
};
|
|
2022
2366
|
export type BlazeMomentsPlayerSeekBarStyle = {
|
|
2023
2367
|
isVisible: boolean;
|
|
2024
|
-
|
|
2368
|
+
verticalSpacing: string;
|
|
2025
2369
|
horizontalSpacing: string;
|
|
2026
2370
|
playingState: BlazeSeekBarStyle;
|
|
2027
2371
|
pausedState: BlazeSeekBarStyle;
|
|
@@ -2038,6 +2382,45 @@ export interface MomentPlayerStyle {
|
|
|
2038
2382
|
seekBar: BlazeMomentsPlayerSeekBarStyle;
|
|
2039
2383
|
ctaButton: BlazeMomentsPlayerCtaStyle;
|
|
2040
2384
|
}
|
|
2385
|
+
export interface VideoPlayerStyle {
|
|
2386
|
+
headingText: BlazeVideosPlayerHeadingTextStyle;
|
|
2387
|
+
buttons: BlazeVideosPlayerButtonsStyle;
|
|
2388
|
+
backgroundColor: string;
|
|
2389
|
+
cta: BlazeVideosPlayerCtaStyle;
|
|
2390
|
+
seekBar: BlazeVideosPlayerSeekBarStyle;
|
|
2391
|
+
icons: BlazeVideoIconsStyle;
|
|
2392
|
+
}
|
|
2393
|
+
export type BlazeVideosPlayerHeadingTextStyle = {
|
|
2394
|
+
textStyle: BlazeTextStyle;
|
|
2395
|
+
contentSource: 'TITLE';
|
|
2396
|
+
isVisible: boolean;
|
|
2397
|
+
font: string;
|
|
2398
|
+
textColor: string;
|
|
2399
|
+
};
|
|
2400
|
+
export interface BlazeVideosPlayerSeekBarStyle {
|
|
2401
|
+
isVisible: boolean;
|
|
2402
|
+
verticalMargin: string;
|
|
2403
|
+
horizontalMargin: string;
|
|
2404
|
+
playingState: BlazeSeekBarStyle;
|
|
2405
|
+
pausedState: BlazeSeekBarStyle;
|
|
2406
|
+
}
|
|
2407
|
+
export interface BlazeVideosPlayerCtaStyle {
|
|
2408
|
+
borderRadius: string;
|
|
2409
|
+
text: BlazeTextStyle;
|
|
2410
|
+
fontFamily?: string;
|
|
2411
|
+
height: string;
|
|
2412
|
+
icon: BlazeVideosPlayerCtaIconStyle;
|
|
2413
|
+
visibility: BlazeVideoPlayerVisibility;
|
|
2414
|
+
borderColor: string;
|
|
2415
|
+
horizontalAlignment: ButtonPositionType;
|
|
2416
|
+
}
|
|
2417
|
+
export type BlazeVideosPlayerCtaIconStyle = {
|
|
2418
|
+
position: 'START';
|
|
2419
|
+
color: string;
|
|
2420
|
+
url: string;
|
|
2421
|
+
size: string;
|
|
2422
|
+
isVisible: boolean;
|
|
2423
|
+
};
|
|
2041
2424
|
export interface CtaButtonStyle {
|
|
2042
2425
|
isAnimated: boolean;
|
|
2043
2426
|
isDisplayCtaModal: boolean;
|
|
@@ -2061,7 +2444,7 @@ export interface IconStyle {
|
|
|
2061
2444
|
size: string;
|
|
2062
2445
|
color: string;
|
|
2063
2446
|
}
|
|
2064
|
-
export interface IWidgetTheme<T = MomentPlayerStyle | StoryPlayerStyle> {
|
|
2447
|
+
export interface IWidgetTheme<T = MomentPlayerStyle | StoryPlayerStyle | VideoPlayerStyle> {
|
|
2065
2448
|
layoutStyle: LayoutStyle;
|
|
2066
2449
|
playerStyle: T;
|
|
2067
2450
|
}
|
|
@@ -2085,12 +2468,23 @@ export type ThemeType = 'grid-2-columns' | 'grid-3-columns' | 'row-circle' | 'ro
|
|
|
2085
2468
|
export declare class ThemeFactory {
|
|
2086
2469
|
static create(name: ThemeType, contentType: 'moment'): IWidgetTheme<MomentPlayerStyle>;
|
|
2087
2470
|
static create(name: ThemeType, contentType: 'story'): IWidgetTheme<StoryPlayerStyle>;
|
|
2471
|
+
static create(name: ThemeType, contentType: 'video'): IWidgetTheme<VideoPlayerStyle>;
|
|
2088
2472
|
static create(name: ThemeType): IWidgetTheme<StoryPlayerStyle>;
|
|
2089
2473
|
}
|
|
2090
|
-
export declare function isStoryPlayerStyle(playerStyle: StoryPlayerStyle | MomentPlayerStyle): playerStyle is StoryPlayerStyle;
|
|
2091
|
-
export declare function isMomentPlayerStyle(playerStyle: StoryPlayerStyle | MomentPlayerStyle): playerStyle is MomentPlayerStyle;
|
|
2474
|
+
export declare function isStoryPlayerStyle(playerStyle: StoryPlayerStyle | MomentPlayerStyle | VideoPlayerStyle): playerStyle is StoryPlayerStyle;
|
|
2475
|
+
export declare function isMomentPlayerStyle(playerStyle: StoryPlayerStyle | MomentPlayerStyle | VideoPlayerStyle): playerStyle is MomentPlayerStyle;
|
|
2476
|
+
export declare function isVideoPlayerStyle(playerStyle: StoryPlayerStyle | MomentPlayerStyle | VideoPlayerStyle): playerStyle is VideoPlayerStyle;
|
|
2092
2477
|
|
|
2093
2478
|
|
|
2479
|
+
export type CustomActionButtonOptions = {
|
|
2480
|
+
buttonName: string;
|
|
2481
|
+
onClick: (e: MouseEvent | Event, data: ContentEntities | null) => void;
|
|
2482
|
+
};
|
|
2483
|
+
export type ActionHandler = {
|
|
2484
|
+
actionId: `${ActionHandlerId}`;
|
|
2485
|
+
options: CustomActionButtonOptions;
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2094
2488
|
export type AnimationType = 'Growing' | 'Shrinking' | 'BottomToTop';
|
|
2095
2489
|
export declare const animationCssMapper: {
|
|
2096
2490
|
Growing: string;
|
|
@@ -2454,9 +2848,9 @@ export type ButtonPositionType = 'LEFT' | 'CENTER' | 'RIGHT';
|
|
|
2454
2848
|
export declare const positionMap: {
|
|
2455
2849
|
[key: string]: string;
|
|
2456
2850
|
};
|
|
2457
|
-
export type IconButtonType = 'MUTE_UNMUTE' | 'PLAY_PAUSE' | 'SHARE' | 'FULLSCREEN' | 'EXIT_PLAYER' | 'CLOSED_CAPTIONS' | 'LIKE_UNLIKE';
|
|
2458
|
-
export type MomentTopContainerIconButtonType = 'MUTE_UNMUTE' | 'EXIT_PLAYER';
|
|
2459
|
-
export type MomentBottomContainerIconButtonType = 'SHARE' | 'LIKE_UNLIKE' | 'CLOSED_CAPTIONS';
|
|
2851
|
+
export type IconButtonType = 'MUTE_UNMUTE' | 'PLAY_PAUSE' | 'SHARE' | 'FULLSCREEN' | 'EXIT_PLAYER' | 'CLOSED_CAPTIONS' | 'LIKE_UNLIKE' | 'CUSTOM_ACTION_BUTTON_ONE' | 'CUSTOM_ACTION_BUTTON_TWO';
|
|
2852
|
+
export type MomentTopContainerIconButtonType = 'MUTE_UNMUTE' | 'EXIT_PLAYER' | 'CUSTOM_ACTION_BUTTON_ONE' | 'CUSTOM_ACTION_BUTTON_TWO';
|
|
2853
|
+
export type MomentBottomContainerIconButtonType = 'SHARE' | 'LIKE_UNLIKE' | 'CLOSED_CAPTIONS' | 'CUSTOM_ACTION_BUTTON_ONE' | 'CUSTOM_ACTION_BUTTON_TWO';
|
|
2460
2854
|
export type IconPropertiesType = {
|
|
2461
2855
|
value: IconButtonType | StoryDirectionType;
|
|
2462
2856
|
embeddedSize?: string;
|
|
@@ -2485,6 +2879,16 @@ export type IClosedCaption = {
|
|
|
2485
2879
|
export type FontWeightType = 'normal' | 'bold' | 'bolder' | 'lighter' | 'inherit' | 'initial' | 'unset' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
2486
2880
|
export type TextTransformType = 'capitalize' | 'uppercase' | 'lowercase' | 'none';
|
|
2487
2881
|
|
|
2882
|
+
export type CtaVisibilityBehavior = 'AlwaysVisible' | 'VisibleAfterOverlayHidden';
|
|
2883
|
+
export type BlazeVideoPlayerVisibility = {
|
|
2884
|
+
duration: number;
|
|
2885
|
+
behavior: CtaVisibilityBehavior;
|
|
2886
|
+
};
|
|
2887
|
+
export type CtaConfiguration = {
|
|
2888
|
+
type: CtaVisibilityBehavior;
|
|
2889
|
+
visibile_duration: number;
|
|
2890
|
+
};
|
|
2891
|
+
|
|
2488
2892
|
export type Direction = 'VerticalBackwards' | 'VerticalForwards' | 'HorizontalForwards' | 'HorizontalBackwards';
|
|
2489
2893
|
export type NavigationType = 'Automatic' | 'Manual' | '';
|
|
2490
2894
|
export type NavigationDirectionType = 'Forwards' | 'Backwards' | '';
|
|
@@ -2498,23 +2902,33 @@ export type EnvironmentType = 'prod' | 'uat';
|
|
|
2498
2902
|
export type StoryGestureType = 'Swipe Up' | 'CTA Click';
|
|
2499
2903
|
export type MomentGestureType = 'CTA Click';
|
|
2500
2904
|
|
|
2905
|
+
export * from './animation.type';
|
|
2501
2906
|
export * from './attribute-parser';
|
|
2502
2907
|
export * from './button.type';
|
|
2908
|
+
export * from './chip-status.type';
|
|
2503
2909
|
export * from './client-platform.type';
|
|
2910
|
+
export * from './closed-captions.type';
|
|
2504
2911
|
export * from './css.type';
|
|
2912
|
+
export * from './cta.type';
|
|
2505
2913
|
export * from './direction.type';
|
|
2506
2914
|
export * from './element.type';
|
|
2507
2915
|
export * from './environment.type';
|
|
2916
|
+
export * from './gesture.type';
|
|
2508
2917
|
export * from './item.type';
|
|
2509
2918
|
export * from './label.type';
|
|
2510
2919
|
export * from './locale.type';
|
|
2511
2920
|
export * from './order.type';
|
|
2921
|
+
export * from './platform.type';
|
|
2512
2922
|
export * from './play.type';
|
|
2923
|
+
export * from './player-layout.type';
|
|
2513
2924
|
export * from './position.type';
|
|
2925
|
+
export * from './prefetch.type';
|
|
2926
|
+
export * from './ratio.type';
|
|
2514
2927
|
export * from './severity.type';
|
|
2515
2928
|
export * from './size.type';
|
|
2516
2929
|
export * from './story-direction.type';
|
|
2517
2930
|
export * from './thumbnail.type';
|
|
2931
|
+
export * from './trigger.type';
|
|
2518
2932
|
export * from './user.type';
|
|
2519
2933
|
export * from './widget.type';
|
|
2520
2934
|
export * from './chip-status.type';
|
|
@@ -2524,6 +2938,8 @@ export * from './gesture.type';
|
|
|
2524
2938
|
export * from './closed-captions.type';
|
|
2525
2939
|
export * from './ratio.type';
|
|
2526
2940
|
export * from './animation.type';
|
|
2941
|
+
export * from './screen.type';
|
|
2942
|
+
export * from './action-handler.type';
|
|
2527
2943
|
|
|
2528
2944
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
|
|
2529
2945
|
export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
@@ -2538,9 +2954,13 @@ export type LocaleDirectionType = 'LTR' | 'RTL';
|
|
|
2538
2954
|
export type OrderType = 'Manual' | 'AtoZ' | 'ZtoA' | 'RecentlyUpdatedFirst' | 'RecentlyUpdatedLast' | 'RecentlyCreatedFirst' | 'RecentlyCreatedLast';
|
|
2539
2955
|
export type ContentOrderType = 'LIVE_CHIP' | 'STORY_TITLE' | 'PUBLISHED_DATE';
|
|
2540
2956
|
|
|
2957
|
+
export type Platform = 'mobile' | 'tablet' | 'desktop';
|
|
2958
|
+
|
|
2541
2959
|
export declare const PlayTypeArray: readonly ["Widget", "Share", "SingleStory", "AutoAdvance"];
|
|
2542
2960
|
export type PlayType = typeof PlayTypeArray[number];
|
|
2543
2961
|
|
|
2962
|
+
export type PlayerLayoutDisplay = 'fullscreen' | 'normal';
|
|
2963
|
+
|
|
2544
2964
|
export type PositionInsideType = 'insideTopLeft' | 'insideTopRight' | 'insideTop' | 'insideTopMiddle' | 'insideBottomRight' | 'insideBottomLeft' | 'insideBottom' | 'insideBottomMiddle' | 'insideMiddle' | 'insideMiddleLeft' | 'insideMiddleRight';
|
|
2545
2965
|
export type PositionOutsideType = 'outsideTop' | 'outsideTopLeft' | 'outsideTopRight' | 'outsideBottomLeft' | 'outsideBottomRight' | 'outsideBottom' | 'outsideRight' | 'outsideLeft';
|
|
2546
2966
|
export type PositionType = PositionInsideType | PositionOutsideType;
|
|
@@ -2557,6 +2977,17 @@ export type PrefetchingPolicyType = 'low' | 'default';
|
|
|
2557
2977
|
|
|
2558
2978
|
export type ContentAspectRatio = 'Vertical' | 'Horizontal';
|
|
2559
2979
|
|
|
2980
|
+
export type ScreenState = 'out_of_screen' | 'full_screen';
|
|
2981
|
+
export type ScreenChangeState = {
|
|
2982
|
+
current_state: ScreenState;
|
|
2983
|
+
next_state?: ScreenState;
|
|
2984
|
+
};
|
|
2985
|
+
export type DeviceScreenOrientation = 'landscape' | 'portrait';
|
|
2986
|
+
export type DeviceScreenOrientationChangeEvent = {
|
|
2987
|
+
orientation: DeviceScreenOrientation;
|
|
2988
|
+
changedAt: number;
|
|
2989
|
+
};
|
|
2990
|
+
|
|
2560
2991
|
export type SeverityType = 'error' | 'warning' | 'info' | 'success';
|
|
2561
2992
|
|
|
2562
2993
|
export type SizeType = 'small' | 'medium' | 'large';
|
|
@@ -2569,7 +3000,7 @@ export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'CUSTOM';
|
|
|
2569
3000
|
export type ThumbnailShape = 'Circle' | 'Rectangle';
|
|
2570
3001
|
export declare function thumbnailMapping(thumbnailType: ThumbnailType): ThumbnailApiType;
|
|
2571
3002
|
|
|
2572
|
-
export type ExitTriggerType = 'Swipe' | 'Swipe Left' | 'Swipe Right' | 'Swipe Down' | 'Swipe Up' | 'Skip' | 'Close Button' | 'CTA Click' | 'Escape Button' | 'Stories Completed' | 'Story Completed' | '';
|
|
3003
|
+
export type ExitTriggerType = 'Swipe' | 'Swipe Left' | 'Swipe Right' | 'Swipe Down' | 'Swipe Up' | 'Skip' | 'Close Button' | 'CTA Click' | 'Escape Button' | 'Stories Completed' | 'Story Completed' | 'Video End' | '';
|
|
2573
3004
|
export type StartTriggerType = 'Embedded Player in Viewport' | 'UI Button' | 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'SingleStory' | 'Share' | 'AutoAdvance' | '';
|
|
2574
3005
|
|
|
2575
3006
|
export type GetUserTokenRequest = {
|
|
@@ -2586,6 +3017,8 @@ export type TokenData = {
|
|
|
2586
3017
|
|
|
2587
3018
|
export type WidgetType = 'Row' | 'Grid';
|
|
2588
3019
|
|
|
3020
|
+
export declare function isImaAdInfo(ad: IAdInfo): ad is IImaAdInfo;
|
|
3021
|
+
|
|
2589
3022
|
interface ChipSizeOptions {
|
|
2590
3023
|
statusLiveStyle: IndicatorStyle;
|
|
2591
3024
|
statusLiveUnreadStyle: IndicatorStyle;
|
|
@@ -2650,6 +3083,7 @@ export * from './helper';
|
|
|
2650
3083
|
export * from './regex.utils';
|
|
2651
3084
|
export * from './stopwatch';
|
|
2652
3085
|
export * from './position.utils';
|
|
3086
|
+
export * from './ad-info.utils';
|
|
2653
3087
|
|
|
2654
3088
|
export declare function calculatePosition(statusIndicatorPosition: PositionType): {
|
|
2655
3089
|
isOutside: boolean;
|
|
@@ -2663,6 +3097,7 @@ export declare function calculatePosition(statusIndicatorPosition: PositionType)
|
|
|
2663
3097
|
|
|
2664
3098
|
export declare const RegexStoryHash: RegExp;
|
|
2665
3099
|
export declare const RegexMomentHash: RegExp;
|
|
3100
|
+
export declare const RegexVideoHash: RegExp;
|
|
2666
3101
|
|
|
2667
3102
|
export declare class Stopwatch {
|
|
2668
3103
|
isRunning: boolean;
|
|
@@ -2675,10 +3110,665 @@ export declare class Stopwatch {
|
|
|
2675
3110
|
reset(): void;
|
|
2676
3111
|
}
|
|
2677
3112
|
|
|
3113
|
+
export * from './commands/player-buttons.command';
|
|
3114
|
+
export * from './commands/video-commands';
|
|
3115
|
+
export * from './components/timer';
|
|
3116
|
+
export * from './components/video-seekbar';
|
|
3117
|
+
export * from './controls/long-form-player-overlay';
|
|
3118
|
+
export * from './controls/video-navigation-overlay';
|
|
3119
|
+
export * from './core/video';
|
|
3120
|
+
export * from './core/video-modal';
|
|
3121
|
+
export * from './core/video-player';
|
|
3122
|
+
export * from './factory/playback-strategy.factory';
|
|
3123
|
+
export * from './strategy/hls.strategy';
|
|
3124
|
+
export * from './interface/playback-strategy.interface';
|
|
3125
|
+
export * from './video-events';
|
|
3126
|
+
|
|
3127
|
+
export declare const KEY_CODES: {
|
|
3128
|
+
ARROW_UP: string;
|
|
3129
|
+
UP: string;
|
|
3130
|
+
PAGE_UP: string;
|
|
3131
|
+
ARROW_DOWN: string;
|
|
3132
|
+
DOWN: string;
|
|
3133
|
+
PAGE_DOWN: string;
|
|
3134
|
+
SPACE: string;
|
|
3135
|
+
ARROW_LEFT: string;
|
|
3136
|
+
ARROW_RIGHT: string;
|
|
3137
|
+
ESCAPE: string;
|
|
3138
|
+
};
|
|
3139
|
+
export declare const EVENTS: {
|
|
3140
|
+
KEYDOWN: string;
|
|
3141
|
+
CLICK: string;
|
|
3142
|
+
MOUSEENTER: string;
|
|
3143
|
+
MOUSELEAVE: string;
|
|
3144
|
+
MOUSEMOVE: string;
|
|
3145
|
+
BLUR: string;
|
|
3146
|
+
FOCUS: string;
|
|
3147
|
+
VISIBILITY_CHANGE: string;
|
|
3148
|
+
CAN_PLAY_THROUGH: string;
|
|
3149
|
+
PLAY: string;
|
|
3150
|
+
PLAYING: string;
|
|
3151
|
+
PAUSE: string;
|
|
3152
|
+
PAUSED: string;
|
|
3153
|
+
SEEKING: string;
|
|
3154
|
+
SEEKED: string;
|
|
3155
|
+
LOADED_METADATA: string;
|
|
3156
|
+
RESIZE: string;
|
|
3157
|
+
TIMEUPDATE: string;
|
|
3158
|
+
ERROR: string;
|
|
3159
|
+
ENDED: string;
|
|
3160
|
+
FULLSCREEN_CHANGE: string;
|
|
3161
|
+
FULLSCREEN_CHANGE_WEBKIT: string;
|
|
3162
|
+
FULLSCREEN_CHANGE_MOZ: string;
|
|
3163
|
+
CUE_CHANGE: string;
|
|
3164
|
+
DRAGSTART: string;
|
|
3165
|
+
DRAG: string;
|
|
3166
|
+
DROP: string;
|
|
3167
|
+
BEFOREUNLOAD: string;
|
|
3168
|
+
UNLOAD: string;
|
|
3169
|
+
RESIZE_WINDOW: string;
|
|
3170
|
+
};
|
|
3171
|
+
export declare const VIDEO_EVENTS: {
|
|
3172
|
+
readonly PLAY: "play-video";
|
|
3173
|
+
readonly PAUSE: "pause-video";
|
|
3174
|
+
readonly MUTE: "mute-video";
|
|
3175
|
+
readonly UNMUTE: "unmute-video";
|
|
3176
|
+
readonly SEEK: "seek-video";
|
|
3177
|
+
readonly FULLSCREEN: "fullscreen-video";
|
|
3178
|
+
readonly SHARE: "share-video";
|
|
3179
|
+
readonly LIKE: "like-video";
|
|
3180
|
+
readonly TIME_UPDATE: "time-update";
|
|
3181
|
+
readonly NAVIGATION_PREV: "navigate-prev";
|
|
3182
|
+
readonly NAVIGATION_NEXT: "navigate-next";
|
|
3183
|
+
readonly LOADER_DISPLAY: "loader-display";
|
|
3184
|
+
readonly LOADER_HIDE: "loader-hide";
|
|
3185
|
+
readonly ERROR: "video-error";
|
|
3186
|
+
readonly UPDATE_NAVIGATION: "update-navigation";
|
|
3187
|
+
readonly CTA_CLICKED: "cta-clicked";
|
|
3188
|
+
readonly CTA_VISIBILE: "cta-visible";
|
|
3189
|
+
readonly CTA_DISMISS: "cta-dismiss";
|
|
3190
|
+
readonly RESET_INACTIVITY_TIMER: "reset-inactivity-timer";
|
|
3191
|
+
readonly CLOSE_PLAYER: "close-player";
|
|
3192
|
+
readonly CLOSED_CAPTIONS_ON: "closed-captions";
|
|
3193
|
+
readonly CLOSED_CAPTIONS_OFF: "closed-captions-off";
|
|
3194
|
+
readonly DISPLAY_HIDE_OVERLAY_FROM_CTA: "display-hide-overlay-from-cta";
|
|
3195
|
+
readonly DISPLAY_SEEKED_TIME: "display-seeked-time";
|
|
3196
|
+
readonly UPDATE_CLOSED_CAPTIONS_LOCATION: "update-closed-captions-location";
|
|
3197
|
+
};
|
|
3198
|
+
|
|
3199
|
+
export interface Command {
|
|
3200
|
+
execute(...args: any[]): void;
|
|
3201
|
+
}
|
|
3202
|
+
export declare class PlayCommand implements Command {
|
|
3203
|
+
private playbackStrategy;
|
|
3204
|
+
constructor(playbackStrategy: PlaybackStrategy);
|
|
3205
|
+
execute(...args: any[]): Promise<PlayResult>;
|
|
3206
|
+
}
|
|
3207
|
+
export declare class PauseCommand implements Command {
|
|
3208
|
+
private playbackStrategy;
|
|
3209
|
+
constructor(playbackStrategy: PlaybackStrategy);
|
|
3210
|
+
execute(...args: any[]): void;
|
|
3211
|
+
}
|
|
3212
|
+
export declare class ToggleMuteCommand implements Command {
|
|
3213
|
+
private playbackStrategy;
|
|
3214
|
+
constructor(playbackStrategy: PlaybackStrategy);
|
|
3215
|
+
execute(...args: any[]): void;
|
|
3216
|
+
}
|
|
3217
|
+
export declare class MuteCommand implements Command {
|
|
3218
|
+
private playbackStrategy;
|
|
3219
|
+
constructor(playbackStrategy: PlaybackStrategy);
|
|
3220
|
+
execute(): void;
|
|
3221
|
+
}
|
|
3222
|
+
export declare class UnmuteCommand implements Command {
|
|
3223
|
+
private playbackStrategy;
|
|
3224
|
+
constructor(playbackStrategy: PlaybackStrategy);
|
|
3225
|
+
execute(): void;
|
|
3226
|
+
}
|
|
3227
|
+
export declare class ToggleFullscreenCommand implements Command {
|
|
3228
|
+
private playbackStrategy;
|
|
3229
|
+
private videoElement;
|
|
3230
|
+
constructor(playbackStrategy: PlaybackStrategy, videoElement: BlazeVideoElement);
|
|
3231
|
+
execute(...args: any[]): Promise<void>;
|
|
3232
|
+
}
|
|
3233
|
+
export declare class SeekCommand implements Command {
|
|
3234
|
+
private playbackStrategy;
|
|
3235
|
+
constructor(playbackStrategy: PlaybackStrategy);
|
|
3236
|
+
execute(seekTime: number): void;
|
|
3237
|
+
}
|
|
3238
|
+
export declare class LikeVideoCommand implements Command {
|
|
3239
|
+
private videoElement;
|
|
3240
|
+
constructor(videoElement: BlazeVideoElement);
|
|
3241
|
+
execute(...args: any[]): Promise<void>;
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
export declare class VideoPlayerCommands {
|
|
3245
|
+
private playbackStrategy;
|
|
3246
|
+
private videoElement;
|
|
3247
|
+
private commands;
|
|
3248
|
+
constructor(playbackStrategy: PlaybackStrategy, videoElement: BlazeVideoElement);
|
|
3249
|
+
executeCommand(commandName: string, ...args: any[]): Promise<any>;
|
|
3250
|
+
}
|
|
3251
|
+
|
|
3252
|
+
export type TimerLayout = 'player' | 'seeking';
|
|
3253
|
+
interface IBlazeTimer {
|
|
3254
|
+
updateCurrentTime(currentTime: number): void;
|
|
3255
|
+
updateTotalTime(totalTime: number): void;
|
|
3256
|
+
resetTimer(): void;
|
|
3257
|
+
setLayout(layout: TimerLayout): void;
|
|
3258
|
+
}
|
|
3259
|
+
export declare class BlazeTimer extends HTMLElement implements IBlazeTimer {
|
|
3260
|
+
private shadow;
|
|
3261
|
+
private currentTimeText;
|
|
3262
|
+
private totalTimeText;
|
|
3263
|
+
private totalTimeDivider;
|
|
3264
|
+
constructor();
|
|
3265
|
+
connectedCallback(): void;
|
|
3266
|
+
disconnectedCallback(): void;
|
|
3267
|
+
set hidden(value: boolean);
|
|
3268
|
+
private attachStyles;
|
|
3269
|
+
private createDOM;
|
|
3270
|
+
updateCurrentTime(currentTime: number): void;
|
|
3271
|
+
updateTotalTime(totalTime: number): void;
|
|
3272
|
+
resetTimer(): void;
|
|
3273
|
+
setLayout(layout: TimerLayout): void;
|
|
3274
|
+
private applySeekingLayout;
|
|
3275
|
+
private applyPlayerLayout;
|
|
3276
|
+
private formatTime;
|
|
3277
|
+
private padZero;
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
export declare class BlazeVideoSeekBar extends HTMLElement {
|
|
3281
|
+
private isInit;
|
|
3282
|
+
private isMouseIn;
|
|
3283
|
+
private isClicked;
|
|
3284
|
+
private isSeeking;
|
|
3285
|
+
private seekBarStyle;
|
|
3286
|
+
private playbackPart;
|
|
3287
|
+
private progressBarState;
|
|
3288
|
+
private videoState;
|
|
3289
|
+
private seekType;
|
|
3290
|
+
private lastProgress;
|
|
3291
|
+
private timeoutPlayingStyle;
|
|
3292
|
+
private timeoutPauseStyle;
|
|
3293
|
+
private timeoutPlay;
|
|
3294
|
+
onPause?: () => void;
|
|
3295
|
+
onResume?: () => void;
|
|
3296
|
+
onStartSeeking?: () => void;
|
|
3297
|
+
onEndSeeking?: () => void;
|
|
3298
|
+
private listeners;
|
|
3299
|
+
private boundOnTouchMove;
|
|
3300
|
+
private boundOnMouseMove;
|
|
3301
|
+
private boundOnClick;
|
|
3302
|
+
private boundOnMouseOut;
|
|
3303
|
+
private boundOnMouseIn;
|
|
3304
|
+
private boundOnStartDrag;
|
|
3305
|
+
private boundOnEndDrag;
|
|
3306
|
+
private progressBarContainer;
|
|
3307
|
+
private progressBarFill;
|
|
3308
|
+
private progressBarKnob;
|
|
3309
|
+
private progressBarBuffer;
|
|
3310
|
+
private progress;
|
|
3311
|
+
constructor();
|
|
3312
|
+
connectedCallback(): void;
|
|
3313
|
+
disconnectedCallback(): void;
|
|
3314
|
+
setTheme(style: BlazeVideosPlayerSeekBarStyle): void;
|
|
3315
|
+
private createPlaybackPart;
|
|
3316
|
+
private setupEventListeners;
|
|
3317
|
+
private handleOnStartDrag;
|
|
3318
|
+
private handleOnEndDrag;
|
|
3319
|
+
private handleOnClick;
|
|
3320
|
+
private handleMouseDrag;
|
|
3321
|
+
private handleTouchMove;
|
|
3322
|
+
private handleSeek;
|
|
3323
|
+
private handleOnMouseOut;
|
|
3324
|
+
private handleOnMouseIn;
|
|
3325
|
+
private updateVideoSeekBar;
|
|
3326
|
+
private styleProgressContainer;
|
|
3327
|
+
private updateProgressBarStyles;
|
|
3328
|
+
onContentPaused(): void;
|
|
3329
|
+
onContentResumed(): void;
|
|
3330
|
+
updateProgressBar(currentTime: number, duration: number): void;
|
|
3331
|
+
updateBuffer(buffer: number): void;
|
|
3332
|
+
private debouncedSeekBarUpdate;
|
|
3333
|
+
updateSeekBar(progress: number): void;
|
|
3334
|
+
reset(): void;
|
|
3335
|
+
resetProgressBar(): void;
|
|
3336
|
+
private applyPlayingSeekBarStyle;
|
|
3337
|
+
private applyPauseSeekBarStyle;
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
export declare class BlazeLongFormControlsOverlay extends HTMLElement {
|
|
3341
|
+
private shadow;
|
|
3342
|
+
private isInitialize;
|
|
3343
|
+
private videoInfoText;
|
|
3344
|
+
private bottomContainerCta;
|
|
3345
|
+
private playerLayout;
|
|
3346
|
+
private closeButton;
|
|
3347
|
+
private shareButton;
|
|
3348
|
+
private likeButton;
|
|
3349
|
+
private fullscreenButton;
|
|
3350
|
+
private muteButton;
|
|
3351
|
+
private closedCaptionButton;
|
|
3352
|
+
private ctaButton;
|
|
3353
|
+
private ctaTimeout;
|
|
3354
|
+
private ctaVisiblity;
|
|
3355
|
+
private currentMuteState;
|
|
3356
|
+
private currentClosedCaptionState;
|
|
3357
|
+
videoSeekBar: BlazeVideoSeekBar;
|
|
3358
|
+
videoTimer: BlazeTimer;
|
|
3359
|
+
videoNavigationOverlay: BlazeVideoNavigationOverlay;
|
|
3360
|
+
gradientOverlayBottom: BlazeDiv;
|
|
3361
|
+
gradientOverlayTop: BlazeDiv;
|
|
3362
|
+
loader: BlazeLoader;
|
|
3363
|
+
private boundOnFullscreenClick;
|
|
3364
|
+
private boundOnShareClick;
|
|
3365
|
+
private boundOnLikeClick;
|
|
3366
|
+
private boundOnMuteClick;
|
|
3367
|
+
private boundOnCtaClick;
|
|
3368
|
+
private boundOnCloseClick;
|
|
3369
|
+
private boundOnClosedCaptionClick;
|
|
3370
|
+
private boundOnScreenOrientationChange;
|
|
3371
|
+
private boundOnCtaContainerClick;
|
|
3372
|
+
isOverlayChangesBlocked: boolean;
|
|
3373
|
+
constructor();
|
|
3374
|
+
connectedCallback(): void;
|
|
3375
|
+
disconnectedCallback(): void;
|
|
3376
|
+
private initialize;
|
|
3377
|
+
hidePlayerOverlayWhileSeeking(): void;
|
|
3378
|
+
showPlayerOverlayAfterSeeking(): void;
|
|
3379
|
+
setTheme(playerStyle: VideoPlayerStyle): void;
|
|
3380
|
+
static get observedAttributes(): string[];
|
|
3381
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
3382
|
+
showLoader(): void;
|
|
3383
|
+
hideLoader(): void;
|
|
3384
|
+
hidePlayerOverlay(): void;
|
|
3385
|
+
showPlayerOverlay(): void;
|
|
3386
|
+
private animateOverlayVisibility;
|
|
3387
|
+
private handleScreenOrientationChange;
|
|
3388
|
+
setClosedCaptionState(state: 'enabled' | 'disabled'): void;
|
|
3389
|
+
get title(): string;
|
|
3390
|
+
set title(value: string);
|
|
3391
|
+
get isCtaRendered(): boolean;
|
|
3392
|
+
set isCtaRendered(value: boolean);
|
|
3393
|
+
setCta(data: ICta): void;
|
|
3394
|
+
removeCta(): void;
|
|
3395
|
+
private setCtaButtonStyles;
|
|
3396
|
+
private handleCtaClick;
|
|
3397
|
+
private attachStyles;
|
|
3398
|
+
private createDOM;
|
|
3399
|
+
private getDeviceStyle;
|
|
3400
|
+
private getButtonStyle;
|
|
3401
|
+
private getLikeButtonStyle;
|
|
3402
|
+
private getHeadingTextStyle;
|
|
3403
|
+
private setHeadingStyle;
|
|
3404
|
+
private setButtonStyle;
|
|
3405
|
+
private createTopContainer;
|
|
3406
|
+
private createBottomContainer;
|
|
3407
|
+
private createControls;
|
|
3408
|
+
private createBottomRightIcons;
|
|
3409
|
+
private createBottomLeftIcons;
|
|
3410
|
+
private attachEventListeners;
|
|
3411
|
+
private detachEventListeners;
|
|
3412
|
+
private handleCtaContainerClick;
|
|
3413
|
+
private handleFullscreenClick;
|
|
3414
|
+
private handleShareClick;
|
|
3415
|
+
private handleLikeClick;
|
|
3416
|
+
private handleCloseClick;
|
|
3417
|
+
private handleClosedCaptionClick;
|
|
3418
|
+
private handleMuteClick;
|
|
3419
|
+
updateClosedCaptionButtonIcon(forceOn?: boolean): void;
|
|
3420
|
+
setMuteState(isMuted: boolean): void;
|
|
3421
|
+
private updateMuteButtonIcon;
|
|
3422
|
+
toggleMute(isMuted: boolean): void;
|
|
3423
|
+
updateMute(isMuted: boolean): void;
|
|
3424
|
+
setFullscreenState(isFullscreen?: boolean): void;
|
|
3425
|
+
setVideoDuration(duration: number): void;
|
|
3426
|
+
setCurrentTime(currentTime: number): void;
|
|
3427
|
+
private updateVideoInfoText;
|
|
3428
|
+
setLikedState(isLiked: boolean): void;
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
type NavigationPlayerStyle = {
|
|
3432
|
+
play: string;
|
|
3433
|
+
pause: string;
|
|
3434
|
+
navigation: {
|
|
3435
|
+
prevVideo: string;
|
|
3436
|
+
nextVideo: string;
|
|
3437
|
+
};
|
|
3438
|
+
prev_next: BlazeButtonStyle;
|
|
3439
|
+
play_pause: BlazeButtonStyle;
|
|
3440
|
+
};
|
|
3441
|
+
export declare const NAVIGATION_OVERLAY_ATTRIBUTES: {
|
|
3442
|
+
readonly Hidden: "hidden";
|
|
3443
|
+
readonly Layout: "layout";
|
|
3444
|
+
readonly HasPrev: "has-prev";
|
|
3445
|
+
readonly HasNext: "has-next";
|
|
3446
|
+
};
|
|
3447
|
+
export declare class BlazeVideoNavigationOverlay extends HTMLElement {
|
|
3448
|
+
private shadow;
|
|
3449
|
+
private nextButton;
|
|
3450
|
+
private prevButton;
|
|
3451
|
+
private playPauseButton;
|
|
3452
|
+
private isPlaying;
|
|
3453
|
+
private navigationStyle;
|
|
3454
|
+
private boundOnPrevClick;
|
|
3455
|
+
private boundOnNextClick;
|
|
3456
|
+
private boundOnPlayStopClick;
|
|
3457
|
+
private boundOnPlay;
|
|
3458
|
+
loader: BlazeLoader;
|
|
3459
|
+
private _platform;
|
|
3460
|
+
constructor();
|
|
3461
|
+
static get observedAttributes(): ("hidden" | "layout" | "has-next" | "has-prev")[];
|
|
3462
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
3463
|
+
private applyAttribute;
|
|
3464
|
+
connectedCallback(): void;
|
|
3465
|
+
disconnectedCallback(): void;
|
|
3466
|
+
initializeStyles(): void;
|
|
3467
|
+
private setStyle;
|
|
3468
|
+
setTheme(style: NavigationPlayerStyle): void;
|
|
3469
|
+
get platform(): Platform;
|
|
3470
|
+
set platform(value: Platform);
|
|
3471
|
+
private setButtonStyle;
|
|
3472
|
+
createDom(): void;
|
|
3473
|
+
private attachEventListeners;
|
|
3474
|
+
private removeEventListeners;
|
|
3475
|
+
private setButtonDisabled;
|
|
3476
|
+
private onPrevClick;
|
|
3477
|
+
private onNextClick;
|
|
3478
|
+
private onPlayStopClick;
|
|
3479
|
+
setPlaying(isPlaying: boolean): void;
|
|
3480
|
+
showLoader(): void;
|
|
3481
|
+
hideLoader(): void;
|
|
3482
|
+
hideOverlay(): void;
|
|
3483
|
+
showOverlay(): void;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
export declare class BlazeWidgetVideoModal extends BlazeWidgetModal {
|
|
3487
|
+
parentWidget: HTMLElement;
|
|
3488
|
+
playerLayout: VideoPlayerStyle;
|
|
3489
|
+
data: IVideo[];
|
|
3490
|
+
onClose: (() => void) | undefined;
|
|
3491
|
+
onOpen: (() => void) | undefined;
|
|
3492
|
+
boundOnResizeEventDelay: (this: Window, ev: UIEvent) => void;
|
|
3493
|
+
boundOnKeyDown: (ev: KeyboardEvent) => void;
|
|
3494
|
+
boundOnBeforeUnload: () => void;
|
|
3495
|
+
constructor(parentWidget: HTMLElement, playerLayout: VideoPlayerStyle);
|
|
3496
|
+
get currentPlayedContent(): BlazeVideoElement;
|
|
3497
|
+
connectedCallback(): void;
|
|
3498
|
+
disconnectedCallback(): void;
|
|
3499
|
+
setTheme(playerStyle: VideoPlayerStyle): void;
|
|
3500
|
+
setModalContent(data: IVideo[]): void;
|
|
3501
|
+
onBeforeUnload(): null;
|
|
3502
|
+
dispatchExitEvent(): void;
|
|
3503
|
+
close(): Promise<void>;
|
|
3504
|
+
open(): void;
|
|
3505
|
+
play(): void;
|
|
3506
|
+
onKeyDown(ev: KeyboardEvent): void;
|
|
3507
|
+
render(): void;
|
|
3508
|
+
onResize(): void;
|
|
3509
|
+
onResizeEventDelay(): void;
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
/// <reference types="hammerjs" />
|
|
3513
|
+
export declare class BlazeWidgetVideoPlayer extends WidgetAbstractPlayer implements IVideoPlayerController {
|
|
3514
|
+
private boundOnNavigationPrev;
|
|
3515
|
+
private boundOnNavigationNext;
|
|
3516
|
+
private boundOnResize;
|
|
3517
|
+
private boundOnScreenChangeByBrowser;
|
|
3518
|
+
private boundOnKeyDown;
|
|
3519
|
+
private visibilityManager;
|
|
3520
|
+
private fullscreenManager;
|
|
3521
|
+
resumeAfterFocus: boolean;
|
|
3522
|
+
constructor();
|
|
3523
|
+
connectedCallback(): void;
|
|
3524
|
+
disconnectedCallback(): void;
|
|
3525
|
+
destroy(): void;
|
|
3526
|
+
get currentVideoItem(): BlazeVideoElement;
|
|
3527
|
+
setupEventListeners(): void;
|
|
3528
|
+
detachEventListeners(): void;
|
|
3529
|
+
tryToCloseFullscreen(): Promise<void>;
|
|
3530
|
+
toggleFullscreen(): Promise<void>;
|
|
3531
|
+
private handleScreenChangeByBrowser;
|
|
3532
|
+
applyStyles(): void;
|
|
3533
|
+
setupContainer(): Promise<void>;
|
|
3534
|
+
private updateContainerStyles;
|
|
3535
|
+
private calculateDesktopStyles;
|
|
3536
|
+
handleDirection(direction: NavigationDirectionType): Promise<void>;
|
|
3537
|
+
handlePrevDirection(): void;
|
|
3538
|
+
handleNextDirection(): void;
|
|
3539
|
+
setContent(contentList: BlazeVideoElement[]): void;
|
|
3540
|
+
load(): Promise<void>;
|
|
3541
|
+
play(): Promise<void>;
|
|
3542
|
+
resume(): Promise<void>;
|
|
3543
|
+
pause(): void;
|
|
3544
|
+
restart(): void;
|
|
3545
|
+
private updateOverlayNavigationPlayingState;
|
|
3546
|
+
private updateOverlayNavigationButtons;
|
|
3547
|
+
handleNavigationKeyPress(event: KeyboardEvent): void;
|
|
3548
|
+
createAnimation(content: any, direction: ContentDirection, targetIndex: number): AnimeTimelineInstance;
|
|
3549
|
+
handleAnimationStart(content: BlazeVideoElement, direction: ContentDirection): void;
|
|
3550
|
+
handleAnimationCompletion(content: any, mode: ContentDirection): Promise<void>;
|
|
3551
|
+
loadAndPlayContent(): Promise<void>;
|
|
3552
|
+
preloadAdjacentContent(direction: ContentDirection): Promise<void>;
|
|
3553
|
+
prefetchPosters(): Promise<void>;
|
|
3554
|
+
onAnimationEnd(): void;
|
|
3555
|
+
handleMoveSwipe(ev: HammerInput): void;
|
|
3556
|
+
handleEndSwipe(ev: HammerInput): void;
|
|
3557
|
+
resetStyles(): void;
|
|
3558
|
+
render(): void;
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
export declare class BlazeVideoElement extends BlazeWidgetVideoBase {
|
|
3562
|
+
private shadow;
|
|
3563
|
+
video: HTMLVideoElement;
|
|
3564
|
+
playerStyle: VideoPlayerStyle;
|
|
3565
|
+
private playbackStrategy;
|
|
3566
|
+
private playerCommands;
|
|
3567
|
+
private captionsElement;
|
|
3568
|
+
private posterOverlayElement;
|
|
3569
|
+
videoOverlay: BlazeLongFormControlsOverlay;
|
|
3570
|
+
shareModal: BlazeWidgetShareModal;
|
|
3571
|
+
private widgetVastAd;
|
|
3572
|
+
private adPercentageShownPlaces;
|
|
3573
|
+
private lastSavedTime;
|
|
3574
|
+
private lastSeekAction;
|
|
3575
|
+
private shouldSaveAfterSeek;
|
|
3576
|
+
private loaderTimeoutId;
|
|
3577
|
+
private inactivityTimeout;
|
|
3578
|
+
private inactivityEvents;
|
|
3579
|
+
contentType: string;
|
|
3580
|
+
data: IVideo;
|
|
3581
|
+
isActionBlocked: boolean;
|
|
3582
|
+
private isInitializing;
|
|
3583
|
+
private isLoaded;
|
|
3584
|
+
private lastMarkedVideoIdAsViewed;
|
|
3585
|
+
private videoSessionId;
|
|
3586
|
+
private aspectRatio;
|
|
3587
|
+
startTrigger: StartTriggerType;
|
|
3588
|
+
exitTrigger: ExitTriggerType;
|
|
3589
|
+
navigationType: NavigationType;
|
|
3590
|
+
refContentModal: BlazeWidgetVideoModal | undefined;
|
|
3591
|
+
widgetParentItem?: BlazeWidgetItem;
|
|
3592
|
+
modal: BlazeWidgetVideoModal | undefined;
|
|
3593
|
+
isActive: any;
|
|
3594
|
+
navigationDirection: any;
|
|
3595
|
+
private boundHandleLoaderDisplay;
|
|
3596
|
+
private boundHandleLoaderHide;
|
|
3597
|
+
private boundHandleTimeUpdate;
|
|
3598
|
+
private boundHandleLoadedMetadata;
|
|
3599
|
+
private boundHandleVideoEnded;
|
|
3600
|
+
private boundHandleSeekDebounce;
|
|
3601
|
+
private boundHandleClick;
|
|
3602
|
+
private boundHandleMouseIn;
|
|
3603
|
+
private boundHandleMouseOut;
|
|
3604
|
+
private boundHandleMouseMove;
|
|
3605
|
+
private boundHandleOverlayEvents;
|
|
3606
|
+
private boundHandleAdStarted;
|
|
3607
|
+
private boundHandleAdEnded;
|
|
3608
|
+
constructor();
|
|
3609
|
+
connectedCallback(): void;
|
|
3610
|
+
disconnectedCallback(): void;
|
|
3611
|
+
attributeChangedCallback(name: string, oldValue: any, newValue: any): void;
|
|
3612
|
+
setTheme(playerStyle: VideoPlayerStyle): void;
|
|
3613
|
+
setWidgetItemParent(widgetItem: BlazeWidgetItem): void;
|
|
3614
|
+
setData(data: IVideo): void;
|
|
3615
|
+
setModal(modal: BlazeWidgetVideoModal): void;
|
|
3616
|
+
setIsPlaying(isPlaying: boolean): void;
|
|
3617
|
+
load(): Promise<void>;
|
|
3618
|
+
private setupClosedCaptions;
|
|
3619
|
+
private setClosedCaptions;
|
|
3620
|
+
private setCta;
|
|
3621
|
+
private setTitle;
|
|
3622
|
+
private setLiked;
|
|
3623
|
+
private setVideoId;
|
|
3624
|
+
private createSnapshot;
|
|
3625
|
+
unload(): void;
|
|
3626
|
+
private initialize;
|
|
3627
|
+
private setupStyles;
|
|
3628
|
+
private setupVideoElement;
|
|
3629
|
+
private setupOverlay;
|
|
3630
|
+
private setupShareModal;
|
|
3631
|
+
private setupEventListeners;
|
|
3632
|
+
destroy(): void;
|
|
3633
|
+
private startOverlayAutoHideTimer;
|
|
3634
|
+
private clearOverlayTimer;
|
|
3635
|
+
private handleMouseIn;
|
|
3636
|
+
private handleMouseOut;
|
|
3637
|
+
private handleMouseMove;
|
|
3638
|
+
private handleClick;
|
|
3639
|
+
private showPlayerOverlay;
|
|
3640
|
+
private hidePlayerOverlay;
|
|
3641
|
+
private createPosterOverlay;
|
|
3642
|
+
private updatePosterOverlay;
|
|
3643
|
+
private handleVideoEnded;
|
|
3644
|
+
showLoaderWithDelay(): void;
|
|
3645
|
+
private hideLoader;
|
|
3646
|
+
private handleLoaderDisplay;
|
|
3647
|
+
private handleLoaderHide;
|
|
3648
|
+
private handleOverlayEvents;
|
|
3649
|
+
private handleCtaClick;
|
|
3650
|
+
setPlayerLayoutToNormal(): void;
|
|
3651
|
+
private handleSeekRequest;
|
|
3652
|
+
private handleSeek;
|
|
3653
|
+
private handleShareClick;
|
|
3654
|
+
pause(): void;
|
|
3655
|
+
play(): Promise<void>;
|
|
3656
|
+
updateMuteButtonState(isMuted: boolean): void;
|
|
3657
|
+
private handleLoadedMetadata;
|
|
3658
|
+
updateWidgetStatusReadUnread(): void;
|
|
3659
|
+
private handleVideoTimeUpdate;
|
|
3660
|
+
private saveCurrentTime;
|
|
3661
|
+
private handleAdStarted;
|
|
3662
|
+
private handleAdEnded;
|
|
3663
|
+
static get observedAttributes(): string[];
|
|
3664
|
+
get mute(): boolean;
|
|
3665
|
+
set muted(value: boolean);
|
|
3666
|
+
get videoId(): string;
|
|
3667
|
+
set videoId(value: string);
|
|
3668
|
+
get title(): string;
|
|
3669
|
+
set title(value: string);
|
|
3670
|
+
get isLiked(): boolean;
|
|
3671
|
+
set isLiked(value: boolean);
|
|
3672
|
+
get isPlayingAd(): boolean;
|
|
3673
|
+
set isPlayingAd(value: boolean);
|
|
3674
|
+
private applyAttribute;
|
|
3675
|
+
updatePlayerButtonIcons(): void;
|
|
3676
|
+
resetPosition(): void;
|
|
3677
|
+
render(): void;
|
|
3678
|
+
getRefferingObject(): ReferringEventInfo;
|
|
3679
|
+
event(action: VideoAction, data: Partial<VideoEvent>, label?: string | undefined): Promise<void>;
|
|
3680
|
+
private tryToPlayAd;
|
|
3681
|
+
}
|
|
3682
|
+
|
|
3683
|
+
export declare class PlaybackStrategyFactory {
|
|
3684
|
+
static createStrategy(video: HTMLVideoElement, strategyType: string): PlaybackStrategy;
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
export interface PlayResult {
|
|
3688
|
+
status: PlayStatus;
|
|
3689
|
+
error?: unknown;
|
|
3690
|
+
}
|
|
3691
|
+
export declare enum PlayStatus {
|
|
3692
|
+
Success = "SUCCESS",
|
|
3693
|
+
Failed = "FAILED"
|
|
3694
|
+
}
|
|
3695
|
+
export interface PlaybackStrategy {
|
|
3696
|
+
play(): Promise<PlayResult>;
|
|
3697
|
+
pause(): void;
|
|
3698
|
+
initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
|
|
3699
|
+
toggleMute(): void;
|
|
3700
|
+
setMuted(muted: boolean): void;
|
|
3701
|
+
isMuted(): boolean;
|
|
3702
|
+
toggleFullscreen(): void;
|
|
3703
|
+
seek(time: number): void;
|
|
3704
|
+
getDuration(): number;
|
|
3705
|
+
loadSource(src: string, bitRate: number, startingTime: number): void;
|
|
3706
|
+
unload(): void;
|
|
3707
|
+
destroy(): void;
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3710
|
+
export declare class HLSStrategy implements PlaybackStrategy {
|
|
3711
|
+
private hls?;
|
|
3712
|
+
private videoOverlay?;
|
|
3713
|
+
private video;
|
|
3714
|
+
private initialBitrateBps;
|
|
3715
|
+
private retryCount;
|
|
3716
|
+
private maxRetries;
|
|
3717
|
+
private lastTime;
|
|
3718
|
+
private playbackWatchdogTimeout?;
|
|
3719
|
+
private loaderTimeout?;
|
|
3720
|
+
private recoveryTimeout?;
|
|
3721
|
+
private seekRecoveryListener?;
|
|
3722
|
+
private boundOnManifestParsed;
|
|
3723
|
+
private boundOnBufferAppended;
|
|
3724
|
+
private boundOnFragParsed;
|
|
3725
|
+
private boundOnLoadedMetadata;
|
|
3726
|
+
private boundOnPlaying;
|
|
3727
|
+
private boundOnCanPlay;
|
|
3728
|
+
private boundOnError;
|
|
3729
|
+
private boundOnNativeError;
|
|
3730
|
+
constructor(video: HTMLVideoElement);
|
|
3731
|
+
initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
|
|
3732
|
+
loadSource(src: string, initialBitrate: number, startingTime?: number): void;
|
|
3733
|
+
unload(): void;
|
|
3734
|
+
destroy(): void;
|
|
3735
|
+
private waitForVideoCondition;
|
|
3736
|
+
play(): Promise<PlayResult>;
|
|
3737
|
+
private startPlaybackWatchdog;
|
|
3738
|
+
private handlePlaybackTimeout;
|
|
3739
|
+
pause(): void;
|
|
3740
|
+
getDuration(): number;
|
|
3741
|
+
isMuted(): boolean;
|
|
3742
|
+
seek(clampedSeek: number): void;
|
|
3743
|
+
setMuted(muted: boolean): void;
|
|
3744
|
+
toggleMute(): void;
|
|
3745
|
+
mute(): void;
|
|
3746
|
+
unmute(): void;
|
|
3747
|
+
toggleFullscreen(): void;
|
|
3748
|
+
private updateBuffer;
|
|
3749
|
+
private handleManifestParsed;
|
|
3750
|
+
private handleBufferAppended;
|
|
3751
|
+
private handleFragParsed;
|
|
3752
|
+
private handleError;
|
|
3753
|
+
private isSlowConnection;
|
|
3754
|
+
private nudgePlayback;
|
|
3755
|
+
private handleNetworkError;
|
|
3756
|
+
private handleOnlineNetworkRecovery;
|
|
3757
|
+
private recoverNativeHls;
|
|
3758
|
+
private handleMediaError;
|
|
3759
|
+
private reloadStream;
|
|
3760
|
+
private showLoader;
|
|
3761
|
+
private hideLoader;
|
|
3762
|
+
private handlePlaying;
|
|
3763
|
+
private handleNativeError;
|
|
3764
|
+
private handleLoadedMetadata;
|
|
3765
|
+
}
|
|
3766
|
+
|
|
2678
3767
|
export * from './widget-video-base';
|
|
2679
3768
|
export * from './widget-player';
|
|
2680
3769
|
export * from './ad/widget-ad';
|
|
2681
3770
|
export * from './ad/widget-banner-ad';
|
|
3771
|
+
export * from './ad/widget-vast-ad';
|
|
2682
3772
|
export * from './widget-embedded-story';
|
|
2683
3773
|
export * from './widget-interaction';
|
|
2684
3774
|
export * from './widget-item';
|
|
@@ -2697,7 +3787,14 @@ export * from './widget-video';
|
|
|
2697
3787
|
export * from './moment/widget-moment-seek-bar';
|
|
2698
3788
|
export * from './widget-cta-modal';
|
|
2699
3789
|
export * from './widget-captions';
|
|
3790
|
+
export * from '../video/core/video';
|
|
2700
3791
|
|
|
3792
|
+
type Position = {
|
|
3793
|
+
top?: string;
|
|
3794
|
+
left?: string;
|
|
3795
|
+
right?: string;
|
|
3796
|
+
bottom?: string;
|
|
3797
|
+
};
|
|
2701
3798
|
export declare class BlazeWidgetCaptions extends HTMLElement {
|
|
2702
3799
|
private parser;
|
|
2703
3800
|
private container;
|
|
@@ -2716,7 +3813,6 @@ export declare class BlazeWidgetCaptions extends HTMLElement {
|
|
|
2716
3813
|
private checkContainerContent;
|
|
2717
3814
|
private handleTimeUpdate;
|
|
2718
3815
|
private handleSeekUpdate;
|
|
2719
|
-
updateTime(currentTime: number): void;
|
|
2720
3816
|
private setupTimeUpdateHandling;
|
|
2721
3817
|
private cleanup;
|
|
2722
3818
|
private updateVisibility;
|
|
@@ -2724,6 +3820,7 @@ export declare class BlazeWidgetCaptions extends HTMLElement {
|
|
|
2724
3820
|
initialize(video: HTMLVideoElement, captions: ICaptionFile[]): Promise<void>;
|
|
2725
3821
|
private setupCaptions;
|
|
2726
3822
|
private updateCaptions;
|
|
3823
|
+
setAbsolutePosition(position: Position): void;
|
|
2727
3824
|
}
|
|
2728
3825
|
|
|
2729
3826
|
export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
@@ -2744,7 +3841,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
|
2744
3841
|
boundOnVisibilityChangeEvent: () => void;
|
|
2745
3842
|
widgetParentItem: BlazeWidgetItem;
|
|
2746
3843
|
sessionId: string;
|
|
2747
|
-
refContentModal?: BlazeWidgetStoryModal | BlazeWidgetMomentModal;
|
|
3844
|
+
refContentModal?: BlazeWidgetStoryModal | BlazeWidgetMomentModal | BlazeWidgetVideoModal;
|
|
2748
3845
|
abstract aspectRatio?: ContentAspectRatio;
|
|
2749
3846
|
constructor();
|
|
2750
3847
|
connectedCallback(): void;
|
|
@@ -2859,7 +3956,7 @@ export declare class BlazeWidgetInteraction extends BaseWidget {
|
|
|
2859
3956
|
|
|
2860
3957
|
export interface BlazeWidgetItemOptions {
|
|
2861
3958
|
layout: LayoutStyle;
|
|
2862
|
-
content: IStory | IMoment;
|
|
3959
|
+
content: IStory | IMoment | IVideo;
|
|
2863
3960
|
}
|
|
2864
3961
|
export declare class BlazeWidgetItem extends BaseWidget {
|
|
2865
3962
|
protected options: BlazeWidgetItemOptions;
|
|
@@ -2881,7 +3978,7 @@ export declare class BlazeWidgetItem extends BaseWidget {
|
|
|
2881
3978
|
get parentRef(): BlazeWidgetLayout;
|
|
2882
3979
|
statusIndicatorSettings: IndicatorStyle;
|
|
2883
3980
|
paddingItem: PositionOffset;
|
|
2884
|
-
content: IStory | IMoment;
|
|
3981
|
+
content: IStory | IMoment | IVideo;
|
|
2885
3982
|
onClick: (() => void) | undefined;
|
|
2886
3983
|
private boundOnWidgetClick;
|
|
2887
3984
|
constructor(options: BlazeWidgetItemOptions);
|
|
@@ -2921,8 +4018,9 @@ export declare class BlazeWidgetItem extends BaseWidget {
|
|
|
2921
4018
|
export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements Observable, IWidgetView {
|
|
2922
4019
|
storysModal: BlazeWidgetStoryModal | undefined;
|
|
2923
4020
|
momentsModal: BlazeWidgetMomentModal | undefined;
|
|
4021
|
+
videosModal: BlazeWidgetVideoModal | undefined;
|
|
2924
4022
|
defaultAdsInfo: IAdInfo | undefined;
|
|
2925
|
-
content: IStory[] | IMoment[];
|
|
4023
|
+
content: IStory[] | IMoment[] | IVideo[];
|
|
2926
4024
|
skeletonContainer: BlazeDiv | undefined;
|
|
2927
4025
|
widgetItems: BlazeWidgetItem[];
|
|
2928
4026
|
preset: IWidgetTheme | undefined;
|
|
@@ -2937,6 +4035,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2937
4035
|
heightObserver: MutationObserver;
|
|
2938
4036
|
reloadTimeout: NodeJS.Timeout | undefined;
|
|
2939
4037
|
analyticsStack: Record<WidgetAction, boolean>;
|
|
4038
|
+
actionHandlers: ActionHandler[];
|
|
2940
4039
|
onResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
2941
4040
|
shouldReloadWhenPlayerIsClosed: boolean;
|
|
2942
4041
|
shouldReloadData: boolean;
|
|
@@ -2961,6 +4060,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2961
4060
|
set contentIds(value: string);
|
|
2962
4061
|
setContentIds(ids: string[], options?: ISetWidgetOptions): void;
|
|
2963
4062
|
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
4063
|
+
setActionHandlers(actionHandlers: ActionHandler[]): void;
|
|
2964
4064
|
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
2965
4065
|
getTheme(): IWidgetTheme;
|
|
2966
4066
|
setTheme(theme: IWidgetTheme | ThemeType): void;
|
|
@@ -2982,6 +4082,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2982
4082
|
private onItemClick;
|
|
2983
4083
|
private loadContent;
|
|
2984
4084
|
private handleStoryContent;
|
|
4085
|
+
private handleVideoContent;
|
|
2985
4086
|
private handleMomentContent;
|
|
2986
4087
|
handleAssetsExpiry(data: {
|
|
2987
4088
|
assetsExpiryTime: string;
|
|
@@ -3032,18 +4133,18 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
3032
4133
|
widgetType(): WidgetType;
|
|
3033
4134
|
}
|
|
3034
4135
|
|
|
3035
|
-
/// <reference types="hammerjs" />
|
|
3036
4136
|
export declare class BlazeWidgetModal extends BaseWidget {
|
|
3037
|
-
player: BlazeWidgetStoryPlayer | BlazeWidgetMomentPlayer;
|
|
4137
|
+
player: BlazeWidgetStoryPlayer | BlazeWidgetMomentPlayer | BlazeWidgetVideoPlayer;
|
|
3038
4138
|
isOpen: boolean;
|
|
3039
4139
|
exitButtonElement: BlazeButton;
|
|
3040
4140
|
exitButtonWrapperElement: BlazeDiv;
|
|
4141
|
+
blazeSdk: BlazeWidgetSDK;
|
|
3041
4142
|
hammer: HammerManager | null;
|
|
3042
4143
|
isMultiTouch: boolean;
|
|
3043
4144
|
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
3044
4145
|
boundOnPopStateEvent: (ev: PopStateEvent) => void;
|
|
3045
4146
|
onContentChange?: (mode: ContentDirection) => void;
|
|
3046
|
-
constructor(type:
|
|
4147
|
+
constructor(type: ContentType);
|
|
3047
4148
|
connectedCallback(): void;
|
|
3048
4149
|
disconnectedCallback(): void;
|
|
3049
4150
|
onResize(): void;
|
|
@@ -3060,13 +4161,13 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
3060
4161
|
close(): void;
|
|
3061
4162
|
}
|
|
3062
4163
|
|
|
3063
|
-
export type BlazeWidgetContent = BlazeWidgetStory | BlazeWidgetMoment;
|
|
4164
|
+
export type BlazeWidgetContent = BlazeWidgetStory | BlazeWidgetMoment | BlazeVideoElement;
|
|
3064
4165
|
export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
3065
4166
|
index: number;
|
|
3066
4167
|
container: BlazeDiv;
|
|
3067
4168
|
numberOfContentInList: number;
|
|
3068
|
-
contentList: BlazeWidgetStory[] | BlazeWidgetMoment[];
|
|
3069
|
-
playerContentList: BlazeWidgetStory[] | BlazeWidgetMoment[];
|
|
4169
|
+
contentList: BlazeWidgetStory[] | BlazeWidgetMoment[] | BlazeVideoElement[];
|
|
4170
|
+
playerContentList: BlazeWidgetStory[] | BlazeWidgetMoment[] | BlazeVideoElement[];
|
|
3070
4171
|
srcBackground: HTMLCanvasElement;
|
|
3071
4172
|
destBackground: HTMLCanvasElement;
|
|
3072
4173
|
backgroundAnimation?: Animation;
|
|
@@ -3074,7 +4175,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
3074
4175
|
hammer: HammerManager;
|
|
3075
4176
|
gestureActionLimitThreshold: number;
|
|
3076
4177
|
edgeScreenThreshold: number;
|
|
3077
|
-
isEdgeThreshold:
|
|
4178
|
+
isEdgeThreshold: boolean;
|
|
3078
4179
|
isNavigationBlocked: boolean;
|
|
3079
4180
|
isCloseAnimationStarted: boolean;
|
|
3080
4181
|
currentNextAnimation?: anime.AnimeInstance;
|
|
@@ -3088,7 +4189,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
3088
4189
|
constructor();
|
|
3089
4190
|
seekContentById(contentId: string): void;
|
|
3090
4191
|
cleanPlayerContentList(): void;
|
|
3091
|
-
abstract setContent(content: BlazeWidgetStory[] | BlazeWidgetMoment[]): void;
|
|
4192
|
+
abstract setContent(content: BlazeWidgetStory[] | BlazeWidgetMoment[] | BlazeVideoElement[]): void;
|
|
3092
4193
|
muteVideoOnIOSOrMacTablet(): void;
|
|
3093
4194
|
setupHammer(direction?: number): void;
|
|
3094
4195
|
cleanupHammer(): void;
|
|
@@ -3113,11 +4214,11 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
3113
4214
|
abstract handleAnimationCompletion(content: BlazeWidgetStory | BlazeWidgetMoment, mode: ContentDirection): void;
|
|
3114
4215
|
get directionBackwards(): 2 | 4;
|
|
3115
4216
|
get directionForwards(): 2 | 4;
|
|
3116
|
-
processAnimation(event: HammerInput, content: BlazeWidgetMoment | BlazeWidgetStory, currentAnimation?: AnimeInstance | null | undefined): void;
|
|
4217
|
+
processAnimation(event: HammerInput, content: BlazeWidgetMoment | BlazeWidgetStory | BlazeVideoElement, currentAnimation?: AnimeInstance | null | undefined): void;
|
|
3117
4218
|
unloadFromPlayerList(): void;
|
|
3118
4219
|
handleAnimationEnd(direction: ContentDirection): void;
|
|
3119
4220
|
abstract loadAndPlayContent(): void;
|
|
3120
|
-
abstract
|
|
4221
|
+
abstract handleNavigationKeyPress(event: KeyboardEvent): void;
|
|
3121
4222
|
handleSmallGestures(animation: AnimeInstance, content: BlazeWidgetStory | BlazeWidgetMoment): void;
|
|
3122
4223
|
abstract resetStyles(): void;
|
|
3123
4224
|
resetPosition(): void;
|
|
@@ -3125,6 +4226,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
3125
4226
|
isContentDirectionInPlayerListValid(direction: ContentDirection | null): boolean;
|
|
3126
4227
|
isBlazeWidgetStory(content: BlazeWidgetContent[]): content is BlazeWidgetStory[];
|
|
3127
4228
|
isBlazeWidgetMoment(content: BlazeWidgetContent[]): content is BlazeWidgetMoment[];
|
|
4229
|
+
isBlazeWidgetVideo(content: BlazeWidgetContent[]): content is BlazeVideoElement[];
|
|
3128
4230
|
}
|
|
3129
4231
|
|
|
3130
4232
|
export declare class BlazeWidgetScrollable extends BaseWidget {
|
|
@@ -3144,7 +4246,7 @@ export declare class BlazeWidgetScrollable extends BaseWidget {
|
|
|
3144
4246
|
|
|
3145
4247
|
export type playRefType = 'Share' | 'SingleStory' | 'AutoAdvance';
|
|
3146
4248
|
export declare class BlazeWidgetSDK extends BaseWidget {
|
|
3147
|
-
modal: BlazeWidgetStoryModal | BlazeWidgetMomentModal;
|
|
4249
|
+
modal: BlazeWidgetStoryModal | BlazeWidgetMomentModal | BlazeWidgetVideoModal;
|
|
3148
4250
|
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
3149
4251
|
boundOnResizeEventDelay: () => void;
|
|
3150
4252
|
static get observedAttributes(): string[];
|
|
@@ -3154,17 +4256,18 @@ export declare class BlazeWidgetSDK extends BaseWidget {
|
|
|
3154
4256
|
onResizeEventDelay(): void;
|
|
3155
4257
|
onResize(): void;
|
|
3156
4258
|
handleLoadingContent(): void;
|
|
3157
|
-
|
|
4259
|
+
extractContentIdsFromUrl(): {
|
|
3158
4260
|
isStoryMatch: boolean;
|
|
3159
|
-
|
|
4261
|
+
storyId: string | null;
|
|
3160
4262
|
isMomentMatch: boolean;
|
|
3161
|
-
|
|
4263
|
+
momentId: string | null;
|
|
4264
|
+
isVideoMatch: boolean;
|
|
4265
|
+
videoId: string | null;
|
|
3162
4266
|
};
|
|
3163
4267
|
setPlayerStyleCustomization(playerStyleCustomization: Partial<StoryPlayerStyle>): void;
|
|
3164
4268
|
handleContentLoad(contentType: ContentType, playReference: playRefType, contentIds: string): Promise<void>;
|
|
3165
4269
|
handleStaticContentLoad(playReference: playRefType): Promise<void>;
|
|
3166
|
-
|
|
3167
|
-
setupModalAndLoadContent(contentType: ContentType, playReference: playRefType, content: IStory | IMoment): Promise<void>;
|
|
4270
|
+
setupModalAndLoadContent(contentType: ContentType, playReference: playRefType, content: IStory | IMoment | IVideo): Promise<void>;
|
|
3168
4271
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
3169
4272
|
private getConfigAttributes;
|
|
3170
4273
|
private initialize;
|
|
@@ -3200,13 +4303,13 @@ export declare class BlazeWidgetShareModal extends BaseWidget {
|
|
|
3200
4303
|
}
|
|
3201
4304
|
|
|
3202
4305
|
export declare class BlazeWidgetVideoBase extends HTMLElement {
|
|
3203
|
-
data: IPage | undefined;
|
|
4306
|
+
data: IPage | IVideo | undefined;
|
|
3204
4307
|
shouldShowImaAd?: boolean;
|
|
3205
4308
|
isCurrentlyTryingToRunImaAd?: boolean;
|
|
3206
4309
|
_isAd?: boolean | undefined;
|
|
3207
4310
|
adsManager?: any;
|
|
3208
4311
|
constructor();
|
|
3209
|
-
setData(data: IPage): void;
|
|
4312
|
+
setData(data: IPage | IVideo): void;
|
|
3210
4313
|
loadPoster(): void;
|
|
3211
4314
|
play(): void;
|
|
3212
4315
|
restartVideo(): void;
|
|
@@ -3367,10 +4470,44 @@ export declare class BlazeWidgetBannerAd extends HTMLElement {
|
|
|
3367
4470
|
private raiseAnalyticsEventToParent;
|
|
3368
4471
|
}
|
|
3369
4472
|
|
|
3370
|
-
export
|
|
4473
|
+
export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
4474
|
+
private contentType;
|
|
4475
|
+
private getReferringObject?;
|
|
4476
|
+
private adDisplayContainer?;
|
|
4477
|
+
private adsManager?;
|
|
4478
|
+
private adsLoader?;
|
|
4479
|
+
private adContainer;
|
|
4480
|
+
private adLoaderContainer;
|
|
4481
|
+
private videoElement?;
|
|
4482
|
+
private currentAdTag;
|
|
4483
|
+
private boundedOnBlur;
|
|
4484
|
+
private boundedOnFocus;
|
|
4485
|
+
private boundedOnVisibilityChange;
|
|
4486
|
+
private boundedOnWindowResize;
|
|
4487
|
+
adIndex: number;
|
|
4488
|
+
get googleIMA(): any;
|
|
4489
|
+
constructor(contentType: ContentType, getReferringObject?: (() => ReferringEventInfo) | undefined);
|
|
4490
|
+
private initializeGoogleIma;
|
|
4491
|
+
private buildImaUrl;
|
|
4492
|
+
startAd(videoElement: HTMLVideoElement, tag: string): Boolean;
|
|
4493
|
+
private onAdsManagerLoaded;
|
|
4494
|
+
private loadAds;
|
|
4495
|
+
private onAdEvent;
|
|
4496
|
+
private onAdError;
|
|
4497
|
+
private onAdClick;
|
|
4498
|
+
private onContentPauseRequested;
|
|
4499
|
+
private onContentResumeRequested;
|
|
4500
|
+
private onBlur;
|
|
4501
|
+
private onFocus;
|
|
4502
|
+
private onVisibilityChange;
|
|
4503
|
+
private onWindowResize;
|
|
4504
|
+
}
|
|
4505
|
+
|
|
4506
|
+
export type BlazeWidgetContentType = BlazeWidgetMoment[] & BlazeWidgetStory[] & BlazeVideoElement[];
|
|
3371
4507
|
export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
3372
4508
|
parentWidget: HTMLElement;
|
|
3373
4509
|
playerLayout: MomentPlayerStyle;
|
|
4510
|
+
actionHandlers?: ActionHandler[] | undefined;
|
|
3374
4511
|
data: IMoment[];
|
|
3375
4512
|
playlistSessionId: string;
|
|
3376
4513
|
navigationButtonsContainerElement: BlazeDiv;
|
|
@@ -3381,7 +4518,7 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
|
3381
4518
|
boundOnKeyDown: (ev: KeyboardEvent) => void;
|
|
3382
4519
|
boundOnNavigationChange: (ev: Event) => void;
|
|
3383
4520
|
boundOnResizeEventDelay: (this: Window, ev: UIEvent) => void;
|
|
3384
|
-
constructor(parentWidget: HTMLElement, playerLayout: MomentPlayerStyle);
|
|
4521
|
+
constructor(parentWidget: HTMLElement, playerLayout: MomentPlayerStyle, actionHandlers?: ActionHandler[] | undefined);
|
|
3385
4522
|
connectedCallback(): void;
|
|
3386
4523
|
disconnectedCallback(): void;
|
|
3387
4524
|
setTheme(playerStyle: MomentPlayerStyle): void;
|
|
@@ -3421,7 +4558,7 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
3421
4558
|
handlePrevDirection(): void;
|
|
3422
4559
|
handleNextDirection(): void;
|
|
3423
4560
|
releaseMomentFromMemory(moment: BlazeWidgetMoment): void;
|
|
3424
|
-
updateItemData(itemToReplaceWith: BlazeWidgetMoment & BlazeWidgetStory, nextItemToInsert: BlazeWidgetMoment | BlazeWidgetStory): void;
|
|
4561
|
+
updateItemData(itemToReplaceWith: BlazeWidgetMoment & BlazeWidgetStory & BlazeVideoElement, nextItemToInsert: BlazeWidgetMoment | BlazeWidgetStory | BlazeVideoElement): void;
|
|
3425
4562
|
createAnimation(content: BlazeWidgetMoment, direction: ContentDirection, targetIndex: number): AnimeTimelineInstance;
|
|
3426
4563
|
handleAnimationStart(content: BlazeWidgetMoment, direction: ContentDirection): void;
|
|
3427
4564
|
handleAnimationCompletion(content: BlazeWidgetMoment, mode: ContentDirection): Promise<void>;
|
|
@@ -3433,7 +4570,7 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
3433
4570
|
pause(): void;
|
|
3434
4571
|
onAnimationEnd(): void;
|
|
3435
4572
|
handleWheel(evt: WheelEvent): void;
|
|
3436
|
-
|
|
4573
|
+
handleNavigationKeyPress(event: KeyboardEvent): void;
|
|
3437
4574
|
changeContent(direction: ContentDirection): void;
|
|
3438
4575
|
handleMuteClicked(): void;
|
|
3439
4576
|
loadContentBatch(): void;
|
|
@@ -3518,10 +4655,11 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3518
4655
|
seekBar: BlazeWidgetMomentSeekBar;
|
|
3519
4656
|
shareModal: BlazeWidgetShareModal | undefined;
|
|
3520
4657
|
data: IMoment;
|
|
3521
|
-
|
|
4658
|
+
contentType: string;
|
|
3522
4659
|
momentIndex: number;
|
|
3523
4660
|
loopNumber: number;
|
|
3524
4661
|
isLiked: boolean;
|
|
4662
|
+
actionHandlers: ActionHandler[];
|
|
3525
4663
|
onClose: () => void;
|
|
3526
4664
|
boundOnCtaClicked: (event: Event) => void;
|
|
3527
4665
|
boundPlayPauseButtonClick: (event: MouseEvent) => void;
|
|
@@ -3543,6 +4681,8 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3543
4681
|
shareButtonElement: BlazeButton;
|
|
3544
4682
|
playPauseButtonElement: BlazeButton;
|
|
3545
4683
|
closedCaptionButtonElement: BlazeButton;
|
|
4684
|
+
customActionButtonOneElement: BlazeButton;
|
|
4685
|
+
customActionButtonTwoElement: BlazeButton;
|
|
3546
4686
|
headBodyContainer: BlazeDiv;
|
|
3547
4687
|
headElement: BlazeDiv;
|
|
3548
4688
|
bodyElement: BlazeDiv;
|
|
@@ -3556,6 +4696,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3556
4696
|
originalVideoRef: BlazeWidgetVideo | undefined;
|
|
3557
4697
|
constructor(playerStyle?: MomentPlayerStyle | undefined);
|
|
3558
4698
|
setPlayerStyle(style: MomentPlayerStyle): void;
|
|
4699
|
+
setActionHandlers(actionHandlers: ActionHandler[]): void;
|
|
3559
4700
|
connectedCallback(): void;
|
|
3560
4701
|
disconnectedCallback(): void;
|
|
3561
4702
|
setTheme(playerStyle: MomentPlayerStyle): void;
|
|
@@ -3602,7 +4743,6 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3602
4743
|
private handleOnClosedCaptionClick;
|
|
3603
4744
|
private toggleCaptionsVisibility;
|
|
3604
4745
|
handleOnShareClick(): Promise<void>;
|
|
3605
|
-
onShareModalButtonClick(shareButton: BlazeShareButton): Promise<void>;
|
|
3606
4746
|
loadMoments(): Promise<void>;
|
|
3607
4747
|
load(loadingType?: 'direct' | 'cache'): Promise<void>;
|
|
3608
4748
|
unload(): Promise<void>;
|
|
@@ -3617,9 +4757,10 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3617
4757
|
}): Promise<void>;
|
|
3618
4758
|
updateContent(momentContentData: MomentContentParams): void;
|
|
3619
4759
|
updateLikeCount(likes?: number): Promise<void>;
|
|
3620
|
-
updateCta(cta:
|
|
4760
|
+
updateCta(cta: ICta): void;
|
|
3621
4761
|
onCtaClick(event: Event): boolean;
|
|
3622
4762
|
play(): void;
|
|
4763
|
+
handleOnCustomActionButtonClick(e: MouseEvent, handlerOptions: CustomActionButtonOptions): void;
|
|
3623
4764
|
handleOnClose(): void;
|
|
3624
4765
|
handleOnLikeClick(): void;
|
|
3625
4766
|
pause(): void;
|
|
@@ -3635,13 +4776,14 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3635
4776
|
export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
3636
4777
|
parentWidget: HTMLElement;
|
|
3637
4778
|
playerLayout: StoryPlayerStyle;
|
|
4779
|
+
actionHandlers?: ActionHandler[] | undefined;
|
|
3638
4780
|
onOpen?: () => void;
|
|
3639
4781
|
onClose?: (options?: ISmoothOpenCloseModal) => void;
|
|
3640
4782
|
boundOnResizeEventDelay: (this: Window, ev: UIEvent) => void;
|
|
3641
4783
|
boundOnKeyDown: (ev: KeyboardEvent) => void;
|
|
3642
4784
|
boundOnBeforeUnload: () => void;
|
|
3643
4785
|
private currentState;
|
|
3644
|
-
constructor(parentWidget: HTMLElement, playerLayout: StoryPlayerStyle);
|
|
4786
|
+
constructor(parentWidget: HTMLElement, playerLayout: StoryPlayerStyle, actionHandlers?: ActionHandler[] | undefined);
|
|
3645
4787
|
connectedCallback(): void;
|
|
3646
4788
|
disconnectedCallback(): void;
|
|
3647
4789
|
onBeforeUnload(): null | undefined;
|
|
@@ -3691,7 +4833,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
3691
4833
|
exitTrigger?: ExitTriggerType;
|
|
3692
4834
|
navigationType?: NavigationType;
|
|
3693
4835
|
}): void;
|
|
3694
|
-
|
|
4836
|
+
handleNavigationKeyPress(event: KeyboardEvent): false | undefined;
|
|
3695
4837
|
render(): void;
|
|
3696
4838
|
loadContentBatch(): void;
|
|
3697
4839
|
playToggleCurrentStory(): void;
|
|
@@ -3700,6 +4842,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
3700
4842
|
export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
3701
4843
|
playerStyle: StoryPlayerStyle;
|
|
3702
4844
|
mode: ScreenMode;
|
|
4845
|
+
actionHandlers: ActionHandler[];
|
|
3703
4846
|
pages: BlazeWidgetVideoBase[];
|
|
3704
4847
|
data: IStory;
|
|
3705
4848
|
shareModal: BlazeWidgetShareModal | undefined;
|
|
@@ -3712,7 +4855,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3712
4855
|
resumeAfterBlurButton: BlazeButton | undefined;
|
|
3713
4856
|
aspectRatio?: ContentAspectRatio;
|
|
3714
4857
|
pageIndex: number;
|
|
3715
|
-
|
|
4858
|
+
contentType: string;
|
|
3716
4859
|
progressElement: HTMLElement;
|
|
3717
4860
|
onPageStart?: () => void;
|
|
3718
4861
|
onPrevStory?: (navigation: NavigationType) => void;
|
|
@@ -3726,6 +4869,8 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3726
4869
|
exitMobileTabletButtonElement?: BlazeButton;
|
|
3727
4870
|
fullScreenElement?: BlazeButton;
|
|
3728
4871
|
closedCaptionsButtonElement?: BlazeButton;
|
|
4872
|
+
customActionButtonOneElement?: BlazeButton;
|
|
4873
|
+
customActionButtonTwoElement?: BlazeButton;
|
|
3729
4874
|
topContainer: BlazeDiv;
|
|
3730
4875
|
bottomContainer: BlazeDiv;
|
|
3731
4876
|
contentWrapper: BlazeDiv;
|
|
@@ -3752,12 +4897,14 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3752
4897
|
requestAnimationId: number | null;
|
|
3753
4898
|
shouldShowImaAdOnStart: boolean;
|
|
3754
4899
|
bannerAdElement?: BlazeWidgetBannerAd;
|
|
3755
|
-
|
|
4900
|
+
get currentPageIndexWithoutCustomAds(): number;
|
|
4901
|
+
constructor(playerStyle: StoryPlayerStyle, mode: ScreenMode, actionHandlers?: ActionHandler[]);
|
|
3756
4902
|
isButtonVisible(iconName: IconButtonType | StoryDirectionType): boolean | undefined;
|
|
3757
4903
|
private createPlayerButtonsAndAppendToButtonsContainer;
|
|
3758
4904
|
private createNavigationButtonsAndAppendToWidgetStoryContainer;
|
|
3759
4905
|
private createResumeAfterBlurButton;
|
|
3760
4906
|
private applyIconStyle;
|
|
4907
|
+
onCustomActionButtonClick(e: Event, handlerOptions: CustomActionButtonOptions): void;
|
|
3761
4908
|
onShareClick(): Promise<void>;
|
|
3762
4909
|
private onClosedCaptionClick;
|
|
3763
4910
|
private updateCtaButtonLayout;
|