@wscsports/blaze-web-sdk 0.17.0 → 0.18.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wscsports/blaze-web-sdk",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -32,6 +32,7 @@ export declare function setAbTestParams(abTestParams: BlazeAbTestType): void;
32
32
  export declare function getAppContextManager(): Record<string, any>;
33
33
  export declare const pushConsentEvent: (action: string, body: Record<string, any>) => void;
34
34
  export declare const isInitialized: () => boolean;
35
+ export declare function setBeforeContentPlayCallback(callback: BeforeContentPlayCallback | undefined): void;
35
36
  declare const _default: {
36
37
  Initialize: typeof Initialize;
37
38
  WidgetGridView: typeof WidgetGridView;
@@ -58,6 +59,7 @@ declare const _default: {
58
59
  getAppContextManager: typeof getAppContextManager;
59
60
  pushConsentEvent: (action: string, body: Record<string, any>) => void;
60
61
  isInitialized: () => boolean;
62
+ setBeforeContentPlayCallback: typeof setBeforeContentPlayCallback;
61
63
  };
62
64
  export default _default;
63
65
 
@@ -1332,6 +1334,7 @@ export interface AppConfiguration {
1332
1334
  configurations: {
1333
1335
  analyticsAddEntitiesInfo?: string;
1334
1336
  configRefetchIntervalInMinutes?: number;
1337
+ enableClientPlaybackModification?: 'true' | 'false' | string;
1335
1338
  };
1336
1339
  sdkLoggerConfigurations?: ILoggerConfiguration;
1337
1340
  }
@@ -1858,11 +1861,18 @@ export declare const linkIconSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaH
1858
1861
  export declare const checkMarkSvg = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swXzUxMl8xMDY4IiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IiNEOUQ5RDkiLz4KPC9tYXNrPgo8ZyBtYXNrPSJ1cmwoI21hc2swXzUxMl8xMDY4KSI+CjxwYXRoIGQ9Ik05LjU1MDEgMThMMy44NTAxIDEyLjNMNS4yNzUxIDEwLjg3NUw5LjU1MDEgMTUuMTVMMTguNzI1MSA1Ljk3NDk4TDIwLjE1MDEgNy4zOTk5OEw5LjU1MDEgMThaIiBmaWxsPSIjRjBGMEYwIi8+CjwvZz4KPC9zdmc+Cg==";
1859
1862
 
1860
1863
  export interface AccessibilityContext {
1864
+ trigger: 'user' | 'auto' | 'navigation' | 'modal';
1861
1865
  navigationType?: string;
1866
+ previousPosition?: number;
1867
+ }
1862
1868
  export interface ModalContext extends AccessibilityContext {
1869
+ position: number;
1863
1870
  total: number;
1871
+ title?: string;
1864
1872
  isPlaying?: boolean;
1873
+ isMuted?: boolean;
1865
1874
  hasClosedCaptions?: boolean;
1875
+ pagePosition?: number;
1866
1876
  totalPages?: number;
1867
1877
  }
1868
1878
  export interface UserActionContext extends AccessibilityContext {
@@ -1935,6 +1945,14 @@ export interface ImaAdHandler {
1935
1945
  provideAdExtraParams?: (contentExtraInfo?: ContentExtraInfo) => ImaExtraParams;
1936
1946
  }
1937
1947
 
1948
+ export interface BeforeContentPlayContext {
1949
+ originalUrl: string;
1950
+ }
1951
+ export interface BeforeContentPlayResult {
1952
+ resultUrl: string;
1953
+ }
1954
+ export type BeforeContentPlayCallback = (context: BeforeContentPlayContext) => Promise<BeforeContentPlayResult> | BeforeContentPlayResult;
1955
+
1938
1956
  export interface ISmoothOpenCloseModal {
1939
1957
  storyId?: string;
1940
1958
  pageIndex: number;
@@ -2084,6 +2102,7 @@ export type BlazeVideoIconsStyle = BaseBlazeIcons & {
2084
2102
 
2085
2103
  export * from './accessibility-manager.interface';
2086
2104
  export * from './ad-handler.interface';
2105
+ export * from './before-content-play.interface';
2087
2106
  export * from './behaviors.interface';
2088
2107
  export * from './blaze-sdk.interface';
2089
2108
  export * from './button.interface';
@@ -2440,6 +2459,10 @@ declare abstract class AppConfigurationServiceClass extends AppConfigurationServ
2440
2459
  }
2441
2460
  export declare const AppConfigurationService: AppConfigurationServiceClass;
2442
2461
 
2462
+ export declare class BeforeContentPlayService {
2463
+ getTokenizedUrl(originalUrl: string): Promise<string>;
2464
+ }
2465
+
2443
2466
  declare const ConfigServiceClass_base: {
2444
2467
  new (): {};
2445
2468
  _instance: ConfigServiceClass;
@@ -2477,6 +2500,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
2477
2500
  private _appContext;
2478
2501
  private _disableAutoLoadingContent;
2479
2502
  private _onItemClick;
2503
+ private _beforeContentPlayCallback?;
2480
2504
  protected constructor();
2481
2505
  init(options: IBlazeSDKOptions): Promise<void>;
2482
2506
  private readonly _russiaRegionCDN;
@@ -2538,6 +2562,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
2538
2562
  set disableAutoLoadingContent(value: boolean);
2539
2563
  get onItemClick(): ItemClickCallback | undefined;
2540
2564
  set onItemClick(value: ItemClickCallback | undefined);
2565
+ get beforeContentPlayCallback(): BeforeContentPlayCallback | undefined;
2566
+ set beforeContentPlayCallback(callback: BeforeContentPlayCallback | undefined);
2541
2567
  }
2542
2568
  export declare const ConfigService: ConfigServiceClass;
2543
2569
 
@@ -2641,6 +2667,7 @@ export * from './ad.service';
2641
2667
  export * from './analytics.service';
2642
2668
  export * from './api.service';
2643
2669
  export * from './app-configuration.service';
2670
+ export * from './before-content-play.service';
2644
2671
  export * from './config.service';
2645
2672
  export * from './database.service';
2646
2673
  export * from './error.service';
@@ -4737,7 +4764,7 @@ export interface PlaybackStrategy {
4737
4764
  toggleFullscreen(): void;
4738
4765
  seek(time: number): void;
4739
4766
  getDuration(): number;
4740
- loadSource(src: string, bitRate: number, startingTime: number): void;
4767
+ loadSource(src: string, bitRate: number, startingTime: number): Promise<void>;
4741
4768
  unload(): void;
4742
4769
  destroy(): void;
4743
4770
  }
@@ -4750,6 +4777,7 @@ export declare class HLSStrategy implements PlaybackStrategy {
4750
4777
  private retryCount;
4751
4778
  private maxRetries;
4752
4779
  private lastTime;
4780
+ private beforeContentPlayService;
4753
4781
  private playbackWatchdogTimeout?;
4754
4782
  private loaderTimeout?;
4755
4783
  private recoveryTimeout?;
@@ -4764,7 +4792,7 @@ export declare class HLSStrategy implements PlaybackStrategy {
4764
4792
  private boundOnNativeError;
4765
4793
  constructor(video: HTMLVideoElement);
4766
4794
  initialize(videoOverlay: BlazeLongFormControlsOverlay): void;
4767
- loadSource(src: string, initialBitrate: number, startingTime?: number): void;
4795
+ loadSource(src: string, initialBitrate: number, startingTime?: number): Promise<void>;
4768
4796
  unload(): void;
4769
4797
  destroy(): void;
4770
4798
  private waitForVideoCondition;
@@ -5569,6 +5597,7 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5569
5597
  eventRenderBackgroundPercentageTriggered: Array<boolean>;
5570
5598
  loaderTimeoutRefAppending: NodeJS.Timeout | undefined;
5571
5599
  lastErrorExecutionTime: number;
5600
+ private beforeContentPlayService;
5572
5601
  isVideoStartPlaying: boolean;
5573
5602
  isError: boolean;
5574
5603
  isLoaded: boolean;
@@ -5587,6 +5616,7 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5587
5616
  connectedCallback(): void;
5588
5617
  disconnectedCallback(): void;
5589
5618
  private getContentType;
5619
+ private getOriginalVideoUrl;
5590
5620
  setData(data: IPage): void;
5591
5621
  getGoogleIMA(): any;
5592
5622
  private isEnableInteractions;
@@ -5596,7 +5626,7 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5596
5626
  display(): void;
5597
5627
  hide(): void;
5598
5628
  load(loadingType?: LoadingType): Promise<void>;
5599
- setVideoSource(videoUrl: string): void;
5629
+ private setVideoSource;
5600
5630
  unload(): Promise<void>;
5601
5631
  resetVideoState(): void;
5602
5632
  removeLoader(): void;
@@ -5623,6 +5653,7 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
5623
5653
  onLanguageChange(event: Event): Promise<void>;
5624
5654
  handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
5625
5655
  private tryToPlayAd;
5656
+ private updateVideoUrlWithBeforeContentPlay;
5626
5657
  }
5627
5658
 
5628
5659
  export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
@@ -6208,7 +6239,6 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
6208
6239
  switchToPage(newPageIndex: number): void;
6209
6240
  startPage(indexToPlay: number): void;
6210
6241
  unload(): void;
6211
- removeFromCache(): void;
6212
6242
  displayCurrentStoryPageAndHideTheRest(): void;
6213
6243
  load(loadingType?: LoadingType): void;
6214
6244
  play(): void;