@wscsports/blaze-web-sdk 0.19.1 → 0.19.3-beta.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' | 'recommendations';
366
+ type BlazeSourceType = 'labels' | 'ids';
367
367
  export type AdvancedOrdering = 'LiveFirst';
368
368
  export interface BlazeDataSourceType {
369
369
  sourceType: BlazeSourceType;
@@ -374,7 +374,6 @@ export interface BlazeDataSourceType {
374
374
  maxItems?: number;
375
375
  advancedOrdering?: AdvancedOrdering;
376
376
  personalized?: BlazePersonalized;
377
- recommendations?: BlazeRecommendations;
378
377
  }
379
378
  export declare const BlazeInternalError: {
380
379
  LabelExpressionMustNotBeEmpty: string;
@@ -382,15 +381,10 @@ export declare const BlazeInternalError: {
382
381
  IdsMustNotBeEmpty: string;
383
382
  MissingLabelsProperty: string;
384
383
  IdsMustNotHaveSpaces: string;
385
- ForYouNotSupported: string;
386
- TrendingNotSupported: string;
387
- ForYouContentPreparationNotSupported: string;
388
- TrendingContentPreparationNotSupported: string;
389
384
  };
390
385
  export declare class BlazeDataSourceFactory {
391
386
  static createLabelsDataSource(params: LabelsDataSourceParams): BlazeDataSourceType;
392
387
  static createIdsDataSource(params: IdsDataSourceParams): BlazeDataSourceType;
393
- static createRecommendationsDataSource(params: RecommendationsDataSourceParams): BlazeDataSourceType;
394
388
  static setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[] | undefined): string;
395
389
  }
396
390
  export declare class BlazeDataSourceValidations {
@@ -399,7 +393,7 @@ export declare class BlazeDataSourceValidations {
399
393
  labels?: string | string[] | BlazeWidgetLabel;
400
394
  storyIds?: string[];
401
395
  contentIds?: string[];
402
- }, dataSource?: BlazeDataSourceType, contentType?: ContentType): void;
396
+ }, dataSource?: BlazeDataSourceType): void;
403
397
  }
404
398
 
405
399
  export declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): {
@@ -956,7 +950,7 @@ export declare class BlazeTypography extends BaseWidget {
956
950
  attributeChangedCallback(name: AttributeType, oldValue: string, newValue: string): void;
957
951
  onSizeChange(size: SizeType): void;
958
952
  onTextChange(text: string): void;
959
- get fontSize(): ".8rem" | "1rem" | ".5rem";
953
+ get fontSize(): "1rem" | ".8rem" | ".5rem";
960
954
  }
961
955
 
962
956
  export type ButtonAttribute = (typeof BUTTON_ATTRIBUTES)[keyof typeof BUTTON_ATTRIBUTES];
@@ -977,7 +971,7 @@ export declare class BlazeButton extends BaseWidget {
977
971
  get refElement(): ShadowRoot | this;
978
972
  constructor();
979
973
  private setupFocusDelegation;
980
- static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-visible" | "blaze-btn-hidden" | "button-desktop-animation")[];
974
+ static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-hidden" | "blaze-btn-visible" | "button-desktop-animation")[];
981
975
  private onMouseEnter;
982
976
  private onMouseLeave;
983
977
  private onClick;
@@ -1078,7 +1072,7 @@ export declare class BlazeShareButton extends BaseWidget {
1078
1072
  get size(): SizeType;
1079
1073
  set size(value: SizeType);
1080
1074
  set type(value: ShareButtonType);
1081
- get fontSize(): ".8rem" | "1rem" | ".5rem";
1075
+ get fontSize(): "1rem" | ".8rem" | ".5rem";
1082
1076
  connectedCallback(): void;
1083
1077
  disconnectedCallback(): void;
1084
1078
  attributeChangedCallback(name: AttributeType, oldValue: string, newValue: string): void;
@@ -1342,7 +1336,6 @@ export interface AppConfiguration {
1342
1336
  configRefetchIntervalInMinutes?: number;
1343
1337
  enableClientPlaybackModification?: 'true' | 'false' | string;
1344
1338
  };
1345
- recommendationsConfigurations?: IRecommendationsConfigurations;
1346
1339
  sdkLoggerConfigurations?: ILoggerConfiguration;
1347
1340
  }
1348
1341
 
@@ -1589,6 +1582,7 @@ export interface IRendition {
1589
1582
  aspectRatio: ContentAspectRatio;
1590
1583
  bitRate: number;
1591
1584
  fileSize: number;
1585
+ fileType?: 'Mp4' | 'Hls';
1592
1586
  }
1593
1587
 
1594
1588
  export interface IStory extends IContent {
@@ -2008,11 +2002,9 @@ export interface IButtonPlayerConfig {
2008
2002
  export interface IDataSourceBuilder {
2009
2003
  labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
2010
2004
  ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
2011
- recommendations: (params: RecommendationsDataSourceParams) => BlazeDataSourceType;
2012
2005
  }
2013
- export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids' | 'recommendations'>;
2014
- export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'recommendations' | 'labelsPriority' | 'maxItems'>;
2015
- export type RecommendationsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids' | 'labels'>;
2006
+ export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids'>;
2007
+ export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'labelsPriority' | 'maxItems'>;
2016
2008
 
2017
2009
  export interface IDatabase {
2018
2010
  init: () => Promise<void>;
@@ -2129,7 +2121,6 @@ export * from './widget-label-builder.interface';
2129
2121
  export * from './widget-options.interface';
2130
2122
  export * from './widget-view.interface';
2131
2123
  export * from './item-click-callback.interface';
2132
- export * from './recommendations.interface';
2133
2124
  export { default as Observable } from './observable';
2134
2125
 
2135
2126
  export interface ItemClickContext {
@@ -2230,13 +2221,6 @@ export default interface IntersectionObservable {
2230
2221
 
2231
2222
  export type ScreenMode = 'Full Screen' | 'Embedded';
2232
2223
 
2233
- export interface IRecommendationsConfigurations {
2234
- enableForYouContentPreparation: boolean;
2235
- enableTrendingContentPreparation: boolean;
2236
- supportForYou: boolean;
2237
- supportTrending: boolean;
2238
- }
2239
-
2240
2224
  export interface IResponse<T = any> {
2241
2225
  data?: T;
2242
2226
  error?: Error;
@@ -2382,9 +2366,6 @@ type GetByLabelsOptions = GetOptions & {
2382
2366
  type GetByIdsOptions = GetOptions & {
2383
2367
  ids: string[];
2384
2368
  };
2385
- type GetByRecommendationsOptions = GetOptions & {
2386
- recommendations: BlazeRecommendations;
2387
- };
2388
2369
  export interface ApiResponse<T> {
2389
2370
  assetsExpiryTime: string;
2390
2371
  totalItems: number;
@@ -2427,7 +2408,6 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
2427
2408
  error?: Error | undefined;
2428
2409
  }>;
2429
2410
  getMomentsByLabels(options: GetByLabelsOptions): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
2430
- getMomentsByRecommendations(options: GetByRecommendationsOptions): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
2431
2411
  updateMomentLikeStatus(options: {
2432
2412
  momentId: string;
2433
2413
  setLiked: boolean;
@@ -2460,7 +2440,6 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
2460
2440
  private getContentDefaultParams;
2461
2441
  private getContentParamsByLabels;
2462
2442
  private getContentParamsByIds;
2463
- private getContentParamsByRecommendations;
2464
2443
  }
2465
2444
  export declare const ApiService: ApiServiceClass;
2466
2445
 
@@ -3882,7 +3861,6 @@ export * from './action-handler.type';
3882
3861
  export * from './cc-language.type';
3883
3862
  export * from './widget-view-options.type';
3884
3863
  export * from './content-item.type';
3885
- export * from './recommendations.type';
3886
3864
 
3887
3865
  export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
3888
3866
  export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
@@ -3934,18 +3912,6 @@ export type PrefetchingPolicyType = 'low' | 'default';
3934
3912
 
3935
3913
  export type ContentAspectRatio = 'Vertical' | 'Horizontal';
3936
3914
 
3937
- type RecommendationsType = {
3938
- anyLabelFilter?: string[];
3939
- };
3940
- export type BlazeRecommendationsForYou = RecommendationsType & {
3941
- promotedLabels?: string[];
3942
- };
3943
- export type BlazeRecommendationsTrending = RecommendationsType;
3944
- export type BlazeRecommendations = {
3945
- forYou?: BlazeRecommendationsForYou;
3946
- trending?: BlazeRecommendationsTrending;
3947
- };
3948
-
3949
3915
  export type ScreenState = 'default_view' | 'full_screen';
3950
3916
  export type ScreenChangeState = {
3951
3917
  current_state: ScreenState;
@@ -4215,6 +4181,9 @@ export * from './core/video-modal';
4215
4181
  export * from './core/video-player';
4216
4182
  export * from './factory/playback-strategy.factory';
4217
4183
  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';
4218
4187
  export * from './interface/playback-strategy.interface';
4219
4188
  export * from './video-events';
4220
4189
 
@@ -4778,9 +4747,19 @@ export declare class BlazeVideoElement extends BlazeWidgetVideoBase {
4778
4747
  }
4779
4748
 
4780
4749
  export declare class PlaybackStrategyFactory {
4781
- static createStrategy(video: HTMLVideoElement, strategyType: string): PlaybackStrategy;
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;
4782
4757
  }
4783
4758
 
4759
+ export interface PlaybackStrategyOptions {
4760
+ overlay?: BlazeLongFormControlsOverlay;
4761
+ loaderDelegate?: LoaderDelegate;
4762
+ }
4784
4763
  export interface PlayResult {
4785
4764
  status: PlayStatus;
4786
4765
  error?: unknown;
@@ -4792,7 +4771,11 @@ export declare enum PlayStatus {
4792
4771
  export interface PlaybackStrategy {
4793
4772
  play(): Promise<PlayResult>;
4794
4773
  pause(): void;
4795
- initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
4774
+ isPaused(): boolean;
4775
+ isEnded(): boolean;
4776
+ getCurrentTime(): number;
4777
+ reset(): void;
4778
+ initialize(options?: PlaybackStrategyOptions): void;
4796
4779
  toggleMute(): void;
4797
4780
  setMuted(muted: boolean): void;
4798
4781
  isMuted(): boolean;
@@ -4802,39 +4785,115 @@ export interface PlaybackStrategy {
4802
4785
  loadSource(src: string, bitRate: number, startingTime: number): Promise<void>;
4803
4786
  unload(): void;
4804
4787
  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;
4805
4795
  }
4806
4796
 
4807
- export declare class HLSStrategy implements PlaybackStrategy {
4808
- private hls?;
4809
- private videoOverlay?;
4810
- private video;
4811
- private initialBitrateBps;
4812
- private retryCount;
4813
- private maxRetries;
4814
- private lastTime;
4815
- private beforeContentPlayService;
4816
- private playbackWatchdogTimeout?;
4817
- private loaderTimeout?;
4818
- private recoveryTimeout?;
4819
- private seekRecoveryListener?;
4820
- private boundOnManifestParsed;
4821
- private boundOnBufferAppended;
4822
- private boundOnFragParsed;
4823
- private boundOnLoadedMetadata;
4824
- private boundOnPlaying;
4825
- private boundOnCanPlay;
4826
- private boundOnError;
4827
- private boundOnNativeError;
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;
4828
4866
  constructor(video: HTMLVideoElement);
4829
- initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
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;
4830
4878
  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;
4831
4881
  unload(): void;
4832
4882
  destroy(): void;
4833
- private waitForVideoCondition;
4834
4883
  play(): Promise<PlayResult>;
4835
- private startPlaybackWatchdog;
4836
- private handlePlaybackTimeout;
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;
4837
4892
  pause(): void;
4893
+ isPaused(): boolean;
4894
+ isEnded(): boolean;
4895
+ getCurrentTime(): number;
4896
+ reset(): void;
4838
4897
  getDuration(): number;
4839
4898
  isMuted(): boolean;
4840
4899
  seek(clampedSeek: number): void;
@@ -4843,23 +4902,113 @@ export declare class HLSStrategy implements PlaybackStrategy {
4843
4902
  mute(): void;
4844
4903
  unmute(): void;
4845
4904
  toggleFullscreen(): void;
4846
- private updateBuffer;
4847
- private handleManifestParsed;
4848
- private handleBufferAppended;
4849
- private handleFragParsed;
4850
- private handleError;
4851
- private isSlowConnection;
4852
- private nudgePlayback;
4853
- private handleNetworkError;
4854
- private handleOnlineNetworkRecovery;
4855
- private recoverNativeHls;
4856
- private handleMediaError;
4857
- private reloadStream;
4858
- private showLoader;
4859
- private hideLoader;
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;
4860
4956
  private handlePlaying;
4861
- private handleNativeError;
4862
- private handleLoadedMetadata;
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;
4863
5012
  }
4864
5013
 
4865
5014
  export * from './widget-video-base';
@@ -4937,7 +5086,6 @@ export declare abstract class WidgetBaseLayout extends BlazeWidgetScrollable imp
4937
5086
  setContentIds(ids: string[], options?: ISetWidgetOptions): void;
4938
5087
  setMaxItemsSize(maxItemsSize?: number, options?: ISetWidgetOptions): void;
4939
5088
  setActionHandlers(actionHandlers: ActionHandler[]): void;
4940
- setRecommendations(recommendations?: BlazeRecommendations, options?: ISetWidgetOptions): void;
4941
5089
  protected appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal | BlazeWidgetVideoModal): void;
4942
5090
  updateWidgetsData(): void;
4943
5091
  protected abstract reorderWidgetItems(): void;
@@ -5382,6 +5530,7 @@ export declare class BlazeWidgetLayout extends WidgetBaseLayout {
5382
5530
  connectWidgets(): void;
5383
5531
  get thumbnailShape(): ThumbnailShape;
5384
5532
  widgetType(): WidgetType;
5533
+ setPersonalized(personalized?: BlazePersonalized): void;
5385
5534
  private setupAccessibility;
5386
5535
  private updateAccessibilityLabel;
5387
5536
  onKeyDown(e: KeyboardEvent): void;
@@ -5633,6 +5782,9 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5633
5782
  loaderTimeoutRefAppending: NodeJS.Timeout | undefined;
5634
5783
  lastErrorExecutionTime: number;
5635
5784
  private beforeContentPlayService;
5785
+ private playbackStrategy?;
5786
+ private playerCommands?;
5787
+ private isHLSVideo;
5636
5788
  isVideoStartPlaying: boolean;
5637
5789
  isError: boolean;
5638
5790
  isLoaded: boolean;
@@ -5657,15 +5809,19 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5657
5809
  private isEnableInteractions;
5658
5810
  loadClosedCaptions(): Promise<void>;
5659
5811
  getVideoDuration(existingVideo?: HTMLVideoElement): Promise<number>;
5812
+ private determinePosterUrl;
5660
5813
  loadPoster(): void;
5661
5814
  display(): void;
5662
5815
  hide(): void;
5663
5816
  load(loadingType?: LoadingType): Promise<void>;
5664
5817
  private setVideoSource;
5818
+ reloadHLSWithNewUrl(newVideoUrl: string): Promise<void>;
5819
+ private initializeHLSStrategy;
5820
+ private fallbackToNativeVideo;
5821
+ private cleanupHLSStrategy;
5665
5822
  unload(): Promise<void>;
5666
5823
  resetVideoState(): void;
5667
5824
  removeLoader(): void;
5668
- startPlayVideo(video: HTMLVideoElement, maxRetryTimes: number): Promise<void>;
5669
5825
  tryReloadVideo(retryTime: number): void;
5670
5826
  tryToAddLoader(): void;
5671
5827
  play(): Promise<void>;
@@ -5677,18 +5833,17 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5677
5833
  requestFrameCallback(callback: () => void): void;
5678
5834
  mainElement(): CanvasImageSource;
5679
5835
  get paused(): boolean;
5836
+ get ended(): boolean;
5680
5837
  get muted(): boolean;
5681
5838
  set muted(value: boolean);
5682
5839
  get isAd(): boolean;
5683
5840
  render(): void;
5684
- restartVideo(): void;
5685
5841
  handleAdStarted(): void;
5686
5842
  handleAdEnded(): void;
5687
5843
  loadInteraction(): void;
5688
5844
  onLanguageChange(event: Event): Promise<void>;
5689
5845
  handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
5690
5846
  private tryToPlayAd;
5691
- private updateVideoUrlWithBeforeContentPlay;
5692
5847
  }
5693
5848
 
5694
5849
  export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
@@ -5818,7 +5973,7 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
5818
5973
  setModalContent(data: IMoment[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
5819
5974
  onKeyDown(ev: KeyboardEvent): void;
5820
5975
  close(): void;
5821
- open(): void;
5976
+ open(): Promise<void>;
5822
5977
  play(): void;
5823
5978
  setExitButtonDisplay(): void;
5824
5979
  render(): void;
@@ -6215,6 +6370,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6215
6370
  totalPlayStopwatch: Stopwatch;
6216
6371
  shadowTopElement: HTMLDivElement;
6217
6372
  navigationTimeout: NodeJS.Timeout | null;
6373
+ prefetchTimeout: NodeJS.Timeout | null;
6218
6374
  lastPageIndexToResume: number;
6219
6375
  elementsToHideOnWebAds: (HTMLElement | undefined)[];
6220
6376
  elementsToHideOnImaAds: (HTMLElement | undefined)[];
@@ -6269,10 +6425,10 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6269
6425
  loadStoryPostersByDistance(distance: number): void;
6270
6426
  revertNextPageButtonToPreviousAction(): void;
6271
6427
  displayRestartStoryButton(): void;
6272
- playPage(pageIndexToPlayNext: number): void;
6428
+ playPage(pageIndexToPlayNext: number): Promise<void>;
6273
6429
  updatePublishedDate(index?: number): void;
6274
6430
  switchToPage(newPageIndex: number): void;
6275
- startPage(indexToPlay: number): void;
6431
+ startPage(indexToPlay: number): Promise<void>;
6276
6432
  unload(): void;
6277
6433
  displayCurrentStoryPageAndHideTheRest(): void;
6278
6434
  load(loadingType?: LoadingType): void;
@@ -6348,109 +6504,3 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6348
6504
  private buildStoryAccessibilityState;
6349
6505
  }
6350
6506
 
6351
- export declare const ElementId: {
6352
- BlazeWidgetItem: string;
6353
- CtaButton: string;
6354
- BlazeWidgetStoryVideo: string;
6355
- BlazeWidgetStoryNextPageButton: string;
6356
- BlazeWidgetStoryPrevPageButton: string;
6357
- BlazeWidgetStoryNextStoryButton: string;
6358
- BlazeWidgetStoryPrevStoryButton: string;
6359
- BlazeWidgetStoryPlayButton: string;
6360
- BlazeWidgetStoryExitButton: string;
6361
- BlazeWidgetStoryMuteButton: string;
6362
- BlazeWidgetStoryShareButton: string;
6363
- BlazeEmbeddedStoryNextPageButton: string;
6364
- BlazeEmbeddedStoryPrevPageButton: string;
6365
- };
6366
-
6367
- export declare class ElementUtils {
6368
- static getFirstVisibleElement(page: Page, testId: string): Promise<import("playwright-core").Locator>;
6369
- }
6370
-
6371
- export declare const SingleStoryDefaultData: {
6372
- id: string;
6373
- title: string;
6374
- description: string;
6375
- isLive: boolean;
6376
- createTime: string;
6377
- updateTime: string;
6378
- thumbnails: {
6379
- rendition: {
6380
- url: string;
6381
- bitRate: null;
6382
- fileSize: null;
6383
- aspectRatio: string;
6384
- };
6385
- renditions: {
6386
- url: string;
6387
- bitRate: null;
6388
- fileSize: null;
6389
- aspectRatio: string;
6390
- }[];
6391
- type: string;
6392
- }[];
6393
- pages: {
6394
- id: string;
6395
- type: string;
6396
- index: number;
6397
- duration: number;
6398
- isSkippable: boolean;
6399
- thumbnail: {
6400
- rendition: {
6401
- url: string;
6402
- bitRate: null;
6403
- fileSize: null;
6404
- aspectRatio: string;
6405
- };
6406
- renditions: {
6407
- url: string;
6408
- bitRate: null;
6409
- fileSize: null;
6410
- aspectRatio: string;
6411
- }[];
6412
- type: string;
6413
- };
6414
- cta: {
6415
- type: string;
6416
- text: string;
6417
- url: string;
6418
- backgroundColor: string;
6419
- textColor: string;
6420
- };
6421
- createTime: string;
6422
- updateTime: string;
6423
- baseLayer: {
6424
- type: string;
6425
- content: {
6426
- renditions: {
6427
- url: string;
6428
- bitRate: number;
6429
- fileSize: number;
6430
- aspectRatio: string;
6431
- }[];
6432
- };
6433
- };
6434
- interaction: null;
6435
- ignoreReadStatusForStory: boolean;
6436
- closedCaptions: {
6437
- url: string;
6438
- bitRate: null;
6439
- fileSize: null;
6440
- aspectRatio: string;
6441
- }[];
6442
- }[];
6443
- adInfo: null;
6444
- bannerAdInfo: null;
6445
- geoRestriction: null;
6446
- entities: {
6447
- gameId: string;
6448
- teamId: null;
6449
- playerId: null;
6450
- roundId: null;
6451
- };
6452
- };
6453
-
6454
-
6455
-
6456
-