@wscsports/blaze-web-sdk 0.3.16 → 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.16",
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
  }
@@ -755,18 +756,25 @@ interface IAdInfoConfiguration {
755
756
  type: 'Story' | 'Moment';
756
757
  }
757
758
  export type IAdContext = Record<string, string>;
758
- export interface IAdInfo {
759
- path?: string;
760
- tag?: string;
761
- type: 'Web' | 'IMA';
759
+ interface IBaseAdInfo {
762
760
  configuration?: IAdInfoConfiguration;
763
761
  context?: IAdContext;
764
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
+ }
765
772
  export interface IBannerAdInfo {
766
773
  adUnitId: string;
767
774
  size: 'Banner';
768
775
  type: 'Banner';
769
776
  }
777
+ export type IAdInfo = IWebAdInfo | IImaAdInfo;
770
778
 
771
779
  export interface AppConfiguration {
772
780
  configurations: {
@@ -881,32 +889,28 @@ export type MomentDB = {
881
889
  viewed: boolean;
882
890
  };
883
891
 
884
- export interface IContentPage {
892
+ interface IBasePage {
885
893
  id: string;
894
+ duration: number;
895
+ hasViewed: boolean;
896
+ ignoreReadStatusForStory: boolean;
897
+ createTime: string;
898
+ }
899
+ export interface IContentPage extends IBasePage {
886
900
  type: 'Content';
887
901
  index: number;
888
- duration: number;
889
902
  isSkippable: boolean;
890
903
  thumbnail: IThumbnail;
891
904
  baseLayer: ILayer;
892
905
  cta: ICTA;
893
- hasViewed: boolean;
894
- ignoreReadStatusForStory: boolean;
895
- createTime: string;
896
906
  shouldShowImaAd?: boolean;
897
- imaUrl?: string;
898
- adContext?: IAdContext;
907
+ adInfo?: IAdInfo;
899
908
  interaction?: Interaction;
900
909
  poster?: IThumbnail;
901
910
  closedCaptions: IClosedCaption[];
902
911
  }
903
- export interface IAdPage {
904
- id: string;
912
+ export interface IAdPage extends IBasePage {
905
913
  type: 'Ad';
906
- duration: number;
907
- hasViewed: boolean;
908
- ignoreReadStatusForStory: boolean;
909
- createTime: string;
910
914
  adPath: string;
911
915
  }
912
916
  export type IPage = IAdPage | IContentPage;
@@ -1957,6 +1961,7 @@ export type BlazeMomentsPlayerTextStyle = {
1957
1961
  textTransform: TextTransformType;
1958
1962
  isVisible: boolean;
1959
1963
  lineHeight: string;
1964
+ likeCountThreshold?: number;
1960
1965
  };
1961
1966
  type BlazeMomentsPlayerHeadingTextStyle = BlazeMomentsPlayerTextStyle & {
1962
1967
  contentSource: 'TITLE' | 'SUBTITLE';
@@ -2027,7 +2032,8 @@ export interface MomentPlayerStyle {
2027
2032
  likeText: BlazeMomentsPlayerTextStyle;
2028
2033
  buttons: BlazeMomentsPlayerButtonsStyle;
2029
2034
  icons: BlazeMomentIconsStyle;
2030
- iconsButtonOrder: IconButtonType[];
2035
+ topIconsButtonOrder: MomentTopContainerIconButtonType[];
2036
+ bottomIconsButtonOrder: MomentBottomContainerIconButtonType[];
2031
2037
  contentBoxHorizontalSpacing: string;
2032
2038
  seekBar: BlazeMomentsPlayerSeekBarStyle;
2033
2039
  ctaButton: BlazeMomentsPlayerCtaStyle;
@@ -2448,7 +2454,9 @@ export type ButtonPositionType = 'LEFT' | 'CENTER' | 'RIGHT';
2448
2454
  export declare const positionMap: {
2449
2455
  [key: string]: string;
2450
2456
  };
2451
- 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';
2452
2460
  export type IconPropertiesType = {
2453
2461
  value: IconButtonType | StoryDirectionType;
2454
2462
  embeddedSize?: string;
@@ -2726,6 +2734,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
2726
2734
  navigationType: NavigationType;
2727
2735
  navigationDirection: NavigationDirectionType;
2728
2736
  listeners: EventsListener;
2737
+ adInfo?: IAdInfo;
2729
2738
  isActive: boolean;
2730
2739
  isResumeOnFocusExecuted: boolean;
2731
2740
  isNavigationPending: boolean;
@@ -3286,7 +3295,11 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
3286
3295
  render(): void;
3287
3296
  restartVideo(): void;
3288
3297
  initializeIMA(): void;
3289
- 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;
3290
3303
  onAdsManagerLoaded(adsManagerLoadedEvent: any): void;
3291
3304
  onAdEvent(adEvent: any): void;
3292
3305
  onWindowResize(): void;
@@ -3538,8 +3551,6 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
3538
3551
  isActive: boolean;
3539
3552
  isMomentPausedByPlayPauseButton: boolean;
3540
3553
  shouldShowImaAdOnStart: boolean;
3541
- imaUrl: string;
3542
- adContext?: IAdContext;
3543
3554
  elementsToHideOnImaAds: (HTMLElement | undefined)[];
3544
3555
  elementsToHideOnCustomAds: (HTMLElement | undefined)[];
3545
3556
  originalVideoRef: BlazeWidgetVideo | undefined;
@@ -3602,7 +3613,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
3602
3613
  updateData(options: {
3603
3614
  data: IMoment;
3604
3615
  shouldShowImaAdOnStart: boolean;
3605
- imaUrl: string;
3616
+ adInfo?: IAdInfo;
3606
3617
  }): Promise<void>;
3607
3618
  updateContent(momentContentData: MomentContentParams): void;
3608
3619
  updateLikeCount(likes?: number): Promise<void>;
@@ -3740,8 +3751,6 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3740
3751
  restartStoryOnClickEvent: ((event: MouseEvent) => void) | undefined;
3741
3752
  requestAnimationId: number | null;
3742
3753
  shouldShowImaAdOnStart: boolean;
3743
- imaUrl: string;
3744
- adContext?: IAdContext;
3745
3754
  bannerAdElement?: BlazeWidgetBannerAd;
3746
3755
  constructor(playerStyle: StoryPlayerStyle, mode: ScreenMode);
3747
3756
  isButtonVisible(iconName: IconButtonType | StoryDirectionType): boolean | undefined;
@@ -3837,3 +3846,109 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3837
3846
  onExpandClick(): void;
3838
3847
  }
3839
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
+