@wscsports/blaze-web-sdk 0.13.4 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/publish/index.d.ts +290 -99
- package/publish/index.js +1 -1
package/publish/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare function Initialize(apiKey: string, userOptions?: Partial<IBlazeS
|
|
|
11
11
|
export declare function WidgetRowView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
12
12
|
export declare function WidgetGridView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
13
13
|
export declare function WidgetEmbeddedStory(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
14
|
+
export declare function WidgetCustomView(containerId: string, options: ICustomWidgetOptionsWithDataSource): IWidgetView;
|
|
14
15
|
export declare function Theme(theme: ThemeType, contentType: 'moment'): IWidgetTheme<MomentPlayerStyle>;
|
|
15
16
|
export declare function Theme(theme: ThemeType, contentType: 'story'): IWidgetTheme<StoryPlayerStyle>;
|
|
16
17
|
export declare function Theme(theme: ThemeType, contentType: 'video'): IWidgetTheme<VideoPlayerStyle>;
|
|
@@ -35,6 +36,7 @@ declare const _default: {
|
|
|
35
36
|
WidgetGridView: typeof WidgetGridView;
|
|
36
37
|
WidgetRowView: typeof WidgetRowView;
|
|
37
38
|
WidgetEmbeddedStory: typeof WidgetEmbeddedStory;
|
|
39
|
+
WidgetCustomView: typeof WidgetCustomView;
|
|
38
40
|
Theme: typeof Theme;
|
|
39
41
|
addDelegateListener: typeof addDelegateListener;
|
|
40
42
|
setDoNotTrack: typeof setDoNotTrack;
|
|
@@ -328,6 +330,7 @@ export declare class ImaAdEvent {
|
|
|
328
330
|
'audio_state': string;
|
|
329
331
|
'content_type': string;
|
|
330
332
|
'backoffice_campaign_data': string;
|
|
333
|
+
'session_id': string;
|
|
331
334
|
}
|
|
332
335
|
export declare class InteractionEvent {
|
|
333
336
|
'interaction_id': string;
|
|
@@ -359,7 +362,7 @@ export declare abstract class BaseWidget extends HTMLElement {
|
|
|
359
362
|
type BlazeSourceType = 'labels' | 'ids';
|
|
360
363
|
export type AdvancedOrdering = 'LiveFirst';
|
|
361
364
|
export interface BlazeDataSourceType {
|
|
362
|
-
|
|
365
|
+
sourceType: BlazeSourceType;
|
|
363
366
|
labels?: string | string[] | BlazeWidgetLabel;
|
|
364
367
|
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
365
368
|
ids?: string[];
|
|
@@ -382,6 +385,11 @@ export declare class BlazeDataSourceFactory {
|
|
|
382
385
|
}
|
|
383
386
|
export declare class BlazeDataSourceValidations {
|
|
384
387
|
static validateFormat(dataSource: BlazeDataSourceType): void;
|
|
388
|
+
static validateDataSource(containerId: string, legacyProps: {
|
|
389
|
+
labels?: string | string[] | BlazeWidgetLabel;
|
|
390
|
+
storyIds?: string[];
|
|
391
|
+
contentIds?: string[];
|
|
392
|
+
}, dataSource?: BlazeDataSourceType): void;
|
|
385
393
|
}
|
|
386
394
|
|
|
387
395
|
export declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): {
|
|
@@ -662,6 +670,10 @@ export declare const PLAYER_MENU_EVENTS: {
|
|
|
662
670
|
readonly EXPAND: "player-menu-expand";
|
|
663
671
|
readonly COLLAPSE: "player-menu-collapse";
|
|
664
672
|
};
|
|
673
|
+
export declare const PLAYER_MENU_ATTRIBUTES: {
|
|
674
|
+
readonly OPEN: "open";
|
|
675
|
+
readonly EXPANDED: "expanded";
|
|
676
|
+
};
|
|
665
677
|
export declare class BlazePlayerMenu extends BaseWidget {
|
|
666
678
|
private menuOptions;
|
|
667
679
|
private menuComponent;
|
|
@@ -671,6 +683,7 @@ export declare class BlazePlayerMenu extends BaseWidget {
|
|
|
671
683
|
private titleElement;
|
|
672
684
|
private closeButton;
|
|
673
685
|
menuContainer: BlazeDiv;
|
|
686
|
+
private boundPreventScrollBubbling;
|
|
674
687
|
private detachTouchEventListeners;
|
|
675
688
|
constructor();
|
|
676
689
|
connectedCallback(): void;
|
|
@@ -678,6 +691,7 @@ export declare class BlazePlayerMenu extends BaseWidget {
|
|
|
678
691
|
setAttribute(qualifiedName: string, value: string): void;
|
|
679
692
|
private setupEventListeners;
|
|
680
693
|
private detachEventListeners;
|
|
694
|
+
private preventScrollBubbling;
|
|
681
695
|
init(options: IPlayerMenuOptions): void;
|
|
682
696
|
private buildHeader;
|
|
683
697
|
private buildBackdrop;
|
|
@@ -978,9 +992,32 @@ export * from './css.constants';
|
|
|
978
992
|
export * from './cc-supported-languages.constants';
|
|
979
993
|
export * from './closed-captions.constants';
|
|
980
994
|
export * from './common.constants';
|
|
995
|
+
export * from './network.constants';
|
|
981
996
|
|
|
982
997
|
export declare const CountryCodes: readonly ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"];
|
|
983
998
|
|
|
999
|
+
export interface NetworkConfig {
|
|
1000
|
+
posterLimits: {
|
|
1001
|
+
previous: number;
|
|
1002
|
+
next: number;
|
|
1003
|
+
};
|
|
1004
|
+
videoPreloadLimits: {
|
|
1005
|
+
next: number;
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
export type NetworkSpeed = 'slow' | 'medium' | 'fast';
|
|
1009
|
+
export declare const NETWORK_CONFIGS: Record<NetworkSpeed, NetworkConfig>;
|
|
1010
|
+
export declare const DEFAULT_NETWORK_SPEED: NetworkSpeed;
|
|
1011
|
+
export declare function getNavigatorConnection(): any;
|
|
1012
|
+
export declare function getNetworkSpeed(downlinkMbps: number): NetworkSpeed;
|
|
1013
|
+
export declare function getPosterLimits(): {
|
|
1014
|
+
previous: number;
|
|
1015
|
+
next: number;
|
|
1016
|
+
};
|
|
1017
|
+
export declare function getVideoPreloadLimits(): {
|
|
1018
|
+
next: number;
|
|
1019
|
+
};
|
|
1020
|
+
|
|
984
1021
|
export declare const DEFAULT_CTA_HEIGHT = 40;
|
|
985
1022
|
export declare const MIN_PADDING_BOTTOM = 10;
|
|
986
1023
|
export declare const Z_INDEX: {
|
|
@@ -1032,6 +1069,7 @@ interface IBaseAdInfo {
|
|
|
1032
1069
|
configuration?: IAdInfoConfiguration;
|
|
1033
1070
|
context?: IAdContext;
|
|
1034
1071
|
externalAdServerId?: string;
|
|
1072
|
+
backofficeCampaignData?: string;
|
|
1035
1073
|
}
|
|
1036
1074
|
export interface IImaAdInfo extends IBaseAdInfo {
|
|
1037
1075
|
type: 'IMA';
|
|
@@ -1042,7 +1080,7 @@ export interface IWebAdInfo extends IBaseAdInfo {
|
|
|
1042
1080
|
type: 'Web';
|
|
1043
1081
|
path: string;
|
|
1044
1082
|
}
|
|
1045
|
-
export interface IBannerAdInfo {
|
|
1083
|
+
export interface IBannerAdInfo extends IBaseAdInfo {
|
|
1046
1084
|
type: 'Banner';
|
|
1047
1085
|
adUnitId: string;
|
|
1048
1086
|
size: 'Banner';
|
|
@@ -1078,9 +1116,20 @@ export interface IContent {
|
|
|
1078
1116
|
isAd: boolean;
|
|
1079
1117
|
entities?: ContentEntities;
|
|
1080
1118
|
bannerAdInfo?: IBannerAdInfo;
|
|
1119
|
+
description?: string;
|
|
1081
1120
|
closedCaptions?: IClosedCaption[];
|
|
1082
1121
|
extraInfo: ExtraInfo;
|
|
1083
1122
|
}
|
|
1123
|
+
export interface IBlazeContent {
|
|
1124
|
+
id: string;
|
|
1125
|
+
title: string;
|
|
1126
|
+
updateTime: string;
|
|
1127
|
+
createTime: string;
|
|
1128
|
+
thumbnails: IThumbnail[];
|
|
1129
|
+
hasViewed: boolean;
|
|
1130
|
+
type?: string;
|
|
1131
|
+
entities?: ContentEntities;
|
|
1132
|
+
}
|
|
1084
1133
|
|
|
1085
1134
|
export interface ICta {
|
|
1086
1135
|
type: 'Deeplink' | 'Web' | null;
|
|
@@ -1221,15 +1270,18 @@ export interface IMoment extends IContent {
|
|
|
1221
1270
|
type: string;
|
|
1222
1271
|
};
|
|
1223
1272
|
cta: ICta;
|
|
1224
|
-
|
|
1273
|
+
adInfo?: IAdInfo;
|
|
1225
1274
|
subtitle?: string;
|
|
1226
|
-
description?: string;
|
|
1227
1275
|
}
|
|
1228
1276
|
export type MomentDB = {
|
|
1229
1277
|
id: string;
|
|
1230
1278
|
liked: boolean;
|
|
1231
1279
|
viewed: boolean;
|
|
1232
1280
|
};
|
|
1281
|
+
export interface IBlazeMoment extends IBlazeContent {
|
|
1282
|
+
duration: string;
|
|
1283
|
+
likes: number;
|
|
1284
|
+
}
|
|
1233
1285
|
|
|
1234
1286
|
interface IBasePage {
|
|
1235
1287
|
id: string;
|
|
@@ -1257,6 +1309,15 @@ export interface IAdPage extends IBasePage {
|
|
|
1257
1309
|
type: 'Ad';
|
|
1258
1310
|
adInfo?: IWebAdInfo;
|
|
1259
1311
|
}
|
|
1312
|
+
export interface IBlazePage {
|
|
1313
|
+
id: string;
|
|
1314
|
+
duration: number;
|
|
1315
|
+
hasViewed: boolean;
|
|
1316
|
+
createTime: string;
|
|
1317
|
+
index?: number;
|
|
1318
|
+
thumbnail?: IThumbnail;
|
|
1319
|
+
poster?: IThumbnail;
|
|
1320
|
+
}
|
|
1260
1321
|
export type IPage = IAdPage | IContentPage;
|
|
1261
1322
|
|
|
1262
1323
|
export interface IRendition {
|
|
@@ -1267,12 +1328,15 @@ export interface IRendition {
|
|
|
1267
1328
|
}
|
|
1268
1329
|
|
|
1269
1330
|
export interface IStory extends IContent {
|
|
1270
|
-
description: string;
|
|
1271
1331
|
isLive: boolean;
|
|
1272
1332
|
pages: IPage[];
|
|
1273
1333
|
adInfo?: IAdInfo;
|
|
1274
1334
|
compositionType?: string;
|
|
1275
1335
|
}
|
|
1336
|
+
export interface IBlazeStory extends IBlazeContent {
|
|
1337
|
+
pages: IBlazePage[];
|
|
1338
|
+
isLive: boolean;
|
|
1339
|
+
}
|
|
1276
1340
|
|
|
1277
1341
|
export interface IThumbnail {
|
|
1278
1342
|
type: ThumbnailApiType;
|
|
@@ -1281,7 +1345,6 @@ export interface IThumbnail {
|
|
|
1281
1345
|
}
|
|
1282
1346
|
|
|
1283
1347
|
export interface IVideo extends IContent {
|
|
1284
|
-
description: string;
|
|
1285
1348
|
isLive: boolean;
|
|
1286
1349
|
pages: IPage[];
|
|
1287
1350
|
adInfo?: IAdInfo;
|
|
@@ -1298,6 +1361,11 @@ export interface VideoDBData {
|
|
|
1298
1361
|
currentTime: number;
|
|
1299
1362
|
posterCurrentTime: string;
|
|
1300
1363
|
}
|
|
1364
|
+
export interface IBlazeVideo extends IBlazeContent {
|
|
1365
|
+
duration: string;
|
|
1366
|
+
likes: number;
|
|
1367
|
+
isLive: boolean;
|
|
1368
|
+
}
|
|
1301
1369
|
|
|
1302
1370
|
export declare enum ActionHandlerId {
|
|
1303
1371
|
AddCustomActionButton = "addCustomActionButton"
|
|
@@ -1388,6 +1456,7 @@ export interface WidgetsTagNameMap {
|
|
|
1388
1456
|
'blaze-widget-modal': BlazeWidgetModal;
|
|
1389
1457
|
'blaze-widget-item': BlazeWidgetItem;
|
|
1390
1458
|
'blaze-widget-layout': BlazeWidgetLayout;
|
|
1459
|
+
'blaze-widget-custom-layout': BlazeWidgetCustomLayout;
|
|
1391
1460
|
'blaze-widget-story': BlazeWidgetStory;
|
|
1392
1461
|
'blaze-widget-story-player': BlazeWidgetStoryPlayer;
|
|
1393
1462
|
'blaze-widget-story-modal': BlazeWidgetStoryModal;
|
|
@@ -1430,6 +1499,7 @@ interface WidgetsTagNameOptionsMap {
|
|
|
1430
1499
|
'blaze-widget-modal': {};
|
|
1431
1500
|
'blaze-widget-item': {};
|
|
1432
1501
|
'blaze-widget-layout': {};
|
|
1502
|
+
'blaze-widget-custom-layout': {};
|
|
1433
1503
|
'blaze-widget-story': {};
|
|
1434
1504
|
'blaze-widget-story-player': {};
|
|
1435
1505
|
'blaze-widget-story-modal': {};
|
|
@@ -1474,12 +1544,17 @@ export declare abstract class WidgetsFactory {
|
|
|
1474
1544
|
|
|
1475
1545
|
export * from './elements.factory';
|
|
1476
1546
|
|
|
1547
|
+
export declare function isStory(item: ContentItem): item is IStory;
|
|
1548
|
+
export declare function isVideo(item: ContentItem): item is IVideo;
|
|
1549
|
+
export declare function isMoment(item: ContentItem): item is IMoment;
|
|
1550
|
+
|
|
1477
1551
|
export declare function isValidIds(ids: unknown): ids is string[];
|
|
1478
1552
|
export declare function hasValidIds(...sources: Array<string[] | undefined>): boolean;
|
|
1479
1553
|
|
|
1480
1554
|
export * from './widget-theme.guard';
|
|
1481
1555
|
export * from './labels.guard';
|
|
1482
1556
|
export * from './ids.guard';
|
|
1557
|
+
export * from './contents.guard';
|
|
1483
1558
|
|
|
1484
1559
|
export declare function isValidLabels(labels: unknown): labels is string | string[] | IBlazeWidgetLabel;
|
|
1485
1560
|
export declare function hasValidLabels(...sources: Array<string | string[] | IBlazeWidgetLabel | undefined>): boolean;
|
|
@@ -1580,8 +1655,8 @@ export interface IDataSourceBuilder {
|
|
|
1580
1655
|
labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
|
|
1581
1656
|
ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
|
|
1582
1657
|
}
|
|
1583
|
-
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, '
|
|
1584
|
-
export type IdsDataSourceParams = Omit<BlazeDataSourceType, '
|
|
1658
|
+
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids'>;
|
|
1659
|
+
export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'labelsPriority' | 'maxItems'>;
|
|
1585
1660
|
|
|
1586
1661
|
export interface IDatabase {
|
|
1587
1662
|
init: () => Promise<void>;
|
|
@@ -1694,6 +1769,18 @@ export * from './widget-options.interface';
|
|
|
1694
1769
|
export * from './widget-view.interface';
|
|
1695
1770
|
export { default as Observable } from './observable';
|
|
1696
1771
|
|
|
1772
|
+
export interface ILayoutDataSourceOptions {
|
|
1773
|
+
dataSource?: BlazeDataSourceType;
|
|
1774
|
+
labels?: string | string[] | BlazeWidgetLabel;
|
|
1775
|
+
storyIds?: string[];
|
|
1776
|
+
contentIds?: string[];
|
|
1777
|
+
maxItemsCount?: number;
|
|
1778
|
+
maxDisplayItemsCount?: number;
|
|
1779
|
+
orderType?: string;
|
|
1780
|
+
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
1781
|
+
shouldOrderWidgetByReadStatus?: boolean;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1697
1784
|
export default interface IntersectionObservable {
|
|
1698
1785
|
intersectionObserver: IntersectionObserver;
|
|
1699
1786
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
@@ -1745,7 +1832,13 @@ export interface IWidgetViewOptionsWithDataSource extends IWidgetViewOptionsBase
|
|
|
1745
1832
|
storyIds?: never;
|
|
1746
1833
|
labels?: never;
|
|
1747
1834
|
}
|
|
1748
|
-
export
|
|
1835
|
+
export interface IBlazeCustomRenderer {
|
|
1836
|
+
render(contents: BlazeContentItem[], container: HTMLElement, playContent: (contentId: string) => void): void;
|
|
1837
|
+
destroy?(): void;
|
|
1838
|
+
}
|
|
1839
|
+
export interface ICustomWidgetOptionsWithDataSource extends IWidgetViewOptionsWithDataSource {
|
|
1840
|
+
customRenderer: IBlazeCustomRenderer;
|
|
1841
|
+
}
|
|
1749
1842
|
|
|
1750
1843
|
export interface IWidgetView extends HTMLElement {
|
|
1751
1844
|
setTheme: (theme: IWidgetTheme | ThemeType) => void;
|
|
@@ -1766,6 +1859,10 @@ export interface IWidgetView extends HTMLElement {
|
|
|
1766
1859
|
export interface ISetWidgetOptions {
|
|
1767
1860
|
shouldReloadData?: boolean;
|
|
1768
1861
|
}
|
|
1862
|
+
export interface ICustomWidgetView extends IWidgetView {
|
|
1863
|
+
getContainer: () => HTMLElement;
|
|
1864
|
+
getContents: () => IBlazeContent[];
|
|
1865
|
+
}
|
|
1769
1866
|
|
|
1770
1867
|
declare const AdServiceClass_base: {
|
|
1771
1868
|
new (): {};
|
|
@@ -3205,6 +3302,9 @@ export type IClosedCaption = {
|
|
|
3205
3302
|
};
|
|
3206
3303
|
export type ClosedCaptionsState = CcLanguageCode | 'Off' | 'Unknown' | 'Unavailable';
|
|
3207
3304
|
|
|
3305
|
+
export type ContentItem = IStory | IVideo | IMoment | IContent;
|
|
3306
|
+
export type BlazeContentItem = IBlazeStory | IBlazeVideo | IBlazeMoment | IBlazeContent;
|
|
3307
|
+
|
|
3208
3308
|
export type FontWeightType = 'normal' | 'bold' | 'bolder' | 'lighter' | 'inherit' | 'initial' | 'unset' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
3209
3309
|
export type TextTransformType = 'capitalize' | 'uppercase' | 'lowercase' | 'none';
|
|
3210
3310
|
|
|
@@ -3245,6 +3345,7 @@ export * from './environment.type';
|
|
|
3245
3345
|
export * from './gesture.type';
|
|
3246
3346
|
export * from './item.type';
|
|
3247
3347
|
export * from './label.type';
|
|
3348
|
+
export * from './loading.type';
|
|
3248
3349
|
export * from './locale.type';
|
|
3249
3350
|
export * from './order.type';
|
|
3250
3351
|
export * from './personalized.type';
|
|
@@ -3271,6 +3372,8 @@ export * from './animation.type';
|
|
|
3271
3372
|
export * from './screen.type';
|
|
3272
3373
|
export * from './action-handler.type';
|
|
3273
3374
|
export * from './cc-language.type';
|
|
3375
|
+
export * from './widget-view-options.type';
|
|
3376
|
+
export * from './content-item.type';
|
|
3274
3377
|
|
|
3275
3378
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
|
|
3276
3379
|
export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
@@ -3280,6 +3383,8 @@ export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
|
3280
3383
|
|
|
3281
3384
|
export type LabelsType = string | string[] | BlazeWidgetLabel;
|
|
3282
3385
|
|
|
3386
|
+
export type LoadingType = 'cache' | 'direct';
|
|
3387
|
+
|
|
3283
3388
|
export type LocaleDirectionType = 'LTR' | 'RTL';
|
|
3284
3389
|
|
|
3285
3390
|
export type OrderType = 'Manual' | 'AtoZ' | 'ZtoA' | 'RecentlyUpdatedFirst' | 'RecentlyUpdatedLast' | 'RecentlyCreatedFirst' | 'RecentlyCreatedLast' | 'Random';
|
|
@@ -3358,6 +3463,8 @@ export type TokenData = {
|
|
|
3358
3463
|
userId: string;
|
|
3359
3464
|
};
|
|
3360
3465
|
|
|
3466
|
+
export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds | IWidgetViewOptionsWithDataSource | ICustomWidgetOptionsWithDataSource;
|
|
3467
|
+
|
|
3361
3468
|
export type WidgetType = 'Row' | 'Grid';
|
|
3362
3469
|
|
|
3363
3470
|
export declare function isImaAdInfo(ad: IAdInfo): ad is IImaAdInfo;
|
|
@@ -3380,6 +3487,13 @@ export declare function calculateChipSize(type: 'chip' | 'badge', statusIndicato
|
|
|
3380
3487
|
|
|
3381
3488
|
export declare function delay(ms: number): Promise<void>;
|
|
3382
3489
|
|
|
3490
|
+
export declare function transformContent(item: IContent): IBlazeContent;
|
|
3491
|
+
export declare function transformStory(item: IStory): IBlazeStory;
|
|
3492
|
+
export declare function transformVideo(item: IVideo): IBlazeVideo;
|
|
3493
|
+
export declare function transformMoment(item: IMoment): IBlazeMoment;
|
|
3494
|
+
export declare function transformContentItem(item: ContentItem): BlazeContentItem;
|
|
3495
|
+
export declare function transformContentsArray(items: ContentItem[]): BlazeContentItem[];
|
|
3496
|
+
|
|
3383
3497
|
type CountryCode = typeof CountryCodes[number];
|
|
3384
3498
|
export declare function isValidCountryCode(countryCode: string): countryCode is CountryCode;
|
|
3385
3499
|
|
|
@@ -3420,19 +3534,21 @@ export declare function isElementInsideTarget(target: EventTarget | null, select
|
|
|
3420
3534
|
export declare function findParentOfType<T>(target: EventTarget | null, type: {
|
|
3421
3535
|
new (...args: any[]): T;
|
|
3422
3536
|
}, stopAt: Element): T | null;
|
|
3537
|
+
export declare function validateContainer(containerId: string, widgetElementName?: string): HTMLElement;
|
|
3423
3538
|
|
|
3539
|
+
export * from './ad-info.utils';
|
|
3540
|
+
export * from './cc-language.utils';
|
|
3424
3541
|
export * from './chip.utils';
|
|
3425
3542
|
export * from './common.utils';
|
|
3543
|
+
export * from './content-mapper.utils';
|
|
3426
3544
|
export * from './country-location.utils';
|
|
3427
3545
|
export * from './guard.utils';
|
|
3428
3546
|
export * from './helper';
|
|
3429
3547
|
export * from './personalized.utils';
|
|
3430
|
-
export * from './regex.utils';
|
|
3431
|
-
export * from './stopwatch';
|
|
3432
3548
|
export * from './position.utils';
|
|
3433
|
-
export * from './
|
|
3434
|
-
export * from './cc-language.utils';
|
|
3549
|
+
export * from './regex.utils';
|
|
3435
3550
|
export * from './shared-event-target.utils';
|
|
3551
|
+
export * from './stopwatch';
|
|
3436
3552
|
|
|
3437
3553
|
export declare function getPersonalizedParamsForRequest(personalized?: BlazePersonalized): {
|
|
3438
3554
|
PersonalPlayers?: undefined;
|
|
@@ -3478,6 +3594,8 @@ export declare class Stopwatch {
|
|
|
3478
3594
|
reset(): void;
|
|
3479
3595
|
}
|
|
3480
3596
|
|
|
3597
|
+
export declare function getVideoDuration(existingVideo?: HTMLVideoElement, videoUrl?: string): Promise<number>;
|
|
3598
|
+
|
|
3481
3599
|
export * from './commands/player-buttons.command';
|
|
3482
3600
|
export * from './commands/video-commands';
|
|
3483
3601
|
export * from './components/timer';
|
|
@@ -3933,8 +4051,9 @@ export declare class BlazeVideoElement extends BlazeWidgetVideoBase {
|
|
|
3933
4051
|
videoOverlay: BlazeLongFormControlsOverlay;
|
|
3934
4052
|
shareModal: BlazeWidgetShareModal;
|
|
3935
4053
|
closedCaptionsModal: BlazeWidgetClosedCaptionsModal | undefined;
|
|
3936
|
-
|
|
4054
|
+
widgetVastAd: BlazeWidgetVastAd;
|
|
3937
4055
|
private adPercentageShownPlaces;
|
|
4056
|
+
private adIndex;
|
|
3938
4057
|
private lastSavedTime;
|
|
3939
4058
|
private lastSeekAction;
|
|
3940
4059
|
private shouldSaveAfterSeek;
|
|
@@ -4136,6 +4255,7 @@ export declare class HLSStrategy implements PlaybackStrategy {
|
|
|
4136
4255
|
|
|
4137
4256
|
export * from './widget-video-base';
|
|
4138
4257
|
export * from './widget-player';
|
|
4258
|
+
export * from './widget-custom-layout';
|
|
4139
4259
|
export * from './ad/widget-ad';
|
|
4140
4260
|
export * from './ad/widget-banner-ad';
|
|
4141
4261
|
export * from './ad/widget-vast-ad';
|
|
@@ -4160,6 +4280,83 @@ export * from './widget-captions';
|
|
|
4160
4280
|
export * from '../video/core/video';
|
|
4161
4281
|
export * from './widget-cc-modal';
|
|
4162
4282
|
|
|
4283
|
+
export declare abstract class WidgetBaseLayout extends BlazeWidgetScrollable implements Observable, IWidgetView {
|
|
4284
|
+
isWidgetVisible: boolean;
|
|
4285
|
+
widgetItems: BlazeWidgetItem[];
|
|
4286
|
+
analyticsStack: Record<WidgetAction, boolean>;
|
|
4287
|
+
shouldReloadData: boolean;
|
|
4288
|
+
shouldReloadWhenPlayerIsClosed: boolean;
|
|
4289
|
+
personalized?: BlazePersonalized;
|
|
4290
|
+
preset: IWidgetTheme | undefined;
|
|
4291
|
+
contents: IStory[] | IMoment[] | IVideo[];
|
|
4292
|
+
actionHandlers: ActionHandler[];
|
|
4293
|
+
defaultAdsInfo: IAdInfo | undefined;
|
|
4294
|
+
thumbnailWidth: number | undefined;
|
|
4295
|
+
thumbnailHeight: number | undefined;
|
|
4296
|
+
storysModal: BlazeWidgetStoryModal | undefined;
|
|
4297
|
+
momentsModal: BlazeWidgetMomentModal | undefined;
|
|
4298
|
+
videosModal: BlazeWidgetVideoModal | undefined;
|
|
4299
|
+
perItemStyleOverrides: PerItemStyleOverrides;
|
|
4300
|
+
activeOverridesLayoutThemes: PerItemStyleOverrides;
|
|
4301
|
+
constructor();
|
|
4302
|
+
abstract render(): void;
|
|
4303
|
+
widgetType(): WidgetType;
|
|
4304
|
+
get thumbnailShape(): ThumbnailShape;
|
|
4305
|
+
protected get theme(): IWidgetTheme<StoryPlayerStyle | VideoPlayerStyle | MomentPlayerStyle>;
|
|
4306
|
+
protected updateActiveLayoutThemesPerItemWithEntity(key: EntitiesType, value: string, theme: IWidgetTheme): void;
|
|
4307
|
+
protected setReloadData(options?: ISetWidgetOptions): void;
|
|
4308
|
+
set contentIds(value: string);
|
|
4309
|
+
set storyIds(value: string);
|
|
4310
|
+
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
4311
|
+
event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
4312
|
+
intersectionObserver: IntersectionObserver;
|
|
4313
|
+
abstract handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
4314
|
+
getTheme(): IWidgetTheme;
|
|
4315
|
+
setTheme(theme: IWidgetTheme | ThemeType): void;
|
|
4316
|
+
reload(): void;
|
|
4317
|
+
abstract updateWidgetUI(): void;
|
|
4318
|
+
setMaxItemsDisplaySize(size: number): void;
|
|
4319
|
+
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
4320
|
+
abstract updateOverrideStyles(perItemStyleOverrides: PerItemStyleOverrides): void;
|
|
4321
|
+
abstract setId(id: string): void;
|
|
4322
|
+
protected setOrderType(orderType?: string): void;
|
|
4323
|
+
updateDataSource(dataSource: BlazeDataSourceType): void;
|
|
4324
|
+
setPersonalized(personalized?: BlazePersonalized): void;
|
|
4325
|
+
setAdvancedOrdering(advancedOrdering?: AdvancedOrdering): void;
|
|
4326
|
+
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
4327
|
+
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
4328
|
+
setContentIds(ids: string[], options?: ISetWidgetOptions): void;
|
|
4329
|
+
setMaxItemsSize(maxItemsSize?: number, options?: ISetWidgetOptions): void;
|
|
4330
|
+
setActionHandlers(actionHandlers: ActionHandler[]): void;
|
|
4331
|
+
protected appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal | BlazeWidgetVideoModal): void;
|
|
4332
|
+
updateWidgetsData(): void;
|
|
4333
|
+
protected abstract reorderWidgetItems(): void;
|
|
4334
|
+
protected abstract updateWidgetDisplay(): void;
|
|
4335
|
+
protected sortContent(): void;
|
|
4336
|
+
protected reorderWidgets(): void;
|
|
4337
|
+
private getContentType;
|
|
4338
|
+
static get observedAttributes(): string[];
|
|
4339
|
+
protected createModal(type: ContentType): void;
|
|
4340
|
+
protected beforeStoryModalCreation(): void;
|
|
4341
|
+
protected abstract setupVideoModalCallbacks(): void;
|
|
4342
|
+
protected abstract setupMomentModalCallbacks(): void;
|
|
4343
|
+
protected abstract setupStoryModalCallbacks(): void;
|
|
4344
|
+
loadContent(): Promise<void>;
|
|
4345
|
+
protected handleContentLoadError(e: any): Promise<void>;
|
|
4346
|
+
protected handleStoryContent(): void;
|
|
4347
|
+
protected handleVideoContent(): void;
|
|
4348
|
+
protected handleMomentContent(): void;
|
|
4349
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
4350
|
+
protected playVideo(contentId: string): void;
|
|
4351
|
+
protected playMoment(contentId: string): void;
|
|
4352
|
+
protected playStory(contentId: string): void;
|
|
4353
|
+
protected handleAssetsExpiry(data: {
|
|
4354
|
+
assetsExpiryTime: string;
|
|
4355
|
+
}): void;
|
|
4356
|
+
protected removeSkeletonContainer?(): Promise<void>;
|
|
4357
|
+
protected abstract handlePostContentLoad(isStoryContentType: boolean, isMomentContentType: boolean, isVideoContentType: boolean): Promise<void>;
|
|
4358
|
+
}
|
|
4359
|
+
|
|
4163
4360
|
type Position = {
|
|
4164
4361
|
top?: string;
|
|
4165
4362
|
left?: string;
|
|
@@ -4223,8 +4420,8 @@ export declare class BlazeWidgetClosedCaptionsModal extends BaseWidget {
|
|
|
4223
4420
|
private onMenuCollapse;
|
|
4224
4421
|
open(): void;
|
|
4225
4422
|
close(): void;
|
|
4226
|
-
|
|
4227
|
-
reloadData(data: IClosedCaption[]): void;
|
|
4423
|
+
isOpen(): boolean;
|
|
4424
|
+
reloadData(data: IClosedCaption[] | undefined): void;
|
|
4228
4425
|
private handleCcOptionClick;
|
|
4229
4426
|
private buildCcOption;
|
|
4230
4427
|
private fillContainerWithOptions;
|
|
@@ -4253,10 +4450,15 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
|
4253
4450
|
widgetParentItem: BlazeWidgetItem;
|
|
4254
4451
|
sessionId: string;
|
|
4255
4452
|
refContentModal?: BlazeWidgetStoryModal | BlazeWidgetMomentModal | BlazeWidgetVideoModal;
|
|
4453
|
+
adIndex: number;
|
|
4256
4454
|
abstract aspectRatio?: ContentAspectRatio;
|
|
4455
|
+
private detachTimeout;
|
|
4456
|
+
private isScheduledForDetach;
|
|
4257
4457
|
constructor();
|
|
4258
4458
|
connectedCallback(): void;
|
|
4259
4459
|
disconnectedCallback(): void;
|
|
4460
|
+
attachEventListeners(): void;
|
|
4461
|
+
detachEventListeners(): void;
|
|
4260
4462
|
setWidgetItemParent(item: BlazeWidgetItem): void;
|
|
4261
4463
|
updateWidgetStatusReadUnread(): void;
|
|
4262
4464
|
getRefferingObject(): ReferringEventInfo;
|
|
@@ -4287,6 +4489,32 @@ export declare class BlazeWidgetCtaModal extends BaseWidget {
|
|
|
4287
4489
|
render(): void;
|
|
4288
4490
|
}
|
|
4289
4491
|
|
|
4492
|
+
export declare class BlazeWidgetCustomLayout extends WidgetBaseLayout implements ICustomWidgetView {
|
|
4493
|
+
private customContainer;
|
|
4494
|
+
private customRenderer;
|
|
4495
|
+
constructor(customRenderer: IBlazeCustomRenderer);
|
|
4496
|
+
getContainer(): HTMLElement;
|
|
4497
|
+
getContents(): IBlazeContent[];
|
|
4498
|
+
connectedCallback(): void;
|
|
4499
|
+
disconnectedCallback(): void;
|
|
4500
|
+
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
4501
|
+
reload(): void;
|
|
4502
|
+
updateWidgetUI(): void;
|
|
4503
|
+
setMaxItemsDisplaySize(size: number): void;
|
|
4504
|
+
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
4505
|
+
updateOverrideStyles(): void;
|
|
4506
|
+
setId(id: string): void;
|
|
4507
|
+
protected handlePostContentLoad(isStoryContentType: boolean, isMomentContentType: boolean, isVideoContentType: boolean): Promise<void>;
|
|
4508
|
+
protected reorderWidgetItems(): void;
|
|
4509
|
+
protected updateWidgetDisplay(): void;
|
|
4510
|
+
private setupModalContent;
|
|
4511
|
+
private playContentById;
|
|
4512
|
+
render(): void;
|
|
4513
|
+
protected setupVideoModalCallbacks(): void;
|
|
4514
|
+
protected setupMomentModalCallbacks(): void;
|
|
4515
|
+
protected setupStoryModalCallbacks(): void;
|
|
4516
|
+
}
|
|
4517
|
+
|
|
4290
4518
|
export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWidgetView, Observable {
|
|
4291
4519
|
preset?: IWidgetTheme;
|
|
4292
4520
|
contents: BlazeWidgetStory[];
|
|
@@ -4442,47 +4670,27 @@ export declare class BlazeWidgetItem extends BaseWidget implements Observable {
|
|
|
4442
4670
|
}
|
|
4443
4671
|
|
|
4444
4672
|
/// <reference types="node" />
|
|
4445
|
-
export declare class BlazeWidgetLayout extends
|
|
4446
|
-
storysModal: BlazeWidgetStoryModal | undefined;
|
|
4447
|
-
momentsModal: BlazeWidgetMomentModal | undefined;
|
|
4448
|
-
videosModal: BlazeWidgetVideoModal | undefined;
|
|
4449
|
-
defaultAdsInfo: IAdInfo | undefined;
|
|
4450
|
-
content: IStory[] | IMoment[] | IVideo[];
|
|
4673
|
+
export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
4451
4674
|
skeletonContainer: BlazeDiv | undefined;
|
|
4452
|
-
widgetItems: BlazeWidgetItem[];
|
|
4453
|
-
preset: IWidgetTheme | undefined;
|
|
4454
|
-
perItemStyleOverrides: PerItemStyleOverrides;
|
|
4455
|
-
activeOverridesLayoutThemes: PerItemStyleOverrides;
|
|
4456
|
-
isWidgetVisible: boolean;
|
|
4457
|
-
thumbnailWidth: number | undefined;
|
|
4458
|
-
thumbnailHeight: number | undefined;
|
|
4459
4675
|
widgetHeight: number;
|
|
4460
4676
|
parentHeight: number | undefined;
|
|
4461
|
-
intersectionObserver: IntersectionObserver;
|
|
4462
4677
|
heightObserver: MutationObserver;
|
|
4463
4678
|
reloadTimeout: NodeJS.Timeout | undefined;
|
|
4464
|
-
analyticsStack: Record<WidgetAction, boolean>;
|
|
4465
|
-
actionHandlers: ActionHandler[];
|
|
4466
4679
|
onResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
4467
4680
|
onMouseMoveEvent: ((e: MouseEvent) => void) & {
|
|
4468
4681
|
cancel: () => void;
|
|
4469
4682
|
};
|
|
4470
4683
|
onMouseLeaveEvent: (e: MouseEvent) => void;
|
|
4471
|
-
shouldReloadWhenPlayerIsClosed: boolean;
|
|
4472
|
-
shouldReloadData: boolean;
|
|
4473
|
-
private personalized?;
|
|
4474
4684
|
currentlyAnimatedItem: BlazeWidgetItem | undefined;
|
|
4475
4685
|
firstVisibleItem: BlazeWidgetItem | undefined;
|
|
4476
4686
|
get refElement(): ShadowRoot | BlazeWidgetLayout;
|
|
4477
4687
|
constructor();
|
|
4478
4688
|
connectedCallback(): void;
|
|
4479
4689
|
disconnectedCallback(): void;
|
|
4480
|
-
private getContentType;
|
|
4481
4690
|
onResizeEventDelay(): void;
|
|
4482
4691
|
onResize(): void;
|
|
4483
4692
|
handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
|
|
4484
4693
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
4485
|
-
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
4486
4694
|
onKeyDown(e: KeyboardEvent): void;
|
|
4487
4695
|
onContentChange(mode: ContentDirection): void;
|
|
4488
4696
|
onPlayerClose(): void;
|
|
@@ -4490,39 +4698,24 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4490
4698
|
setFirstVisibleItem(): void;
|
|
4491
4699
|
getParentHeightWithoutPadding(): number | null;
|
|
4492
4700
|
setId(id: string): void;
|
|
4493
|
-
private setReloadData;
|
|
4494
|
-
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
4495
4701
|
set storyIds(value: string);
|
|
4496
4702
|
set contentIds(value: string);
|
|
4497
|
-
setContentIds(ids: string[], options?: ISetWidgetOptions): void;
|
|
4498
|
-
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
4499
|
-
setActionHandlers(actionHandlers: ActionHandler[]): void;
|
|
4500
|
-
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
4501
|
-
getTheme(): IWidgetTheme;
|
|
4502
|
-
setTheme(theme: IWidgetTheme | ThemeType): void;
|
|
4503
|
-
private get theme();
|
|
4504
|
-
updateOverrideStyles(perItemStyleOverrides: PerItemStyleOverrides): void;
|
|
4505
|
-
reload(): void;
|
|
4506
|
-
private updateActiveLayoutThemesPerItemWithEntity;
|
|
4507
4703
|
updateWidgetUI(): void;
|
|
4704
|
+
updateOverrideStyles(perItemStyleOverrides: PerItemStyleOverrides): void;
|
|
4705
|
+
private updatePlayerStyle;
|
|
4508
4706
|
setMaxPaddingOnWidgetItems(): void;
|
|
4509
|
-
updateDataSource(dataSource: BlazeDataSourceType): void;
|
|
4510
|
-
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
4511
|
-
private setOrderType;
|
|
4512
4707
|
setMaxItemsDisplaySize(maxSize: number): void;
|
|
4513
4708
|
setMaxItemsSize(maxItemsSize?: number, options?: ISetWidgetOptions): void;
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
private handleVideoContent;
|
|
4522
|
-
private handleMomentContent;
|
|
4523
|
-
handleAssetsExpiry(data: {
|
|
4709
|
+
protected setupVideoModalCallbacks(): void;
|
|
4710
|
+
protected setupMomentModalCallbacks(): void;
|
|
4711
|
+
protected setupStoryModalCallbacks(): void;
|
|
4712
|
+
protected beforeStoryModalCreation(): void;
|
|
4713
|
+
protected removeSkeletonContainer(): Promise<void>;
|
|
4714
|
+
protected handlePostContentLoad(isStoryContentType: boolean, isMomentContentType: boolean, isVideoContentType: boolean): Promise<void>;
|
|
4715
|
+
protected handleAssetsExpiry(data: {
|
|
4524
4716
|
assetsExpiryTime: string;
|
|
4525
4717
|
}): void;
|
|
4718
|
+
private onItemClick;
|
|
4526
4719
|
handleWidgetContent(): void;
|
|
4527
4720
|
calculateChipSizes(theme: IWidgetTheme): {
|
|
4528
4721
|
badge: {
|
|
@@ -4560,16 +4753,12 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4560
4753
|
labelAdditionalWidth: number;
|
|
4561
4754
|
labelAdditionalHeight: number;
|
|
4562
4755
|
};
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
private reorderWidgets;
|
|
4566
|
-
updateWidgetsData(): void;
|
|
4567
|
-
private updateWidgetDisplay;
|
|
4756
|
+
protected reorderWidgetItems(): void;
|
|
4757
|
+
protected updateWidgetDisplay(): void;
|
|
4568
4758
|
private maxSize;
|
|
4569
4759
|
connectWidgets(): void;
|
|
4570
4760
|
get thumbnailShape(): ThumbnailShape;
|
|
4571
4761
|
widgetType(): WidgetType;
|
|
4572
|
-
setPersonalized(personalized?: BlazePersonalized): void;
|
|
4573
4762
|
}
|
|
4574
4763
|
|
|
4575
4764
|
export declare class BlazeWidgetModal extends BaseWidget {
|
|
@@ -4759,7 +4948,7 @@ export declare class BlazeWidgetVideoBase extends HTMLElement {
|
|
|
4759
4948
|
shouldShowImaAd?: boolean;
|
|
4760
4949
|
isCurrentlyTryingToRunImaAd?: boolean;
|
|
4761
4950
|
_isAd?: boolean | undefined;
|
|
4762
|
-
|
|
4951
|
+
widgetVastAd?: BlazeWidgetVastAd;
|
|
4763
4952
|
constructor();
|
|
4764
4953
|
setData(data: IPage | IVideo): void;
|
|
4765
4954
|
loadPoster(): void;
|
|
@@ -4773,7 +4962,7 @@ export declare class BlazeWidgetVideoBase extends HTMLElement {
|
|
|
4773
4962
|
get isAd(): boolean | undefined;
|
|
4774
4963
|
set isAd(value: boolean | undefined);
|
|
4775
4964
|
removeLoader(): any;
|
|
4776
|
-
load(): void;
|
|
4965
|
+
load(loadingType?: LoadingType): void;
|
|
4777
4966
|
unload(): void;
|
|
4778
4967
|
display(onFail?: () => void): void;
|
|
4779
4968
|
hide(): void;
|
|
@@ -4809,19 +4998,19 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
4809
4998
|
isLoaded: boolean;
|
|
4810
4999
|
isVideoRunning: boolean;
|
|
4811
5000
|
maxRetryTimes: number;
|
|
4812
|
-
adContainer: HTMLElement;
|
|
4813
|
-
adLoaderContainer: BlazeLoader;
|
|
4814
|
-
adDisplayContainer: any;
|
|
4815
|
-
adsManager: any;
|
|
4816
5001
|
shouldShowImaAd: boolean;
|
|
4817
5002
|
isCurrentlyTryingToRunImaAd: boolean;
|
|
4818
5003
|
hasPoster: boolean;
|
|
5004
|
+
widgetVastAd: BlazeWidgetVastAd;
|
|
5005
|
+
private boundHandleAdStarted;
|
|
5006
|
+
private boundHandleAdEnded;
|
|
4819
5007
|
boundLanguageChangeEvent: (event: Event) => void;
|
|
4820
5008
|
static get observedAttributes(): string[];
|
|
4821
5009
|
constructor(contentParent: BlazeWidgetStory | BlazeWidgetMoment);
|
|
4822
5010
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
4823
5011
|
connectedCallback(): void;
|
|
4824
5012
|
disconnectedCallback(): void;
|
|
5013
|
+
private getContentType;
|
|
4825
5014
|
setData(data: IPage): void;
|
|
4826
5015
|
getGoogleIMA(): any;
|
|
4827
5016
|
private isEnableInteractions;
|
|
@@ -4830,7 +5019,8 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
4830
5019
|
loadPoster(): void;
|
|
4831
5020
|
display(): void;
|
|
4832
5021
|
hide(): void;
|
|
4833
|
-
load(loadingType?:
|
|
5022
|
+
load(loadingType?: LoadingType): Promise<void>;
|
|
5023
|
+
setVideoSource(videoUrl: string): void;
|
|
4834
5024
|
unload(): Promise<void>;
|
|
4835
5025
|
resetVideoState(): void;
|
|
4836
5026
|
removeLoader(): void;
|
|
@@ -4851,26 +5041,12 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
4851
5041
|
get isAd(): boolean;
|
|
4852
5042
|
render(): void;
|
|
4853
5043
|
restartVideo(): void;
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
buildAndSetCustParams(iamData: IImaAdInfo, newUrl: URL, pageIndex?: number): void;
|
|
4857
|
-
setSearchParamIfNotNullOrZero(newUrl: URL, key: string, value?: string | number): void;
|
|
4858
|
-
addAniviewMacrosToUrl(newUrl: URL): void;
|
|
4859
|
-
addGoogleAdsMacrosToUrl(newUrl: URL): void;
|
|
4860
|
-
onAdsManagerLoaded(adsManagerLoadedEvent: any): void;
|
|
4861
|
-
onAdEvent(adEvent: any): void;
|
|
4862
|
-
onWindowResize(): void;
|
|
4863
|
-
onVisibile(): void;
|
|
4864
|
-
onBlur(): void;
|
|
4865
|
-
onFocus(): void;
|
|
4866
|
-
onAdError(): void;
|
|
4867
|
-
loadAds(): void;
|
|
4868
|
-
onContentPauseRequested(): void;
|
|
4869
|
-
onContentResumeRequested(): void;
|
|
4870
|
-
removeAdLoader(): void;
|
|
5044
|
+
handleAdStarted(): void;
|
|
5045
|
+
handleAdEnded(): void;
|
|
4871
5046
|
loadInteraction(): void;
|
|
4872
5047
|
onLanguageChange(event: Event): Promise<void>;
|
|
4873
5048
|
handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
|
|
5049
|
+
private tryToPlayAd;
|
|
4874
5050
|
}
|
|
4875
5051
|
|
|
4876
5052
|
export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
|
|
@@ -4901,6 +5077,7 @@ export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
|
|
|
4901
5077
|
setData(data: IPage): void;
|
|
4902
5078
|
startEnter(): Promise<void>;
|
|
4903
5079
|
endExit(): void;
|
|
5080
|
+
getIframeVideoElement(): HTMLVideoElement | undefined;
|
|
4904
5081
|
play(): void;
|
|
4905
5082
|
get paused(): boolean;
|
|
4906
5083
|
pause(): void;
|
|
@@ -4932,9 +5109,11 @@ export declare class BlazeWidgetBannerAd extends HTMLElement {
|
|
|
4932
5109
|
raiseAnalyticsViewBannerAd(): void;
|
|
4933
5110
|
}
|
|
4934
5111
|
|
|
5112
|
+
type AddExtraAnalyticsParams = () => Partial<ImaAdEvent>;
|
|
4935
5113
|
export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
4936
5114
|
private contentType;
|
|
4937
5115
|
private getReferringObject?;
|
|
5116
|
+
private isInitialized;
|
|
4938
5117
|
private adDisplayContainer?;
|
|
4939
5118
|
private adsManager?;
|
|
4940
5119
|
private adsLoader?;
|
|
@@ -4943,16 +5122,17 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
|
4943
5122
|
private videoElement?;
|
|
4944
5123
|
private currentAdTag;
|
|
4945
5124
|
private currentAdInfo?;
|
|
5125
|
+
private currentAddExtraAnalyticsParams?;
|
|
4946
5126
|
private boundedOnBlur;
|
|
4947
5127
|
private boundedOnFocus;
|
|
4948
5128
|
private boundedOnVisibilityChange;
|
|
4949
5129
|
private boundedOnWindowResize;
|
|
4950
|
-
adIndex: number;
|
|
4951
5130
|
get googleIMA(): any;
|
|
4952
5131
|
constructor(contentType: ContentType, getReferringObject?: (() => ReferringEventInfo) | undefined);
|
|
4953
5132
|
private initializeGoogleIma;
|
|
4954
5133
|
private buildImaUrl;
|
|
4955
|
-
|
|
5134
|
+
private cleanupAdSession;
|
|
5135
|
+
startAd(videoElement: HTMLVideoElement, adInfo: IImaAdInfo, contentExtraInfo?: ContentExtraInfo, addCustomParams?: (url: URL) => void, addExtraAnalyticsParams?: AddExtraAnalyticsParams): Promise<Boolean>;
|
|
4956
5136
|
private onAdsManagerLoaded;
|
|
4957
5137
|
private loadAds;
|
|
4958
5138
|
private onAdEvent;
|
|
@@ -4964,6 +5144,12 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
|
4964
5144
|
private onFocus;
|
|
4965
5145
|
private onVisibilityChange;
|
|
4966
5146
|
private onWindowResize;
|
|
5147
|
+
setSearchParamIfNotNullOrZero(newUrl: URL, key: string, value?: string | number): void;
|
|
5148
|
+
private addAniviewMacrosToUrl;
|
|
5149
|
+
private addGoogleAdsMacrosToUrl;
|
|
5150
|
+
private buildAndSetCustParams;
|
|
5151
|
+
pause(): void;
|
|
5152
|
+
resume(): void;
|
|
4967
5153
|
}
|
|
4968
5154
|
|
|
4969
5155
|
export type BlazeWidgetContentType = BlazeWidgetMoment[] & BlazeWidgetStory[] & BlazeVideoElement[];
|
|
@@ -5003,6 +5189,8 @@ export declare const UPDATE_NAVIGATION_BUTTONS_EVENT = "updateNavigationButtons"
|
|
|
5003
5189
|
export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
5004
5190
|
isWheelEventHandling: boolean;
|
|
5005
5191
|
boundHandleMuteClicked: () => void;
|
|
5192
|
+
private fetchedPosterUrls;
|
|
5193
|
+
private preloadTimer;
|
|
5006
5194
|
constructor();
|
|
5007
5195
|
get currentMoment(): BlazeWidgetMoment;
|
|
5008
5196
|
connectedCallback(): void;
|
|
@@ -5025,8 +5213,11 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
5025
5213
|
handleAnimationCompletion(content: BlazeWidgetMoment, mode: ContentDirection): Promise<void>;
|
|
5026
5214
|
loadAndPlayContent(): Promise<void>;
|
|
5027
5215
|
setContent(content: BlazeWidgetMoment[]): void;
|
|
5028
|
-
|
|
5029
|
-
|
|
5216
|
+
preloadAdjacentVideos(): void;
|
|
5217
|
+
preloadAdjacentPosters(): void;
|
|
5218
|
+
private getCurrentContentIndex;
|
|
5219
|
+
private getIndicesRange;
|
|
5220
|
+
private fetchPosterAtIndex;
|
|
5030
5221
|
play(): void;
|
|
5031
5222
|
pause(): void;
|
|
5032
5223
|
onAnimationEnd(): void;
|
|
@@ -5096,6 +5287,7 @@ export declare class BlazeWidgetMomentSeekBar extends HTMLElement {
|
|
|
5096
5287
|
interface ButtonElementOptions {
|
|
5097
5288
|
iconUrl: string;
|
|
5098
5289
|
width: string;
|
|
5290
|
+
testId: string;
|
|
5099
5291
|
height: string;
|
|
5100
5292
|
onClick?: (this: GlobalEventHandlers, ev: MouseEvent) => void;
|
|
5101
5293
|
backgroundColor?: string;
|
|
@@ -5207,8 +5399,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
5207
5399
|
private handleOnClosedCaptionClick;
|
|
5208
5400
|
toggleClosedCaptions(language?: CcLanguageCode): void;
|
|
5209
5401
|
handleOnShareClick(): Promise<void>;
|
|
5210
|
-
|
|
5211
|
-
load(loadingType?: 'direct' | 'cache'): Promise<void>;
|
|
5402
|
+
load(loadingType?: LoadingType): Promise<void>;
|
|
5212
5403
|
unload(): Promise<void>;
|
|
5213
5404
|
playToggle(): void;
|
|
5214
5405
|
handleOnMuteUnmuteToggle(): void;
|
|
@@ -5409,7 +5600,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
5409
5600
|
unload(): void;
|
|
5410
5601
|
removeFromCache(): void;
|
|
5411
5602
|
displayCurrentStoryPageAndHideTheRest(): void;
|
|
5412
|
-
load(): void;
|
|
5603
|
+
load(loadingType?: LoadingType): void;
|
|
5413
5604
|
play(): void;
|
|
5414
5605
|
bannerAdEvent(detail: InternalEventDetails[InternalEvent.BANNER_ANALYTICS]): void;
|
|
5415
5606
|
event(action: StoryAction, storyData: Partial<StoryEvent>, label?: string | undefined): Promise<void>;
|