@wscsports/blaze-web-sdk 0.19.3-beta.1 → 0.20.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 +4 -38
- package/publish/index.d.ts +208 -249
- package/publish/index.js +1 -1
package/publish/index.d.ts
CHANGED
|
@@ -363,7 +363,7 @@ export declare abstract class BaseWidget extends HTMLElement {
|
|
|
363
363
|
removeElement(): void;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
type BlazeSourceType = 'labels' | 'ids';
|
|
366
|
+
type BlazeSourceType = 'labels' | 'ids' | 'recommendations';
|
|
367
367
|
export type AdvancedOrdering = 'LiveFirst';
|
|
368
368
|
export interface BlazeDataSourceType {
|
|
369
369
|
sourceType: BlazeSourceType;
|
|
@@ -374,6 +374,7 @@ export interface BlazeDataSourceType {
|
|
|
374
374
|
maxItems?: number;
|
|
375
375
|
advancedOrdering?: AdvancedOrdering;
|
|
376
376
|
personalized?: BlazePersonalized;
|
|
377
|
+
recommendations?: BlazeRecommendations;
|
|
377
378
|
}
|
|
378
379
|
export declare const BlazeInternalError: {
|
|
379
380
|
LabelExpressionMustNotBeEmpty: string;
|
|
@@ -381,10 +382,15 @@ export declare const BlazeInternalError: {
|
|
|
381
382
|
IdsMustNotBeEmpty: string;
|
|
382
383
|
MissingLabelsProperty: string;
|
|
383
384
|
IdsMustNotHaveSpaces: string;
|
|
385
|
+
ForYouNotSupported: string;
|
|
386
|
+
TrendingNotSupported: string;
|
|
387
|
+
ForYouContentPreparationNotSupported: string;
|
|
388
|
+
TrendingContentPreparationNotSupported: string;
|
|
384
389
|
};
|
|
385
390
|
export declare class BlazeDataSourceFactory {
|
|
386
391
|
static createLabelsDataSource(params: LabelsDataSourceParams): BlazeDataSourceType;
|
|
387
392
|
static createIdsDataSource(params: IdsDataSourceParams): BlazeDataSourceType;
|
|
393
|
+
static createRecommendationsDataSource(params: RecommendationsDataSourceParams): BlazeDataSourceType;
|
|
388
394
|
static setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[] | undefined): string;
|
|
389
395
|
}
|
|
390
396
|
export declare class BlazeDataSourceValidations {
|
|
@@ -393,7 +399,7 @@ export declare class BlazeDataSourceValidations {
|
|
|
393
399
|
labels?: string | string[] | BlazeWidgetLabel;
|
|
394
400
|
storyIds?: string[];
|
|
395
401
|
contentIds?: string[];
|
|
396
|
-
}, dataSource?: BlazeDataSourceType): void;
|
|
402
|
+
}, dataSource?: BlazeDataSourceType, contentType?: ContentType): void;
|
|
397
403
|
}
|
|
398
404
|
|
|
399
405
|
export declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): {
|
|
@@ -950,7 +956,7 @@ export declare class BlazeTypography extends BaseWidget {
|
|
|
950
956
|
attributeChangedCallback(name: AttributeType, oldValue: string, newValue: string): void;
|
|
951
957
|
onSizeChange(size: SizeType): void;
|
|
952
958
|
onTextChange(text: string): void;
|
|
953
|
-
get fontSize(): "
|
|
959
|
+
get fontSize(): ".8rem" | "1rem" | ".5rem";
|
|
954
960
|
}
|
|
955
961
|
|
|
956
962
|
export type ButtonAttribute = (typeof BUTTON_ATTRIBUTES)[keyof typeof BUTTON_ATTRIBUTES];
|
|
@@ -971,7 +977,7 @@ export declare class BlazeButton extends BaseWidget {
|
|
|
971
977
|
get refElement(): ShadowRoot | this;
|
|
972
978
|
constructor();
|
|
973
979
|
private setupFocusDelegation;
|
|
974
|
-
static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-
|
|
980
|
+
static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-visible" | "blaze-btn-hidden" | "button-desktop-animation")[];
|
|
975
981
|
private onMouseEnter;
|
|
976
982
|
private onMouseLeave;
|
|
977
983
|
private onClick;
|
|
@@ -1072,7 +1078,7 @@ export declare class BlazeShareButton extends BaseWidget {
|
|
|
1072
1078
|
get size(): SizeType;
|
|
1073
1079
|
set size(value: SizeType);
|
|
1074
1080
|
set type(value: ShareButtonType);
|
|
1075
|
-
get fontSize(): "
|
|
1081
|
+
get fontSize(): ".8rem" | "1rem" | ".5rem";
|
|
1076
1082
|
connectedCallback(): void;
|
|
1077
1083
|
disconnectedCallback(): void;
|
|
1078
1084
|
attributeChangedCallback(name: AttributeType, oldValue: string, newValue: string): void;
|
|
@@ -1336,6 +1342,7 @@ export interface AppConfiguration {
|
|
|
1336
1342
|
configRefetchIntervalInMinutes?: number;
|
|
1337
1343
|
enableClientPlaybackModification?: 'true' | 'false' | string;
|
|
1338
1344
|
};
|
|
1345
|
+
recommendationsConfigurations?: IRecommendationsConfigurations;
|
|
1339
1346
|
sdkLoggerConfigurations?: ILoggerConfiguration;
|
|
1340
1347
|
}
|
|
1341
1348
|
|
|
@@ -1557,6 +1564,7 @@ export interface IContentPage extends IBasePage {
|
|
|
1557
1564
|
cta: ICta;
|
|
1558
1565
|
parentStoryId?: string;
|
|
1559
1566
|
shouldShowImaAd?: boolean;
|
|
1567
|
+
shouldShowBannerAd?: boolean;
|
|
1560
1568
|
adInfo?: IAdInfo;
|
|
1561
1569
|
interaction?: Interaction;
|
|
1562
1570
|
poster?: IThumbnail;
|
|
@@ -1582,7 +1590,6 @@ export interface IRendition {
|
|
|
1582
1590
|
aspectRatio: ContentAspectRatio;
|
|
1583
1591
|
bitRate: number;
|
|
1584
1592
|
fileSize: number;
|
|
1585
|
-
fileType?: 'Mp4' | 'Hls';
|
|
1586
1593
|
}
|
|
1587
1594
|
|
|
1588
1595
|
export interface IStory extends IContent {
|
|
@@ -2002,9 +2009,11 @@ export interface IButtonPlayerConfig {
|
|
|
2002
2009
|
export interface IDataSourceBuilder {
|
|
2003
2010
|
labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
|
|
2004
2011
|
ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
|
|
2012
|
+
recommendations: (params: RecommendationsDataSourceParams) => BlazeDataSourceType;
|
|
2005
2013
|
}
|
|
2006
|
-
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids'>;
|
|
2007
|
-
export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'labelsPriority' | 'maxItems'>;
|
|
2014
|
+
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids' | 'recommendations'>;
|
|
2015
|
+
export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'recommendations' | 'labelsPriority' | 'maxItems'>;
|
|
2016
|
+
export type RecommendationsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids' | 'labels'>;
|
|
2008
2017
|
|
|
2009
2018
|
export interface IDatabase {
|
|
2010
2019
|
init: () => Promise<void>;
|
|
@@ -2121,6 +2130,7 @@ export * from './widget-label-builder.interface';
|
|
|
2121
2130
|
export * from './widget-options.interface';
|
|
2122
2131
|
export * from './widget-view.interface';
|
|
2123
2132
|
export * from './item-click-callback.interface';
|
|
2133
|
+
export * from './recommendations.interface';
|
|
2124
2134
|
export { default as Observable } from './observable';
|
|
2125
2135
|
|
|
2126
2136
|
export interface ItemClickContext {
|
|
@@ -2221,6 +2231,13 @@ export default interface IntersectionObservable {
|
|
|
2221
2231
|
|
|
2222
2232
|
export type ScreenMode = 'Full Screen' | 'Embedded';
|
|
2223
2233
|
|
|
2234
|
+
export interface IRecommendationsConfigurations {
|
|
2235
|
+
enableForYouContentPreparation: boolean;
|
|
2236
|
+
enableTrendingContentPreparation: boolean;
|
|
2237
|
+
supportForYou: boolean;
|
|
2238
|
+
supportTrending: boolean;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2224
2241
|
export interface IResponse<T = any> {
|
|
2225
2242
|
data?: T;
|
|
2226
2243
|
error?: Error;
|
|
@@ -2366,6 +2383,9 @@ type GetByLabelsOptions = GetOptions & {
|
|
|
2366
2383
|
type GetByIdsOptions = GetOptions & {
|
|
2367
2384
|
ids: string[];
|
|
2368
2385
|
};
|
|
2386
|
+
type GetByRecommendationsOptions = GetOptions & {
|
|
2387
|
+
recommendations: BlazeRecommendations;
|
|
2388
|
+
};
|
|
2369
2389
|
export interface ApiResponse<T> {
|
|
2370
2390
|
assetsExpiryTime: string;
|
|
2371
2391
|
totalItems: number;
|
|
@@ -2408,6 +2428,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
2408
2428
|
error?: Error | undefined;
|
|
2409
2429
|
}>;
|
|
2410
2430
|
getMomentsByLabels(options: GetByLabelsOptions): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
|
|
2431
|
+
getMomentsByRecommendations(options: GetByRecommendationsOptions): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
|
|
2411
2432
|
updateMomentLikeStatus(options: {
|
|
2412
2433
|
momentId: string;
|
|
2413
2434
|
setLiked: boolean;
|
|
@@ -2440,6 +2461,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
2440
2461
|
private getContentDefaultParams;
|
|
2441
2462
|
private getContentParamsByLabels;
|
|
2442
2463
|
private getContentParamsByIds;
|
|
2464
|
+
private getContentParamsByRecommendations;
|
|
2443
2465
|
}
|
|
2444
2466
|
export declare const ApiService: ApiServiceClass;
|
|
2445
2467
|
|
|
@@ -3861,6 +3883,7 @@ export * from './action-handler.type';
|
|
|
3861
3883
|
export * from './cc-language.type';
|
|
3862
3884
|
export * from './widget-view-options.type';
|
|
3863
3885
|
export * from './content-item.type';
|
|
3886
|
+
export * from './recommendations.type';
|
|
3864
3887
|
|
|
3865
3888
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
|
|
3866
3889
|
export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
@@ -3912,6 +3935,18 @@ export type PrefetchingPolicyType = 'low' | 'default';
|
|
|
3912
3935
|
|
|
3913
3936
|
export type ContentAspectRatio = 'Vertical' | 'Horizontal';
|
|
3914
3937
|
|
|
3938
|
+
type RecommendationsType = {
|
|
3939
|
+
anyLabelFilter?: string[];
|
|
3940
|
+
};
|
|
3941
|
+
export type BlazeRecommendationsForYou = RecommendationsType & {
|
|
3942
|
+
promotedLabels?: string[];
|
|
3943
|
+
};
|
|
3944
|
+
export type BlazeRecommendationsTrending = RecommendationsType;
|
|
3945
|
+
export type BlazeRecommendations = {
|
|
3946
|
+
forYou?: BlazeRecommendationsForYou;
|
|
3947
|
+
trending?: BlazeRecommendationsTrending;
|
|
3948
|
+
};
|
|
3949
|
+
|
|
3915
3950
|
export type ScreenState = 'default_view' | 'full_screen';
|
|
3916
3951
|
export type ScreenChangeState = {
|
|
3917
3952
|
current_state: ScreenState;
|
|
@@ -4181,9 +4216,6 @@ export * from './core/video-modal';
|
|
|
4181
4216
|
export * from './core/video-player';
|
|
4182
4217
|
export * from './factory/playback-strategy.factory';
|
|
4183
4218
|
export * from './strategy/hls.strategy';
|
|
4184
|
-
export * from './strategy/base-hls.strategy';
|
|
4185
|
-
export * from './strategy/simple-hls.strategy';
|
|
4186
|
-
export * from './strategy/native-video.strategy';
|
|
4187
4219
|
export * from './interface/playback-strategy.interface';
|
|
4188
4220
|
export * from './video-events';
|
|
4189
4221
|
|
|
@@ -4747,19 +4779,9 @@ export declare class BlazeVideoElement extends BlazeWidgetVideoBase {
|
|
|
4747
4779
|
}
|
|
4748
4780
|
|
|
4749
4781
|
export declare class PlaybackStrategyFactory {
|
|
4750
|
-
static createStrategy(video: HTMLVideoElement, strategyType: string
|
|
4751
|
-
}
|
|
4752
|
-
|
|
4753
|
-
export interface LoaderDelegate {
|
|
4754
|
-
show(): void;
|
|
4755
|
-
hide(): void;
|
|
4756
|
-
isVisible?(): boolean;
|
|
4782
|
+
static createStrategy(video: HTMLVideoElement, strategyType: string): PlaybackStrategy;
|
|
4757
4783
|
}
|
|
4758
4784
|
|
|
4759
|
-
export interface PlaybackStrategyOptions {
|
|
4760
|
-
overlay?: BlazeLongFormControlsOverlay;
|
|
4761
|
-
loaderDelegate?: LoaderDelegate;
|
|
4762
|
-
}
|
|
4763
4785
|
export interface PlayResult {
|
|
4764
4786
|
status: PlayStatus;
|
|
4765
4787
|
error?: unknown;
|
|
@@ -4771,11 +4793,7 @@ export declare enum PlayStatus {
|
|
|
4771
4793
|
export interface PlaybackStrategy {
|
|
4772
4794
|
play(): Promise<PlayResult>;
|
|
4773
4795
|
pause(): void;
|
|
4774
|
-
|
|
4775
|
-
isEnded(): boolean;
|
|
4776
|
-
getCurrentTime(): number;
|
|
4777
|
-
reset(): void;
|
|
4778
|
-
initialize(options?: PlaybackStrategyOptions): void;
|
|
4796
|
+
initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
|
|
4779
4797
|
toggleMute(): void;
|
|
4780
4798
|
setMuted(muted: boolean): void;
|
|
4781
4799
|
isMuted(): boolean;
|
|
@@ -4785,115 +4803,39 @@ export interface PlaybackStrategy {
|
|
|
4785
4803
|
loadSource(src: string, bitRate: number, startingTime: number): Promise<void>;
|
|
4786
4804
|
unload(): void;
|
|
4787
4805
|
destroy(): void;
|
|
4788
|
-
reloadWithNewSource?(src: string, bitRate: number, startingTime: number): Promise<void>;
|
|
4789
|
-
setContentMetadata?(metadata: {
|
|
4790
|
-
contentId?: string;
|
|
4791
|
-
contentTitle?: string;
|
|
4792
|
-
contentType?: string;
|
|
4793
|
-
sessionId?: string;
|
|
4794
|
-
}): void;
|
|
4795
4806
|
}
|
|
4796
4807
|
|
|
4797
|
-
declare
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
readonly fragLoadingMaxRetry: 5;
|
|
4819
|
-
readonly fragLoadingRetryDelay: 1000;
|
|
4820
|
-
readonly abrEwmaFastLive: 3;
|
|
4821
|
-
readonly abrEwmaSlowLive: 9;
|
|
4822
|
-
readonly abrEwmaFastVoD: 3;
|
|
4823
|
-
readonly abrEwmaSlowVoD: 9;
|
|
4824
|
-
readonly abrBandWidthFactor: 0.95;
|
|
4825
|
-
readonly abrBandWidthUpFactor: 0.7;
|
|
4826
|
-
};
|
|
4827
|
-
readonly SHORT_FORM: {
|
|
4828
|
-
readonly maxBufferLength: 3;
|
|
4829
|
-
readonly maxMaxBufferLength: 5;
|
|
4830
|
-
readonly maxBufferSize: number;
|
|
4831
|
-
readonly maxBufferHole: 0.5;
|
|
4832
|
-
readonly fragLoadingMaxRetry: 2;
|
|
4833
|
-
readonly fragLoadingRetryDelay: 200;
|
|
4834
|
-
readonly abrEwmaFastLive: 1;
|
|
4835
|
-
readonly abrEwmaSlowLive: 2;
|
|
4836
|
-
readonly abrEwmaFastVoD: 1;
|
|
4837
|
-
readonly abrEwmaSlowVoD: 2;
|
|
4838
|
-
readonly abrBandWidthFactor: 0.9;
|
|
4839
|
-
readonly abrBandWidthUpFactor: 0.8;
|
|
4840
|
-
};
|
|
4841
|
-
};
|
|
4842
|
-
export declare abstract class BaseHLSStrategy implements PlaybackStrategy {
|
|
4843
|
-
protected hls?: typeof Hls;
|
|
4844
|
-
protected video: HTMLVideoElement;
|
|
4845
|
-
protected initialBitrateBps: number;
|
|
4846
|
-
protected retryCount: number;
|
|
4847
|
-
protected maxRetries: number;
|
|
4848
|
-
protected lastTime: number;
|
|
4849
|
-
protected playbackWatchdogTimeout?: ReturnType<typeof setTimeout>;
|
|
4850
|
-
protected loaderTimeout?: ReturnType<typeof setTimeout>;
|
|
4851
|
-
protected recoveryTimeout?: ReturnType<typeof setTimeout>;
|
|
4852
|
-
protected seekRecoveryListener?: () => void;
|
|
4853
|
-
protected contentId?: string;
|
|
4854
|
-
protected contentTitle?: string;
|
|
4855
|
-
protected contentType?: string;
|
|
4856
|
-
protected sessionId?: string;
|
|
4857
|
-
protected playAttemptStartTime: number;
|
|
4858
|
-
protected boundOnManifestParsed: () => void;
|
|
4859
|
-
protected boundOnBufferAppended: () => void;
|
|
4860
|
-
protected boundOnFragParsed: () => void;
|
|
4861
|
-
protected boundOnLoadedMetadata: () => void;
|
|
4862
|
-
protected boundOnPlaying: () => void;
|
|
4863
|
-
protected boundOnCanPlay: () => void;
|
|
4864
|
-
protected boundOnError: (event: any, data: any) => void;
|
|
4865
|
-
protected boundOnNativeError: (e: Event) => void;
|
|
4808
|
+
export declare class HLSStrategy implements PlaybackStrategy {
|
|
4809
|
+
private hls?;
|
|
4810
|
+
private videoOverlay?;
|
|
4811
|
+
private video;
|
|
4812
|
+
private initialBitrateBps;
|
|
4813
|
+
private retryCount;
|
|
4814
|
+
private maxRetries;
|
|
4815
|
+
private lastTime;
|
|
4816
|
+
private beforeContentPlayService;
|
|
4817
|
+
private playbackWatchdogTimeout?;
|
|
4818
|
+
private loaderTimeout?;
|
|
4819
|
+
private recoveryTimeout?;
|
|
4820
|
+
private seekRecoveryListener?;
|
|
4821
|
+
private boundOnManifestParsed;
|
|
4822
|
+
private boundOnBufferAppended;
|
|
4823
|
+
private boundOnFragParsed;
|
|
4824
|
+
private boundOnLoadedMetadata;
|
|
4825
|
+
private boundOnPlaying;
|
|
4826
|
+
private boundOnCanPlay;
|
|
4827
|
+
private boundOnError;
|
|
4828
|
+
private boundOnNativeError;
|
|
4866
4829
|
constructor(video: HTMLVideoElement);
|
|
4867
|
-
|
|
4868
|
-
contentId?: string;
|
|
4869
|
-
contentTitle?: string;
|
|
4870
|
-
contentType?: string;
|
|
4871
|
-
sessionId?: string;
|
|
4872
|
-
}): void;
|
|
4873
|
-
abstract initialize(options?: any): void;
|
|
4874
|
-
protected abstract onLoadingState(): void;
|
|
4875
|
-
protected abstract onBufferUpdate(progress: number): void;
|
|
4876
|
-
protected abstract onError(event: any, data: any): void;
|
|
4877
|
-
protected setupEventListeners(): void;
|
|
4830
|
+
initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
|
|
4878
4831
|
loadSource(src: string, initialBitrate: number, startingTime?: number): Promise<void>;
|
|
4879
|
-
protected setupHLSInstance(src: string, startingTime: number, config?: HLSConfig): void;
|
|
4880
|
-
protected setupNativeHLS(src: string, startingTime: number): void;
|
|
4881
4832
|
unload(): void;
|
|
4882
4833
|
destroy(): void;
|
|
4834
|
+
private waitForVideoCondition;
|
|
4883
4835
|
play(): Promise<PlayResult>;
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
timeToPlay?: number;
|
|
4887
|
-
timeToFail?: number;
|
|
4888
|
-
error?: any;
|
|
4889
|
-
previousState?: any;
|
|
4890
|
-
newState?: any;
|
|
4891
|
-
}): void;
|
|
4836
|
+
private startPlaybackWatchdog;
|
|
4837
|
+
private handlePlaybackTimeout;
|
|
4892
4838
|
pause(): void;
|
|
4893
|
-
isPaused(): boolean;
|
|
4894
|
-
isEnded(): boolean;
|
|
4895
|
-
getCurrentTime(): number;
|
|
4896
|
-
reset(): void;
|
|
4897
4839
|
getDuration(): number;
|
|
4898
4840
|
isMuted(): boolean;
|
|
4899
4841
|
seek(clampedSeek: number): void;
|
|
@@ -4902,113 +4844,23 @@ export declare abstract class BaseHLSStrategy implements PlaybackStrategy {
|
|
|
4902
4844
|
mute(): void;
|
|
4903
4845
|
unmute(): void;
|
|
4904
4846
|
toggleFullscreen(): void;
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
protected hideLoader(): void;
|
|
4920
|
-
protected nudgePlayback(): void;
|
|
4921
|
-
protected handleNetworkError(): void;
|
|
4922
|
-
protected handleOnlineNetworkRecovery: () => void;
|
|
4923
|
-
protected handleMediaError(): void;
|
|
4924
|
-
protected recoverNativeHls(): void;
|
|
4925
|
-
protected reloadStream(): void;
|
|
4926
|
-
reloadWithNewSource(newSrc: string, initialBitrate?: number, startingTime?: number): Promise<void>;
|
|
4927
|
-
}
|
|
4928
|
-
|
|
4929
|
-
export declare class HLSStrategy extends BaseHLSStrategy {
|
|
4930
|
-
private videoOverlay?;
|
|
4931
|
-
initialize(options?: PlaybackStrategyOptions): void;
|
|
4932
|
-
protected onLoadingState(): void;
|
|
4933
|
-
protected onBufferUpdate(progress: number): void;
|
|
4934
|
-
protected onError(event: any, data: any): void;
|
|
4935
|
-
toggleFullscreen(): void;
|
|
4936
|
-
}
|
|
4937
|
-
|
|
4938
|
-
export declare class NativeVideoStrategy implements PlaybackStrategy {
|
|
4939
|
-
private video;
|
|
4940
|
-
private videoComponent;
|
|
4941
|
-
private lastErrorExecutionTime;
|
|
4942
|
-
private loaderDelegate?;
|
|
4943
|
-
private playbackTimeout?;
|
|
4944
|
-
private readonly PLAYBACK_TIMEOUT_MS;
|
|
4945
|
-
private boundOnError;
|
|
4946
|
-
private boundOnPlaying;
|
|
4947
|
-
private boundOnPause;
|
|
4948
|
-
private boundOnCanPlayThrough;
|
|
4949
|
-
private contentId?;
|
|
4950
|
-
private contentTitle?;
|
|
4951
|
-
private contentType?;
|
|
4952
|
-
private sessionId?;
|
|
4953
|
-
private playAttemptStartTime;
|
|
4954
|
-
constructor(video: HTMLVideoElement, videoComponent: BlazeWidgetVideo);
|
|
4955
|
-
private setupErrorHandling;
|
|
4847
|
+
private updateBuffer;
|
|
4848
|
+
private handleManifestParsed;
|
|
4849
|
+
private handleBufferAppended;
|
|
4850
|
+
private handleFragParsed;
|
|
4851
|
+
private handleError;
|
|
4852
|
+
private isSlowConnection;
|
|
4853
|
+
private nudgePlayback;
|
|
4854
|
+
private handleNetworkError;
|
|
4855
|
+
private handleOnlineNetworkRecovery;
|
|
4856
|
+
private recoverNativeHls;
|
|
4857
|
+
private handleMediaError;
|
|
4858
|
+
private reloadStream;
|
|
4859
|
+
private showLoader;
|
|
4860
|
+
private hideLoader;
|
|
4956
4861
|
private handlePlaying;
|
|
4957
|
-
private
|
|
4958
|
-
private
|
|
4959
|
-
private startPlaybackTimeout;
|
|
4960
|
-
private clearPlaybackTimeout;
|
|
4961
|
-
private handlePlaybackTimeout;
|
|
4962
|
-
private handleNativeVideoError;
|
|
4963
|
-
play(): Promise<PlayResult>;
|
|
4964
|
-
private waitForVideoToStartLoading;
|
|
4965
|
-
setContentMetadata(metadata: {
|
|
4966
|
-
contentId?: string;
|
|
4967
|
-
contentTitle?: string;
|
|
4968
|
-
contentType?: string;
|
|
4969
|
-
sessionId?: string;
|
|
4970
|
-
}): void;
|
|
4971
|
-
private dispatchPlaybackEvent;
|
|
4972
|
-
private playWithRetry;
|
|
4973
|
-
private reloadAndRetry;
|
|
4974
|
-
pause(): void;
|
|
4975
|
-
getCurrentTime(): number;
|
|
4976
|
-
getDuration(): number;
|
|
4977
|
-
isPaused(): boolean;
|
|
4978
|
-
isEnded(): boolean;
|
|
4979
|
-
isMuted(): boolean;
|
|
4980
|
-
setMuted(muted: boolean): void;
|
|
4981
|
-
mute(): void;
|
|
4982
|
-
unmute(): void;
|
|
4983
|
-
seek(seekPercentage: number): void;
|
|
4984
|
-
toggleMute(): void;
|
|
4985
|
-
toggleFullscreen(): void;
|
|
4986
|
-
loadSource(src: string): Promise<void>;
|
|
4987
|
-
initialize(options?: PlaybackStrategyOptions): void;
|
|
4988
|
-
private configureVideoElement;
|
|
4989
|
-
unload(): void;
|
|
4990
|
-
destroy(): void;
|
|
4991
|
-
reset(): void;
|
|
4992
|
-
}
|
|
4993
|
-
|
|
4994
|
-
export declare class SimpleHLSStrategy extends BaseHLSStrategy {
|
|
4995
|
-
private loaderDelegate?;
|
|
4996
|
-
private isPrefetchMode;
|
|
4997
|
-
private fragmentsLoaded;
|
|
4998
|
-
private readonly maxPrefetchFragments;
|
|
4999
|
-
initialize(options?: PlaybackStrategyOptions): void;
|
|
5000
|
-
protected setupHLSInstance(src: string, startingTime: number): void;
|
|
5001
|
-
private handleManifestParsedForPrefetch;
|
|
5002
|
-
private startPrefetchLoading;
|
|
5003
|
-
enablePrefetchMode(): void;
|
|
5004
|
-
disablePrefetchMode(): void;
|
|
5005
|
-
protected onLoadingState(): void;
|
|
5006
|
-
protected onBufferUpdate(progress: number): void;
|
|
5007
|
-
protected handlePlaying(): void;
|
|
5008
|
-
protected handlePause(): void;
|
|
5009
|
-
protected onError(event: any, data: any): void;
|
|
5010
|
-
protected handleSeekRecovery(seekTime: number): void;
|
|
5011
|
-
seek(clampedSeek: number): void;
|
|
4862
|
+
private handleNativeError;
|
|
4863
|
+
private handleLoadedMetadata;
|
|
5012
4864
|
}
|
|
5013
4865
|
|
|
5014
4866
|
export * from './widget-video-base';
|
|
@@ -5086,6 +4938,7 @@ export declare abstract class WidgetBaseLayout extends BlazeWidgetScrollable imp
|
|
|
5086
4938
|
setContentIds(ids: string[], options?: ISetWidgetOptions): void;
|
|
5087
4939
|
setMaxItemsSize(maxItemsSize?: number, options?: ISetWidgetOptions): void;
|
|
5088
4940
|
setActionHandlers(actionHandlers: ActionHandler[]): void;
|
|
4941
|
+
setRecommendations(recommendations?: BlazeRecommendations, options?: ISetWidgetOptions): void;
|
|
5089
4942
|
protected appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal | BlazeWidgetVideoModal): void;
|
|
5090
4943
|
updateWidgetsData(): void;
|
|
5091
4944
|
protected abstract reorderWidgetItems(): void;
|
|
@@ -5530,7 +5383,6 @@ export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
|
5530
5383
|
connectWidgets(): void;
|
|
5531
5384
|
get thumbnailShape(): ThumbnailShape;
|
|
5532
5385
|
widgetType(): WidgetType;
|
|
5533
|
-
setPersonalized(personalized?: BlazePersonalized): void;
|
|
5534
5386
|
private setupAccessibility;
|
|
5535
5387
|
private updateAccessibilityLabel;
|
|
5536
5388
|
onKeyDown(e: KeyboardEvent): void;
|
|
@@ -5782,9 +5634,6 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
5782
5634
|
loaderTimeoutRefAppending: NodeJS.Timeout | undefined;
|
|
5783
5635
|
lastErrorExecutionTime: number;
|
|
5784
5636
|
private beforeContentPlayService;
|
|
5785
|
-
private playbackStrategy?;
|
|
5786
|
-
private playerCommands?;
|
|
5787
|
-
private isHLSVideo;
|
|
5788
5637
|
isVideoStartPlaying: boolean;
|
|
5789
5638
|
isError: boolean;
|
|
5790
5639
|
isLoaded: boolean;
|
|
@@ -5809,19 +5658,15 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
5809
5658
|
private isEnableInteractions;
|
|
5810
5659
|
loadClosedCaptions(): Promise<void>;
|
|
5811
5660
|
getVideoDuration(existingVideo?: HTMLVideoElement): Promise<number>;
|
|
5812
|
-
private determinePosterUrl;
|
|
5813
5661
|
loadPoster(): void;
|
|
5814
5662
|
display(): void;
|
|
5815
5663
|
hide(): void;
|
|
5816
5664
|
load(loadingType?: LoadingType): Promise<void>;
|
|
5817
5665
|
private setVideoSource;
|
|
5818
|
-
reloadHLSWithNewUrl(newVideoUrl: string): Promise<void>;
|
|
5819
|
-
private initializeHLSStrategy;
|
|
5820
|
-
private fallbackToNativeVideo;
|
|
5821
|
-
private cleanupHLSStrategy;
|
|
5822
5666
|
unload(): Promise<void>;
|
|
5823
5667
|
resetVideoState(): void;
|
|
5824
5668
|
removeLoader(): void;
|
|
5669
|
+
startPlayVideo(video: HTMLVideoElement, maxRetryTimes: number): Promise<void>;
|
|
5825
5670
|
tryReloadVideo(retryTime: number): void;
|
|
5826
5671
|
tryToAddLoader(): void;
|
|
5827
5672
|
play(): Promise<void>;
|
|
@@ -5833,17 +5678,18 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
5833
5678
|
requestFrameCallback(callback: () => void): void;
|
|
5834
5679
|
mainElement(): CanvasImageSource;
|
|
5835
5680
|
get paused(): boolean;
|
|
5836
|
-
get ended(): boolean;
|
|
5837
5681
|
get muted(): boolean;
|
|
5838
5682
|
set muted(value: boolean);
|
|
5839
5683
|
get isAd(): boolean;
|
|
5840
5684
|
render(): void;
|
|
5685
|
+
restartVideo(): void;
|
|
5841
5686
|
handleAdStarted(): void;
|
|
5842
5687
|
handleAdEnded(): void;
|
|
5843
5688
|
loadInteraction(): void;
|
|
5844
5689
|
onLanguageChange(event: Event): Promise<void>;
|
|
5845
5690
|
handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
|
|
5846
5691
|
private tryToPlayAd;
|
|
5692
|
+
private updateVideoUrlWithBeforeContentPlay;
|
|
5847
5693
|
}
|
|
5848
5694
|
|
|
5849
5695
|
export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
|
|
@@ -5892,6 +5738,7 @@ export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
|
|
|
5892
5738
|
|
|
5893
5739
|
export declare class BlazeWidgetBannerAd extends HTMLElement {
|
|
5894
5740
|
parentContnet: BlazeWidgetContent;
|
|
5741
|
+
isHidden(): boolean;
|
|
5895
5742
|
constructor(parentContent: BlazeWidgetContent);
|
|
5896
5743
|
private adContainer;
|
|
5897
5744
|
private bannerAdInfo;
|
|
@@ -5899,7 +5746,9 @@ export declare class BlazeWidgetBannerAd extends HTMLElement {
|
|
|
5899
5746
|
private get googletag();
|
|
5900
5747
|
connectedCallback(): void;
|
|
5901
5748
|
disconnectedCallback(): void;
|
|
5902
|
-
show(bannerAdInfo?: IBannerAdInfo): void;
|
|
5749
|
+
show(bannerAdInfo?: IBannerAdInfo, sendBannerViewEvent?: boolean): void;
|
|
5750
|
+
hide(): void;
|
|
5751
|
+
unhide(): void;
|
|
5903
5752
|
private setInitialStyles;
|
|
5904
5753
|
private setAdContainer;
|
|
5905
5754
|
private raiseAnalyticsEventToParent;
|
|
@@ -5973,7 +5822,7 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
|
5973
5822
|
setModalContent(data: IMoment[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
5974
5823
|
onKeyDown(ev: KeyboardEvent): void;
|
|
5975
5824
|
close(): void;
|
|
5976
|
-
open():
|
|
5825
|
+
open(): void;
|
|
5977
5826
|
play(): void;
|
|
5978
5827
|
setExitButtonDisplay(): void;
|
|
5979
5828
|
render(): void;
|
|
@@ -6370,7 +6219,6 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
6370
6219
|
totalPlayStopwatch: Stopwatch;
|
|
6371
6220
|
shadowTopElement: HTMLDivElement;
|
|
6372
6221
|
navigationTimeout: NodeJS.Timeout | null;
|
|
6373
|
-
prefetchTimeout: NodeJS.Timeout | null;
|
|
6374
6222
|
lastPageIndexToResume: number;
|
|
6375
6223
|
elementsToHideOnWebAds: (HTMLElement | undefined)[];
|
|
6376
6224
|
elementsToHideOnImaAds: (HTMLElement | undefined)[];
|
|
@@ -6402,6 +6250,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
6402
6250
|
private disableStoriesNavigationButtons;
|
|
6403
6251
|
private disablePageNavigationButtons;
|
|
6404
6252
|
private setButtonNavigationAsDisabled;
|
|
6253
|
+
private shouldShowBannerAd;
|
|
6405
6254
|
adjustContentView(): void;
|
|
6406
6255
|
private setPlayerButtonPosition;
|
|
6407
6256
|
updatePlayerButtonIcons(): void;
|
|
@@ -6418,6 +6267,9 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
6418
6267
|
private createProgressElements;
|
|
6419
6268
|
private createProgressPart;
|
|
6420
6269
|
setData(story: IStory): void;
|
|
6270
|
+
get currentContentPage(): IContentPage;
|
|
6271
|
+
get nextContentPage(): IContentPage | null;
|
|
6272
|
+
get prevContentPage(): IContentPage | null;
|
|
6421
6273
|
get currentPage(): BlazeWidgetVideoBase;
|
|
6422
6274
|
get nextPage(): BlazeWidgetVideoBase;
|
|
6423
6275
|
get prevPage(): BlazeWidgetVideoBase;
|
|
@@ -6425,10 +6277,11 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
6425
6277
|
loadStoryPostersByDistance(distance: number): void;
|
|
6426
6278
|
revertNextPageButtonToPreviousAction(): void;
|
|
6427
6279
|
displayRestartStoryButton(): void;
|
|
6428
|
-
playPage(pageIndexToPlayNext: number):
|
|
6280
|
+
playPage(pageIndexToPlayNext: number): void;
|
|
6429
6281
|
updatePublishedDate(index?: number): void;
|
|
6430
6282
|
switchToPage(newPageIndex: number): void;
|
|
6431
|
-
startPage(indexToPlay: number):
|
|
6283
|
+
startPage(indexToPlay: number): void;
|
|
6284
|
+
private shouldGetNewBannerAd;
|
|
6432
6285
|
unload(): void;
|
|
6433
6286
|
displayCurrentStoryPageAndHideTheRest(): void;
|
|
6434
6287
|
load(loadingType?: LoadingType): void;
|
|
@@ -6504,3 +6357,109 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
6504
6357
|
private buildStoryAccessibilityState;
|
|
6505
6358
|
}
|
|
6506
6359
|
|
|
6360
|
+
export declare const ElementId: {
|
|
6361
|
+
BlazeWidgetItem: string;
|
|
6362
|
+
CtaButton: string;
|
|
6363
|
+
BlazeWidgetStoryVideo: string;
|
|
6364
|
+
BlazeWidgetStoryNextPageButton: string;
|
|
6365
|
+
BlazeWidgetStoryPrevPageButton: string;
|
|
6366
|
+
BlazeWidgetStoryNextStoryButton: string;
|
|
6367
|
+
BlazeWidgetStoryPrevStoryButton: string;
|
|
6368
|
+
BlazeWidgetStoryPlayButton: string;
|
|
6369
|
+
BlazeWidgetStoryExitButton: string;
|
|
6370
|
+
BlazeWidgetStoryMuteButton: string;
|
|
6371
|
+
BlazeWidgetStoryShareButton: string;
|
|
6372
|
+
BlazeEmbeddedStoryNextPageButton: string;
|
|
6373
|
+
BlazeEmbeddedStoryPrevPageButton: string;
|
|
6374
|
+
};
|
|
6375
|
+
|
|
6376
|
+
export declare class ElementUtils {
|
|
6377
|
+
static getFirstVisibleElement(page: Page, testId: string): Promise<import("playwright-core").Locator>;
|
|
6378
|
+
}
|
|
6379
|
+
|
|
6380
|
+
export declare const SingleStoryDefaultData: {
|
|
6381
|
+
id: string;
|
|
6382
|
+
title: string;
|
|
6383
|
+
description: string;
|
|
6384
|
+
isLive: boolean;
|
|
6385
|
+
createTime: string;
|
|
6386
|
+
updateTime: string;
|
|
6387
|
+
thumbnails: {
|
|
6388
|
+
rendition: {
|
|
6389
|
+
url: string;
|
|
6390
|
+
bitRate: null;
|
|
6391
|
+
fileSize: null;
|
|
6392
|
+
aspectRatio: string;
|
|
6393
|
+
};
|
|
6394
|
+
renditions: {
|
|
6395
|
+
url: string;
|
|
6396
|
+
bitRate: null;
|
|
6397
|
+
fileSize: null;
|
|
6398
|
+
aspectRatio: string;
|
|
6399
|
+
}[];
|
|
6400
|
+
type: string;
|
|
6401
|
+
}[];
|
|
6402
|
+
pages: {
|
|
6403
|
+
id: string;
|
|
6404
|
+
type: string;
|
|
6405
|
+
index: number;
|
|
6406
|
+
duration: number;
|
|
6407
|
+
isSkippable: boolean;
|
|
6408
|
+
thumbnail: {
|
|
6409
|
+
rendition: {
|
|
6410
|
+
url: string;
|
|
6411
|
+
bitRate: null;
|
|
6412
|
+
fileSize: null;
|
|
6413
|
+
aspectRatio: string;
|
|
6414
|
+
};
|
|
6415
|
+
renditions: {
|
|
6416
|
+
url: string;
|
|
6417
|
+
bitRate: null;
|
|
6418
|
+
fileSize: null;
|
|
6419
|
+
aspectRatio: string;
|
|
6420
|
+
}[];
|
|
6421
|
+
type: string;
|
|
6422
|
+
};
|
|
6423
|
+
cta: {
|
|
6424
|
+
type: string;
|
|
6425
|
+
text: string;
|
|
6426
|
+
url: string;
|
|
6427
|
+
backgroundColor: string;
|
|
6428
|
+
textColor: string;
|
|
6429
|
+
};
|
|
6430
|
+
createTime: string;
|
|
6431
|
+
updateTime: string;
|
|
6432
|
+
baseLayer: {
|
|
6433
|
+
type: string;
|
|
6434
|
+
content: {
|
|
6435
|
+
renditions: {
|
|
6436
|
+
url: string;
|
|
6437
|
+
bitRate: number;
|
|
6438
|
+
fileSize: number;
|
|
6439
|
+
aspectRatio: string;
|
|
6440
|
+
}[];
|
|
6441
|
+
};
|
|
6442
|
+
};
|
|
6443
|
+
interaction: null;
|
|
6444
|
+
ignoreReadStatusForStory: boolean;
|
|
6445
|
+
closedCaptions: {
|
|
6446
|
+
url: string;
|
|
6447
|
+
bitRate: null;
|
|
6448
|
+
fileSize: null;
|
|
6449
|
+
aspectRatio: string;
|
|
6450
|
+
}[];
|
|
6451
|
+
}[];
|
|
6452
|
+
adInfo: null;
|
|
6453
|
+
bannerAdInfo: null;
|
|
6454
|
+
geoRestriction: null;
|
|
6455
|
+
entities: {
|
|
6456
|
+
gameId: string;
|
|
6457
|
+
teamId: null;
|
|
6458
|
+
playerId: null;
|
|
6459
|
+
roundId: null;
|
|
6460
|
+
};
|
|
6461
|
+
};
|
|
6462
|
+
|
|
6463
|
+
|
|
6464
|
+
|
|
6465
|
+
|