@wscsports/blaze-web-sdk 0.3.12 → 0.3.14

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.12",
3
+ "version": "0.3.14",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -38,7 +38,8 @@
38
38
  "webpack-cli": "^5.1.4",
39
39
  "webpack-dev-server": "^4.15.1",
40
40
  "webpack-obfuscator": "^3.5.1",
41
- "media-captions": "^0.0.18"
41
+ "@types/videojs-vtt.js": "^0.15.3",
42
+ "videojs-vtt.js": "^0.15.5"
42
43
  },
43
44
  "dependencies": {
44
45
  "animejs": "^3.2.1",
@@ -186,6 +186,7 @@ export declare class StoryEvent {
186
186
  'player_type': PlayerType;
187
187
  'player_orientation': ContentAspectRatio;
188
188
  'cc_state': string;
189
+ 'content_extra_info': string;
189
190
  }
190
191
  export declare class MomentEvent {
191
192
  'moments_session_id': string;
@@ -203,6 +204,7 @@ export declare class MomentEvent {
203
204
  'loop_number': string;
204
205
  'gesture_type': MomentGestureType;
205
206
  'cc_state': string;
207
+ 'content_extra_info': string;
206
208
  }
207
209
  export declare class WidgetEvent {
208
210
  'page_view_id': string;
@@ -249,6 +251,7 @@ export declare class AdEvent {
249
251
  'ad_unit_id': string;
250
252
  'session_id': string;
251
253
  'gesture_type': MomentGestureType | StoryGestureType;
254
+ 'content_extra_info': string;
252
255
  }
253
256
  export declare class ImaAdEvent {
254
257
  'story_id': string;
@@ -265,6 +268,7 @@ export declare class ImaAdEvent {
265
268
  'ad_type': string;
266
269
  'ima_url': string;
267
270
  'player_orientation': ContentAspectRatio;
271
+ 'content_extra_info': string;
268
272
  }
269
273
  export declare class InteractionEvent {
270
274
  'interaction_id': string;
@@ -278,6 +282,7 @@ export declare class InteractionEvent {
278
282
  'content_page_id': string;
279
283
  'playback_action_method': string;
280
284
  'audio_state': string;
285
+ 'content_extra_info': string;
281
286
  }
282
287
 
283
288
  export declare abstract class BaseWidget extends HTMLElement {
@@ -570,19 +575,23 @@ export declare class BlazeCtaButton extends BaseWidget {
570
575
  iconArrowElement: BlazeButton;
571
576
  ctaTextElement: BlazeDiv;
572
577
  isButtonCreated: boolean;
578
+ private animationTimeouts;
573
579
  constructor();
574
580
  static observedAttributes: string[];
575
581
  connectedCallback(): void;
576
582
  disconnectedCallback(): void;
577
583
  attributeChangedCallback(name: AttributeType, oldValue: string, newValue: string): void;
578
584
  createButton(): void;
579
- animateButton(): void;
585
+ animateButton(animationType: AnimationType): void;
586
+ animateIcon(animationType: AnimationType): void;
587
+ animateElement(element: HTMLElement, animationType: AnimationType, duration: number, delay: number, repeat: number): void;
580
588
  setCtaText(value: string): void;
581
589
  setWidth(value: string): void;
582
590
  setMargin(value: string): void;
583
591
  setAnchorButtonStyles(styles: Partial<CSSStyleDeclaration>): void;
584
592
  setCtaTextStyle(styles: Partial<CSSStyleDeclaration>): void;
585
593
  setCtaIconStyles(styles: Partial<CSSStyleDeclaration>): void;
594
+ clearAllAnimations(): void;
586
595
  }
587
596
 
588
597
  export * from './share-button';
@@ -758,6 +767,12 @@ export interface IBannerAdInfo {
758
767
  type: 'Banner';
759
768
  }
760
769
 
770
+ export interface AppConfiguration {
771
+ configurations: {
772
+ analyticsAddEntitiesInfo?: string;
773
+ };
774
+ }
775
+
761
776
  export interface IContent {
762
777
  id: string;
763
778
  title: string;
@@ -782,6 +797,7 @@ export interface ICTA {
782
797
  url: string;
783
798
  backgroundColor: string;
784
799
  textColor: string;
800
+ enhancements: EnhancementsType;
785
801
  }
786
802
 
787
803
  export * from './ad-info.interface';
@@ -915,6 +931,7 @@ export interface IThumbnail {
915
931
  export declare enum ErrorCode {
916
932
  FailedToFindContainerId = 1,
917
933
  FailedContainerIdHasWidgetAlready = 2,
934
+ FailedLoadingAppConfigurations = 3,
918
935
  FailedLoadingStories = 100,
919
936
  FailedEnrichStories = 101,
920
937
  FailedToHaveLabels = 103,
@@ -1411,9 +1428,23 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
1411
1428
  }): Promise<void>;
1412
1429
  getUserToken(body: GetUserTokenRequest): Promise<import("../interfaces").IHttpResponse<TokenData>>;
1413
1430
  refreshUserToken(body: RefreshUserTokenRequest): Promise<import("../interfaces").IHttpResponse<TokenData>>;
1431
+ getAppConfigurations(): Promise<import("../interfaces").IHttpResponse<AppConfiguration>>;
1414
1432
  }
1415
1433
  export declare const ApiService: ApiServiceClass;
1416
1434
 
1435
+ declare const AppConfigurationServiceClass_base: {
1436
+ new (): {};
1437
+ _instance: AppConfigurationServiceClass;
1438
+ getInstance(): AppConfigurationServiceClass;
1439
+ };
1440
+ declare abstract class AppConfigurationServiceClass extends AppConfigurationServiceClass_base implements IService {
1441
+ private _appConfigurations?;
1442
+ constructor();
1443
+ get appConfigurations(): AppConfiguration | undefined;
1444
+ init(options: IBlazeSDKOptions): Promise<void>;
1445
+ }
1446
+ export declare const AppConfigurationService: AppConfigurationServiceClass;
1447
+
1417
1448
  declare const ConfigServiceClass_base: {
1418
1449
  new (): {};
1419
1450
  _instance: ConfigServiceClass;
@@ -1582,6 +1613,7 @@ export declare const EventService: EventServiceClass;
1582
1613
  export * from './ad.service';
1583
1614
  export * from './analytics.service';
1584
1615
  export * from './api.service';
1616
+ export * from './app-configuration.service';
1585
1617
  export * from './config.service';
1586
1618
  export * from './database.service';
1587
1619
  export * from './error.service';
@@ -1907,6 +1939,13 @@ export interface StoryPlayerStyle {
1907
1939
  contentOrder: ContentOrderType[];
1908
1940
  icons: BlazeStoryIcons;
1909
1941
  }
1942
+ export type BlazeStoryPlayerCtaStyle = {
1943
+ ctaAnimationType?: 'growingAnimation' | null;
1944
+ swipeUpCTA?: BlazeSwipeUpCTA;
1945
+ };
1946
+ export type BlazeSwipeUpCTA = {
1947
+ isEnabled: boolean;
1948
+ };
1910
1949
  export type BlazeMomentsPlayerTextStyle = {
1911
1950
  font: string;
1912
1951
  textSizeMobile: string;
@@ -1993,15 +2032,14 @@ export interface MomentPlayerStyle {
1993
2032
  ctaButton: BlazeMomentsPlayerCtaStyle;
1994
2033
  }
1995
2034
  export interface CtaButtonStyle {
2035
+ isAnimated: boolean;
2036
+ isDisplayCtaModal: boolean;
1996
2037
  borderRadius: string;
1997
2038
  border: string;
1998
2039
  fontSize: string;
1999
2040
  font: string;
2000
2041
  backgroundColor: string;
2001
2042
  color: string;
2002
- isVisible: boolean;
2003
- isAnimated: boolean;
2004
- isDisplayCtaModal: boolean;
2005
2043
  fontWeight: FontWeightType;
2006
2044
  textTransform: TextTransformType;
2007
2045
  padding: string;
@@ -2033,6 +2071,7 @@ export declare const Colors: {
2033
2071
  readonly White: "#FFFFFF";
2034
2072
  readonly Black: "#000000";
2035
2073
  readonly Gray: "#B6B7B8";
2074
+ readonly Yellow: "#FFD325";
2036
2075
  };
2037
2076
 
2038
2077
  export type ThemeType = 'grid-2-columns' | 'grid-3-columns' | 'row-circle' | 'row-rectangle' | 'row-rectangle-horizontal' | 'grid-2-columns-horizontal' | 'grid-3-columns-horizontal' | 'default';
@@ -2045,6 +2084,17 @@ export declare function isStoryPlayerStyle(playerStyle: StoryPlayerStyle | Momen
2045
2084
  export declare function isMomentPlayerStyle(playerStyle: StoryPlayerStyle | MomentPlayerStyle): playerStyle is MomentPlayerStyle;
2046
2085
 
2047
2086
 
2087
+ export type AnimationType = 'Growing' | 'Shrinking' | 'BottomToTop';
2088
+ export declare const animationCssMapper: {
2089
+ Growing: string;
2090
+ Shrinking: string;
2091
+ BottomToTop: string;
2092
+ };
2093
+ export type EnhancementsType = {
2094
+ animationType: AnimationType;
2095
+ hasSwipeUp: boolean;
2096
+ } | null;
2097
+
2048
2098
  export interface IAttributeParser {
2049
2099
  getIntAttribute(key: string, defaultValue?: number): number | undefined;
2050
2100
  getFloatAttribute(key: string, defaultValue?: number): number | undefined;
@@ -2464,6 +2514,7 @@ export * from './trigger.type';
2464
2514
  export * from './gesture.type';
2465
2515
  export * from './closed-captions.type';
2466
2516
  export * from './ratio.type';
2517
+ export * from './animation.type';
2467
2518
 
2468
2519
  export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
2469
2520
  export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
@@ -2639,12 +2690,13 @@ export * from './widget-cta-modal';
2639
2690
  export * from './widget-captions';
2640
2691
 
2641
2692
  export declare class BlazeWidgetCaptions extends HTMLElement {
2693
+ private parser;
2642
2694
  private container;
2643
- private renderer;
2644
2695
  private observer;
2645
2696
  private captions;
2646
2697
  private video;
2647
2698
  private startTime;
2699
+ private cues;
2648
2700
  private boundTimeUpdate;
2649
2701
  private boundSeekUpdate;
2650
2702
  constructor();
@@ -2662,6 +2714,7 @@ export declare class BlazeWidgetCaptions extends HTMLElement {
2662
2714
  private setupStyles;
2663
2715
  initialize(video: HTMLVideoElement, captions: ICaptionFile[]): Promise<void>;
2664
2716
  private setupCaptions;
2717
+ private updateCaptions;
2665
2718
  }
2666
2719
 
2667
2720
  export declare abstract class BlazeWidgetContent extends HTMLElement {
@@ -3697,7 +3750,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3697
3750
  private applyIconStyle;
3698
3751
  onShareClick(): Promise<void>;
3699
3752
  private onClosedCaptionClick;
3700
- updateCtaButtonLayout(): void;
3753
+ private updateCtaButtonLayout;
3701
3754
  private updateChip;
3702
3755
  setTheme(playerStyle: StoryPlayerStyle): void;
3703
3756
  private disableStoriesNavigationButtons;
@@ -3760,6 +3813,11 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
3760
3813
  disconnectedCallback(): void;
3761
3814
  updateCTAButtonPosition(): void;
3762
3815
  updateCta(pageIndex: number): void;
3816
+ private updateCtaButtonWidth;
3817
+ private animateCtaButton;
3818
+ private handleCtaButtonAnimation;
3819
+ private setCtaButtonAttributes;
3820
+ private setCtaIconVisibility;
3763
3821
  updatePlayerButtonsState(displayPageNavigationButtons?: boolean): void;
3764
3822
  updateButtonState(buttonType: ButtonNavigation, button: BlazeButton | undefined): void;
3765
3823
  private isSingleStoryWithAutoAdvance;