@wscsports/blaze-web-sdk 0.3.15 → 0.3.17

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.3.15",
3
+ "version": "0.3.17",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -267,6 +267,7 @@ export declare class ImaAdEvent {
267
267
  'failure_reason': string;
268
268
  'ad_type': string;
269
269
  'ima_url': string;
270
+ 'ima_ad_provider': string;
270
271
  'player_orientation': ContentAspectRatio;
271
272
  'content_extra_info': string;
272
273
  }
@@ -312,6 +313,7 @@ export declare const BlazeInternalError: {
312
313
  export declare class BlazeDataSourceFactory {
313
314
  static createLabelsDataSource(params: LabelsDataSourceParams): BlazeDataSourceType;
314
315
  static createIdsDataSource(params: IdsDataSourceParams): BlazeDataSourceType;
316
+ static setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[] | undefined): string;
315
317
  }
316
318
  export declare class BlazeDataSourceValidations {
317
319
  static validateFormat(dataSource: BlazeDataSourceType): void;
@@ -754,18 +756,25 @@ interface IAdInfoConfiguration {
754
756
  type: 'Story' | 'Moment';
755
757
  }
756
758
  export type IAdContext = Record<string, string>;
757
- export interface IAdInfo {
758
- path?: string;
759
- tag?: string;
760
- type: 'Web' | 'IMA';
759
+ interface IBaseAdInfo {
761
760
  configuration?: IAdInfoConfiguration;
762
761
  context?: IAdContext;
763
762
  }
763
+ export interface IImaAdInfo extends IBaseAdInfo {
764
+ type: 'IMA';
765
+ tag: string;
766
+ adProvider: 'GoogleAds' | 'Aniview';
767
+ }
768
+ export interface IWebAdInfo extends IBaseAdInfo {
769
+ type: 'Web';
770
+ path: string;
771
+ }
764
772
  export interface IBannerAdInfo {
765
773
  adUnitId: string;
766
774
  size: 'Banner';
767
775
  type: 'Banner';
768
776
  }
777
+ export type IAdInfo = IWebAdInfo | IImaAdInfo;
769
778
 
770
779
  export interface AppConfiguration {
771
780
  configurations: {
@@ -880,32 +889,28 @@ export type MomentDB = {
880
889
  viewed: boolean;
881
890
  };
882
891
 
883
- export interface IContentPage {
892
+ interface IBasePage {
884
893
  id: string;
894
+ duration: number;
895
+ hasViewed: boolean;
896
+ ignoreReadStatusForStory: boolean;
897
+ createTime: string;
898
+ }
899
+ export interface IContentPage extends IBasePage {
885
900
  type: 'Content';
886
901
  index: number;
887
- duration: number;
888
902
  isSkippable: boolean;
889
903
  thumbnail: IThumbnail;
890
904
  baseLayer: ILayer;
891
905
  cta: ICTA;
892
- hasViewed: boolean;
893
- ignoreReadStatusForStory: boolean;
894
- createTime: string;
895
906
  shouldShowImaAd?: boolean;
896
- imaUrl?: string;
897
- adContext?: IAdContext;
907
+ adInfo?: IAdInfo;
898
908
  interaction?: Interaction;
899
909
  poster?: IThumbnail;
900
910
  closedCaptions: IClosedCaption[];
901
911
  }
902
- export interface IAdPage {
903
- id: string;
912
+ export interface IAdPage extends IBasePage {
904
913
  type: 'Ad';
905
- duration: number;
906
- hasViewed: boolean;
907
- ignoreReadStatusForStory: boolean;
908
- createTime: string;
909
914
  adPath: string;
910
915
  }
911
916
  export type IPage = IAdPage | IContentPage;
@@ -1956,6 +1961,7 @@ export type BlazeMomentsPlayerTextStyle = {
1956
1961
  textTransform: TextTransformType;
1957
1962
  isVisible: boolean;
1958
1963
  lineHeight: string;
1964
+ likeCountThreshold?: number;
1959
1965
  };
1960
1966
  type BlazeMomentsPlayerHeadingTextStyle = BlazeMomentsPlayerTextStyle & {
1961
1967
  contentSource: 'TITLE' | 'SUBTITLE';
@@ -2026,7 +2032,8 @@ export interface MomentPlayerStyle {
2026
2032
  likeText: BlazeMomentsPlayerTextStyle;
2027
2033
  buttons: BlazeMomentsPlayerButtonsStyle;
2028
2034
  icons: BlazeMomentIconsStyle;
2029
- iconsButtonOrder: IconButtonType[];
2035
+ topIconsButtonOrder: MomentTopContainerIconButtonType[];
2036
+ bottomIconsButtonOrder: MomentBottomContainerIconButtonType[];
2030
2037
  contentBoxHorizontalSpacing: string;
2031
2038
  seekBar: BlazeMomentsPlayerSeekBarStyle;
2032
2039
  ctaButton: BlazeMomentsPlayerCtaStyle;
@@ -2447,7 +2454,9 @@ export type ButtonPositionType = 'LEFT' | 'CENTER' | 'RIGHT';
2447
2454
  export declare const positionMap: {
2448
2455
  [key: string]: string;
2449
2456
  };
2450
- export type IconButtonType = "MUTE_UNMUTE" | "PLAY_PAUSE" | "SHARE" | "FULLSCREEN" | "EXIT_PLAYER" | 'CLOSED_CAPTIONS';
2457
+ export type IconButtonType = 'MUTE_UNMUTE' | 'PLAY_PAUSE' | 'SHARE' | 'FULLSCREEN' | 'EXIT_PLAYER' | 'CLOSED_CAPTIONS' | 'LIKE_UNLIKE';
2458
+ export type MomentTopContainerIconButtonType = 'MUTE_UNMUTE' | 'EXIT_PLAYER';
2459
+ export type MomentBottomContainerIconButtonType = 'SHARE' | 'LIKE_UNLIKE' | 'CLOSED_CAPTIONS';
2451
2460
  export type IconPropertiesType = {
2452
2461
  value: IconButtonType | StoryDirectionType;
2453
2462
  embeddedSize?: string;
@@ -2725,6 +2734,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
2725
2734
  navigationType: NavigationType;
2726
2735
  navigationDirection: NavigationDirectionType;
2727
2736
  listeners: EventsListener;
2737
+ adInfo?: IAdInfo;
2728
2738
  isActive: boolean;
2729
2739
  isResumeOnFocusExecuted: boolean;
2730
2740
  isNavigationPending: boolean;
@@ -3285,7 +3295,11 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
3285
3295
  render(): void;
3286
3296
  restartVideo(): void;
3287
3297
  initializeIMA(): void;
3288
- buildImaUrl(url: string): string;
3298
+ buildImaUrl(iamData: IImaAdInfo, pageIndex?: number): string;
3299
+ buildAndSetCustParams(iamData: IImaAdInfo, newUrl: URL, pageIndex?: number): void;
3300
+ setSearchParamIfNotNull(newUrl: URL, key: string, value?: string): void;
3301
+ addAniviewMacrosToUrl(newUrl: URL): void;
3302
+ addGoogleAdsMacrosToUrl(newUrl: URL): void;
3289
3303
  onAdsManagerLoaded(adsManagerLoadedEvent: any): void;
3290
3304
  onAdEvent(adEvent: any): void;
3291
3305
  onWindowResize(): void;
@@ -3537,8 +3551,6 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
3537
3551
  isActive: boolean;
3538
3552
  isMomentPausedByPlayPauseButton: boolean;
3539
3553
  shouldShowImaAdOnStart: boolean;
3540
- imaUrl: string;
3541
- adContext?: IAdContext;
3542
3554
  elementsToHideOnImaAds: (HTMLElement | undefined)[];
3543
3555
  elementsToHideOnCustomAds: (HTMLElement | undefined)[];
3544
3556
  originalVideoRef: BlazeWidgetVideo | undefined;
@@ -3601,7 +3613,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
3601
3613
  updateData(options: {
3602
3614
  data: IMoment;
3603
3615
  shouldShowImaAdOnStart: boolean;
3604
- imaUrl: string;
3616
+ adInfo?: IAdInfo;
3605
3617
  }): Promise<void>;
3606
3618
  updateContent(momentContentData: MomentContentParams): void;
3607
3619
  updateLikeCount(likes?: number): Promise<void>;
@@ -3739,8 +3751,6 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3739
3751
  restartStoryOnClickEvent: ((event: MouseEvent) => void) | undefined;
3740
3752
  requestAnimationId: number | null;
3741
3753
  shouldShowImaAdOnStart: boolean;
3742
- imaUrl: string;
3743
- adContext?: IAdContext;
3744
3754
  bannerAdElement?: BlazeWidgetBannerAd;
3745
3755
  constructor(playerStyle: StoryPlayerStyle, mode: ScreenMode);
3746
3756
  isButtonVisible(iconName: IconButtonType | StoryDirectionType): boolean | undefined;
@@ -3836,3 +3846,109 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3836
3846
  onExpandClick(): void;
3837
3847
  }
3838
3848
 
3849
+ export declare const ElementId: {
3850
+ BlazeWidgetItem: string;
3851
+ CtaButton: string;
3852
+ BlazeWidgetStoryVideo: string;
3853
+ BlazeWidgetStoryNextPageButton: string;
3854
+ BlazeWidgetStoryPrevPageButton: string;
3855
+ BlazeWidgetStoryNextStoryButton: string;
3856
+ BlazeWidgetStoryPrevStoryButton: string;
3857
+ BlazeWidgetStoryPlayButton: string;
3858
+ BlazeWidgetStoryExitButton: string;
3859
+ BlazeWidgetStoryMuteButton: string;
3860
+ BlazeWidgetStoryShareButton: string;
3861
+ BlazeEmbeddedStoryNextPageButton: string;
3862
+ BlazeEmbeddedStoryPrevPageButton: string;
3863
+ };
3864
+
3865
+ export declare class ElementUtils {
3866
+ static getFirstVisibleElement(page: Page, testId: string): Promise<import("playwright-core").Locator>;
3867
+ }
3868
+
3869
+ export declare const SingleStoryDefaultData: {
3870
+ id: string;
3871
+ title: string;
3872
+ description: string;
3873
+ isLive: boolean;
3874
+ createTime: string;
3875
+ updateTime: string;
3876
+ thumbnails: {
3877
+ rendition: {
3878
+ url: string;
3879
+ bitRate: null;
3880
+ fileSize: null;
3881
+ aspectRatio: string;
3882
+ };
3883
+ renditions: {
3884
+ url: string;
3885
+ bitRate: null;
3886
+ fileSize: null;
3887
+ aspectRatio: string;
3888
+ }[];
3889
+ type: string;
3890
+ }[];
3891
+ pages: {
3892
+ id: string;
3893
+ type: string;
3894
+ index: number;
3895
+ duration: number;
3896
+ isSkippable: boolean;
3897
+ thumbnail: {
3898
+ rendition: {
3899
+ url: string;
3900
+ bitRate: null;
3901
+ fileSize: null;
3902
+ aspectRatio: string;
3903
+ };
3904
+ renditions: {
3905
+ url: string;
3906
+ bitRate: null;
3907
+ fileSize: null;
3908
+ aspectRatio: string;
3909
+ }[];
3910
+ type: string;
3911
+ };
3912
+ cta: {
3913
+ type: string;
3914
+ text: string;
3915
+ url: string;
3916
+ backgroundColor: string;
3917
+ textColor: string;
3918
+ };
3919
+ createTime: string;
3920
+ updateTime: string;
3921
+ baseLayer: {
3922
+ type: string;
3923
+ content: {
3924
+ renditions: {
3925
+ url: string;
3926
+ bitRate: number;
3927
+ fileSize: number;
3928
+ aspectRatio: string;
3929
+ }[];
3930
+ };
3931
+ };
3932
+ interaction: null;
3933
+ ignoreReadStatusForStory: boolean;
3934
+ closedCaptions: {
3935
+ url: string;
3936
+ bitRate: null;
3937
+ fileSize: null;
3938
+ aspectRatio: string;
3939
+ }[];
3940
+ }[];
3941
+ adInfo: null;
3942
+ bannerAdInfo: null;
3943
+ geoRestriction: null;
3944
+ entities: {
3945
+ gameId: string;
3946
+ teamId: null;
3947
+ playerId: null;
3948
+ roundId: null;
3949
+ };
3950
+ };
3951
+
3952
+
3953
+
3954
+