@wscsports/blaze-web-sdk 0.19.3-beta.1 → 0.20.1

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.
@@ -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(): "1rem" | ".8rem" | ".5rem";
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-hidden" | "blaze-btn-visible" | "button-desktop-animation")[];
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(): "1rem" | ".8rem" | ".5rem";
1081
+ get fontSize(): ".8rem" | "1rem" | ".5rem";
1076
1082
  connectedCallback(): void;
1077
1083
  disconnectedCallback(): void;
1078
1084
  attributeChangedCallback(name: AttributeType, oldValue: string, newValue: string): void;
@@ -1265,6 +1271,8 @@ export declare const Z_INDEX: {
1265
1271
  readonly player: "1";
1266
1272
  readonly interaction: "2";
1267
1273
  readonly onTopOfPlayer: "3";
1274
+ readonly menuBackdrop: "99";
1275
+ readonly menu: "100";
1268
1276
  };
1269
1277
 
1270
1278
  export declare const ONE_SECOND = 1000;
@@ -1336,6 +1344,7 @@ export interface AppConfiguration {
1336
1344
  configRefetchIntervalInMinutes?: number;
1337
1345
  enableClientPlaybackModification?: 'true' | 'false' | string;
1338
1346
  };
1347
+ recommendationsConfigurations?: IRecommendationsConfigurations;
1339
1348
  sdkLoggerConfigurations?: ILoggerConfiguration;
1340
1349
  }
1341
1350
 
@@ -1557,6 +1566,7 @@ export interface IContentPage extends IBasePage {
1557
1566
  cta: ICta;
1558
1567
  parentStoryId?: string;
1559
1568
  shouldShowImaAd?: boolean;
1569
+ shouldShowBannerAd?: boolean;
1560
1570
  adInfo?: IAdInfo;
1561
1571
  interaction?: Interaction;
1562
1572
  poster?: IThumbnail;
@@ -1582,7 +1592,6 @@ export interface IRendition {
1582
1592
  aspectRatio: ContentAspectRatio;
1583
1593
  bitRate: number;
1584
1594
  fileSize: number;
1585
- fileType?: 'Mp4' | 'Hls';
1586
1595
  }
1587
1596
 
1588
1597
  export interface IStory extends IContent {
@@ -2002,9 +2011,11 @@ export interface IButtonPlayerConfig {
2002
2011
  export interface IDataSourceBuilder {
2003
2012
  labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
2004
2013
  ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
2014
+ recommendations: (params: RecommendationsDataSourceParams) => BlazeDataSourceType;
2005
2015
  }
2006
- export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids'>;
2007
- export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'labelsPriority' | 'maxItems'>;
2016
+ export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids' | 'recommendations'>;
2017
+ export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'recommendations' | 'labelsPriority' | 'maxItems'>;
2018
+ export type RecommendationsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids' | 'labels'>;
2008
2019
 
2009
2020
  export interface IDatabase {
2010
2021
  init: () => Promise<void>;
@@ -2121,6 +2132,7 @@ export * from './widget-label-builder.interface';
2121
2132
  export * from './widget-options.interface';
2122
2133
  export * from './widget-view.interface';
2123
2134
  export * from './item-click-callback.interface';
2135
+ export * from './recommendations.interface';
2124
2136
  export { default as Observable } from './observable';
2125
2137
 
2126
2138
  export interface ItemClickContext {
@@ -2221,6 +2233,13 @@ export default interface IntersectionObservable {
2221
2233
 
2222
2234
  export type ScreenMode = 'Full Screen' | 'Embedded';
2223
2235
 
2236
+ export interface IRecommendationsConfigurations {
2237
+ enableForYouContentPreparation: boolean;
2238
+ enableTrendingContentPreparation: boolean;
2239
+ supportForYou: boolean;
2240
+ supportTrending: boolean;
2241
+ }
2242
+
2224
2243
  export interface IResponse<T = any> {
2225
2244
  data?: T;
2226
2245
  error?: Error;
@@ -2366,6 +2385,9 @@ type GetByLabelsOptions = GetOptions & {
2366
2385
  type GetByIdsOptions = GetOptions & {
2367
2386
  ids: string[];
2368
2387
  };
2388
+ type GetByRecommendationsOptions = GetOptions & {
2389
+ recommendations: BlazeRecommendations;
2390
+ };
2369
2391
  export interface ApiResponse<T> {
2370
2392
  assetsExpiryTime: string;
2371
2393
  totalItems: number;
@@ -2408,6 +2430,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
2408
2430
  error?: Error | undefined;
2409
2431
  }>;
2410
2432
  getMomentsByLabels(options: GetByLabelsOptions): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
2433
+ getMomentsByRecommendations(options: GetByRecommendationsOptions): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
2411
2434
  updateMomentLikeStatus(options: {
2412
2435
  momentId: string;
2413
2436
  setLiked: boolean;
@@ -2440,6 +2463,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
2440
2463
  private getContentDefaultParams;
2441
2464
  private getContentParamsByLabels;
2442
2465
  private getContentParamsByIds;
2466
+ private getContentParamsByRecommendations;
2443
2467
  }
2444
2468
  export declare const ApiService: ApiServiceClass;
2445
2469
 
@@ -3861,6 +3885,7 @@ export * from './action-handler.type';
3861
3885
  export * from './cc-language.type';
3862
3886
  export * from './widget-view-options.type';
3863
3887
  export * from './content-item.type';
3888
+ export * from './recommendations.type';
3864
3889
 
3865
3890
  export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
3866
3891
  export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
@@ -3912,6 +3937,18 @@ export type PrefetchingPolicyType = 'low' | 'default';
3912
3937
 
3913
3938
  export type ContentAspectRatio = 'Vertical' | 'Horizontal';
3914
3939
 
3940
+ type RecommendationsType = {
3941
+ anyLabelFilter?: string[];
3942
+ };
3943
+ export type BlazeRecommendationsForYou = RecommendationsType & {
3944
+ promotedLabels?: string[];
3945
+ };
3946
+ export type BlazeRecommendationsTrending = RecommendationsType;
3947
+ export type BlazeRecommendations = {
3948
+ forYou?: BlazeRecommendationsForYou;
3949
+ trending?: BlazeRecommendationsTrending;
3950
+ };
3951
+
3915
3952
  export type ScreenState = 'default_view' | 'full_screen';
3916
3953
  export type ScreenChangeState = {
3917
3954
  current_state: ScreenState;
@@ -4181,9 +4218,6 @@ export * from './core/video-modal';
4181
4218
  export * from './core/video-player';
4182
4219
  export * from './factory/playback-strategy.factory';
4183
4220
  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
4221
  export * from './interface/playback-strategy.interface';
4188
4222
  export * from './video-events';
4189
4223
 
@@ -4747,19 +4781,9 @@ export declare class BlazeVideoElement extends BlazeWidgetVideoBase {
4747
4781
  }
4748
4782
 
4749
4783
  export declare class PlaybackStrategyFactory {
4750
- static createStrategy(video: HTMLVideoElement, strategyType: string, widget?: BlazeWidgetVideo): PlaybackStrategy;
4751
- }
4752
-
4753
- export interface LoaderDelegate {
4754
- show(): void;
4755
- hide(): void;
4756
- isVisible?(): boolean;
4784
+ static createStrategy(video: HTMLVideoElement, strategyType: string): PlaybackStrategy;
4757
4785
  }
4758
4786
 
4759
- export interface PlaybackStrategyOptions {
4760
- overlay?: BlazeLongFormControlsOverlay;
4761
- loaderDelegate?: LoaderDelegate;
4762
- }
4763
4787
  export interface PlayResult {
4764
4788
  status: PlayStatus;
4765
4789
  error?: unknown;
@@ -4771,11 +4795,7 @@ export declare enum PlayStatus {
4771
4795
  export interface PlaybackStrategy {
4772
4796
  play(): Promise<PlayResult>;
4773
4797
  pause(): void;
4774
- isPaused(): boolean;
4775
- isEnded(): boolean;
4776
- getCurrentTime(): number;
4777
- reset(): void;
4778
- initialize(options?: PlaybackStrategyOptions): void;
4798
+ initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
4779
4799
  toggleMute(): void;
4780
4800
  setMuted(muted: boolean): void;
4781
4801
  isMuted(): boolean;
@@ -4785,115 +4805,39 @@ export interface PlaybackStrategy {
4785
4805
  loadSource(src: string, bitRate: number, startingTime: number): Promise<void>;
4786
4806
  unload(): void;
4787
4807
  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
4808
  }
4796
4809
 
4797
- declare const Hls: any;
4798
- export interface HLSConfig {
4799
- maxBufferLength: number;
4800
- maxMaxBufferLength: number;
4801
- maxBufferSize: number;
4802
- maxBufferHole: number;
4803
- fragLoadingMaxRetry: number;
4804
- fragLoadingRetryDelay: number;
4805
- abrEwmaFastLive: number;
4806
- abrEwmaSlowLive: number;
4807
- abrEwmaFastVoD: number;
4808
- abrEwmaSlowVoD: number;
4809
- abrBandWidthFactor: number;
4810
- abrBandWidthUpFactor: number;
4811
- }
4812
- export declare const HLS_CONFIGS: {
4813
- readonly LONG_FORM: {
4814
- readonly maxBufferLength: 30;
4815
- readonly maxMaxBufferLength: 30;
4816
- readonly maxBufferSize: number;
4817
- readonly maxBufferHole: 4;
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;
4810
+ export declare class HLSStrategy implements PlaybackStrategy {
4811
+ private hls?;
4812
+ private videoOverlay?;
4813
+ private video;
4814
+ private initialBitrateBps;
4815
+ private retryCount;
4816
+ private maxRetries;
4817
+ private lastTime;
4818
+ private beforeContentPlayService;
4819
+ private playbackWatchdogTimeout?;
4820
+ private loaderTimeout?;
4821
+ private recoveryTimeout?;
4822
+ private seekRecoveryListener?;
4823
+ private boundOnManifestParsed;
4824
+ private boundOnBufferAppended;
4825
+ private boundOnFragParsed;
4826
+ private boundOnLoadedMetadata;
4827
+ private boundOnPlaying;
4828
+ private boundOnCanPlay;
4829
+ private boundOnError;
4830
+ private boundOnNativeError;
4866
4831
  constructor(video: HTMLVideoElement);
4867
- setContentMetadata(metadata: {
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;
4832
+ initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
4878
4833
  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
4834
  unload(): void;
4882
4835
  destroy(): void;
4836
+ private waitForVideoCondition;
4883
4837
  play(): Promise<PlayResult>;
4884
- protected dispatchPlaybackEvent(eventStatus: 'success' | 'failed' | 'ready' | 'changed' | 'buffering' | 'recovered', context: {
4885
- result?: PlayResult;
4886
- timeToPlay?: number;
4887
- timeToFail?: number;
4888
- error?: any;
4889
- previousState?: any;
4890
- newState?: any;
4891
- }): void;
4838
+ private startPlaybackWatchdog;
4839
+ private handlePlaybackTimeout;
4892
4840
  pause(): void;
4893
- isPaused(): boolean;
4894
- isEnded(): boolean;
4895
- getCurrentTime(): number;
4896
- reset(): void;
4897
4841
  getDuration(): number;
4898
4842
  isMuted(): boolean;
4899
4843
  seek(clampedSeek: number): void;
@@ -4902,113 +4846,23 @@ export declare abstract class BaseHLSStrategy implements PlaybackStrategy {
4902
4846
  mute(): void;
4903
4847
  unmute(): void;
4904
4848
  toggleFullscreen(): void;
4905
- protected waitForVideoCondition<T extends keyof HTMLMediaElementEventMap>(predicate: () => boolean, eventType: T, timeoutMs?: number): Promise<HTMLMediaElementEventMap[T] | void>;
4906
- protected startPlaybackWatchdog(): void;
4907
- protected handlePlaybackTimeout(): void;
4908
- protected handleSeekRecovery(seekTime: number): void;
4909
- protected isSlowConnection(): boolean;
4910
- protected handleManifestParsed(): void;
4911
- protected handleBufferAppended(): void;
4912
- protected handleFragParsed(): void;
4913
- protected handleError(event: any, data: any): void;
4914
- protected handlePlaying(): void;
4915
- protected handleNativeError(e: Event): void;
4916
- protected handleLoadedMetadata(): void;
4917
- protected getBufferProgress(): number;
4918
- protected showLoader(): void;
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;
4849
+ private updateBuffer;
4850
+ private handleManifestParsed;
4851
+ private handleBufferAppended;
4852
+ private handleFragParsed;
4853
+ private handleError;
4854
+ private isSlowConnection;
4855
+ private nudgePlayback;
4856
+ private handleNetworkError;
4857
+ private handleOnlineNetworkRecovery;
4858
+ private recoverNativeHls;
4859
+ private handleMediaError;
4860
+ private reloadStream;
4861
+ private showLoader;
4862
+ private hideLoader;
4956
4863
  private handlePlaying;
4957
- private handlePause;
4958
- private handleCanPlayThrough;
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;
4864
+ private handleNativeError;
4865
+ private handleLoadedMetadata;
5012
4866
  }
5013
4867
 
5014
4868
  export * from './widget-video-base';
@@ -5086,6 +4940,7 @@ export declare abstract class WidgetBaseLayout extends BlazeWidgetScrollable imp
5086
4940
  setContentIds(ids: string[], options?: ISetWidgetOptions): void;
5087
4941
  setMaxItemsSize(maxItemsSize?: number, options?: ISetWidgetOptions): void;
5088
4942
  setActionHandlers(actionHandlers: ActionHandler[]): void;
4943
+ setRecommendations(recommendations?: BlazeRecommendations, options?: ISetWidgetOptions): void;
5089
4944
  protected appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal | BlazeWidgetVideoModal): void;
5090
4945
  updateWidgetsData(): void;
5091
4946
  protected abstract reorderWidgetItems(): void;
@@ -5530,7 +5385,6 @@ export declare class BlazeWidgetLayout extends WidgetBaseLayout {
5530
5385
  connectWidgets(): void;
5531
5386
  get thumbnailShape(): ThumbnailShape;
5532
5387
  widgetType(): WidgetType;
5533
- setPersonalized(personalized?: BlazePersonalized): void;
5534
5388
  private setupAccessibility;
5535
5389
  private updateAccessibilityLabel;
5536
5390
  onKeyDown(e: KeyboardEvent): void;
@@ -5782,9 +5636,6 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5782
5636
  loaderTimeoutRefAppending: NodeJS.Timeout | undefined;
5783
5637
  lastErrorExecutionTime: number;
5784
5638
  private beforeContentPlayService;
5785
- private playbackStrategy?;
5786
- private playerCommands?;
5787
- private isHLSVideo;
5788
5639
  isVideoStartPlaying: boolean;
5789
5640
  isError: boolean;
5790
5641
  isLoaded: boolean;
@@ -5809,19 +5660,15 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5809
5660
  private isEnableInteractions;
5810
5661
  loadClosedCaptions(): Promise<void>;
5811
5662
  getVideoDuration(existingVideo?: HTMLVideoElement): Promise<number>;
5812
- private determinePosterUrl;
5813
5663
  loadPoster(): void;
5814
5664
  display(): void;
5815
5665
  hide(): void;
5816
5666
  load(loadingType?: LoadingType): Promise<void>;
5817
5667
  private setVideoSource;
5818
- reloadHLSWithNewUrl(newVideoUrl: string): Promise<void>;
5819
- private initializeHLSStrategy;
5820
- private fallbackToNativeVideo;
5821
- private cleanupHLSStrategy;
5822
5668
  unload(): Promise<void>;
5823
5669
  resetVideoState(): void;
5824
5670
  removeLoader(): void;
5671
+ startPlayVideo(video: HTMLVideoElement, maxRetryTimes: number): Promise<void>;
5825
5672
  tryReloadVideo(retryTime: number): void;
5826
5673
  tryToAddLoader(): void;
5827
5674
  play(): Promise<void>;
@@ -5833,17 +5680,18 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5833
5680
  requestFrameCallback(callback: () => void): void;
5834
5681
  mainElement(): CanvasImageSource;
5835
5682
  get paused(): boolean;
5836
- get ended(): boolean;
5837
5683
  get muted(): boolean;
5838
5684
  set muted(value: boolean);
5839
5685
  get isAd(): boolean;
5840
5686
  render(): void;
5687
+ restartVideo(): void;
5841
5688
  handleAdStarted(): void;
5842
5689
  handleAdEnded(): void;
5843
5690
  loadInteraction(): void;
5844
5691
  onLanguageChange(event: Event): Promise<void>;
5845
5692
  handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
5846
5693
  private tryToPlayAd;
5694
+ private updateVideoUrlWithBeforeContentPlay;
5847
5695
  }
5848
5696
 
5849
5697
  export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
@@ -5892,6 +5740,7 @@ export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
5892
5740
 
5893
5741
  export declare class BlazeWidgetBannerAd extends HTMLElement {
5894
5742
  parentContnet: BlazeWidgetContent;
5743
+ isHidden(): boolean;
5895
5744
  constructor(parentContent: BlazeWidgetContent);
5896
5745
  private adContainer;
5897
5746
  private bannerAdInfo;
@@ -5899,7 +5748,9 @@ export declare class BlazeWidgetBannerAd extends HTMLElement {
5899
5748
  private get googletag();
5900
5749
  connectedCallback(): void;
5901
5750
  disconnectedCallback(): void;
5902
- show(bannerAdInfo?: IBannerAdInfo): void;
5751
+ show(bannerAdInfo?: IBannerAdInfo, sendBannerViewEvent?: boolean): void;
5752
+ hide(): void;
5753
+ unhide(): void;
5903
5754
  private setInitialStyles;
5904
5755
  private setAdContainer;
5905
5756
  private raiseAnalyticsEventToParent;
@@ -5973,7 +5824,7 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
5973
5824
  setModalContent(data: IMoment[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
5974
5825
  onKeyDown(ev: KeyboardEvent): void;
5975
5826
  close(): void;
5976
- open(): Promise<void>;
5827
+ open(): void;
5977
5828
  play(): void;
5978
5829
  setExitButtonDisplay(): void;
5979
5830
  render(): void;
@@ -6370,7 +6221,6 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6370
6221
  totalPlayStopwatch: Stopwatch;
6371
6222
  shadowTopElement: HTMLDivElement;
6372
6223
  navigationTimeout: NodeJS.Timeout | null;
6373
- prefetchTimeout: NodeJS.Timeout | null;
6374
6224
  lastPageIndexToResume: number;
6375
6225
  elementsToHideOnWebAds: (HTMLElement | undefined)[];
6376
6226
  elementsToHideOnImaAds: (HTMLElement | undefined)[];
@@ -6402,6 +6252,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6402
6252
  private disableStoriesNavigationButtons;
6403
6253
  private disablePageNavigationButtons;
6404
6254
  private setButtonNavigationAsDisabled;
6255
+ private shouldShowBannerAd;
6405
6256
  adjustContentView(): void;
6406
6257
  private setPlayerButtonPosition;
6407
6258
  updatePlayerButtonIcons(): void;
@@ -6418,6 +6269,9 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6418
6269
  private createProgressElements;
6419
6270
  private createProgressPart;
6420
6271
  setData(story: IStory): void;
6272
+ get currentContentPage(): IContentPage;
6273
+ get nextContentPage(): IContentPage | null;
6274
+ get prevContentPage(): IContentPage | null;
6421
6275
  get currentPage(): BlazeWidgetVideoBase;
6422
6276
  get nextPage(): BlazeWidgetVideoBase;
6423
6277
  get prevPage(): BlazeWidgetVideoBase;
@@ -6425,10 +6279,11 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6425
6279
  loadStoryPostersByDistance(distance: number): void;
6426
6280
  revertNextPageButtonToPreviousAction(): void;
6427
6281
  displayRestartStoryButton(): void;
6428
- playPage(pageIndexToPlayNext: number): Promise<void>;
6282
+ playPage(pageIndexToPlayNext: number): void;
6429
6283
  updatePublishedDate(index?: number): void;
6430
6284
  switchToPage(newPageIndex: number): void;
6431
- startPage(indexToPlay: number): Promise<void>;
6285
+ startPage(indexToPlay: number): void;
6286
+ private shouldGetNewBannerAd;
6432
6287
  unload(): void;
6433
6288
  displayCurrentStoryPageAndHideTheRest(): void;
6434
6289
  load(loadingType?: LoadingType): void;
@@ -6504,3 +6359,109 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6504
6359
  private buildStoryAccessibilityState;
6505
6360
  }
6506
6361
 
6362
+ export declare const ElementId: {
6363
+ BlazeWidgetItem: string;
6364
+ CtaButton: string;
6365
+ BlazeWidgetStoryVideo: string;
6366
+ BlazeWidgetStoryNextPageButton: string;
6367
+ BlazeWidgetStoryPrevPageButton: string;
6368
+ BlazeWidgetStoryNextStoryButton: string;
6369
+ BlazeWidgetStoryPrevStoryButton: string;
6370
+ BlazeWidgetStoryPlayButton: string;
6371
+ BlazeWidgetStoryExitButton: string;
6372
+ BlazeWidgetStoryMuteButton: string;
6373
+ BlazeWidgetStoryShareButton: string;
6374
+ BlazeEmbeddedStoryNextPageButton: string;
6375
+ BlazeEmbeddedStoryPrevPageButton: string;
6376
+ };
6377
+
6378
+ export declare class ElementUtils {
6379
+ static getFirstVisibleElement(page: Page, testId: string): Promise<import("playwright-core").Locator>;
6380
+ }
6381
+
6382
+ export declare const SingleStoryDefaultData: {
6383
+ id: string;
6384
+ title: string;
6385
+ description: string;
6386
+ isLive: boolean;
6387
+ createTime: string;
6388
+ updateTime: string;
6389
+ thumbnails: {
6390
+ rendition: {
6391
+ url: string;
6392
+ bitRate: null;
6393
+ fileSize: null;
6394
+ aspectRatio: string;
6395
+ };
6396
+ renditions: {
6397
+ url: string;
6398
+ bitRate: null;
6399
+ fileSize: null;
6400
+ aspectRatio: string;
6401
+ }[];
6402
+ type: string;
6403
+ }[];
6404
+ pages: {
6405
+ id: string;
6406
+ type: string;
6407
+ index: number;
6408
+ duration: number;
6409
+ isSkippable: boolean;
6410
+ thumbnail: {
6411
+ rendition: {
6412
+ url: string;
6413
+ bitRate: null;
6414
+ fileSize: null;
6415
+ aspectRatio: string;
6416
+ };
6417
+ renditions: {
6418
+ url: string;
6419
+ bitRate: null;
6420
+ fileSize: null;
6421
+ aspectRatio: string;
6422
+ }[];
6423
+ type: string;
6424
+ };
6425
+ cta: {
6426
+ type: string;
6427
+ text: string;
6428
+ url: string;
6429
+ backgroundColor: string;
6430
+ textColor: string;
6431
+ };
6432
+ createTime: string;
6433
+ updateTime: string;
6434
+ baseLayer: {
6435
+ type: string;
6436
+ content: {
6437
+ renditions: {
6438
+ url: string;
6439
+ bitRate: number;
6440
+ fileSize: number;
6441
+ aspectRatio: string;
6442
+ }[];
6443
+ };
6444
+ };
6445
+ interaction: null;
6446
+ ignoreReadStatusForStory: boolean;
6447
+ closedCaptions: {
6448
+ url: string;
6449
+ bitRate: null;
6450
+ fileSize: null;
6451
+ aspectRatio: string;
6452
+ }[];
6453
+ }[];
6454
+ adInfo: null;
6455
+ bannerAdInfo: null;
6456
+ geoRestriction: null;
6457
+ entities: {
6458
+ gameId: string;
6459
+ teamId: null;
6460
+ playerId: null;
6461
+ roundId: null;
6462
+ };
6463
+ };
6464
+
6465
+
6466
+
6467
+