@tivio/sdk-react 7.0.1 → 7.2.0-alpha.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/dist/index.d.ts CHANGED
@@ -289,6 +289,31 @@ export declare interface AnalyticsInterface {
289
289
  }) => void;
290
290
  }
291
291
 
292
+ /**
293
+ * @public
294
+ */
295
+ export declare interface Application {
296
+ name: Translation;
297
+ type: ApplicationType;
298
+ urlHandle: string;
299
+ screens: ApplicationScreenConfig[] | null;
300
+ }
301
+
302
+ /**
303
+ * @public
304
+ */
305
+ export declare interface ApplicationScreenConfig {
306
+ name: Translation;
307
+ order: number;
308
+ path: string;
309
+ screenConfig: ScreenConfig | null;
310
+ }
311
+
312
+ export declare enum ApplicationType {
313
+ TIVIO_PRO = "TIVIO_PRO",
314
+ ORGANIZATION = "ORGANIZATION"
315
+ }
316
+
292
317
  /**
293
318
  * @public
294
319
  */
@@ -486,6 +511,7 @@ export declare interface CommonSourceInterface<T extends SourceType = SourceType
486
511
  isStarted: boolean;
487
512
  setIsStarted(isStarted: boolean): void;
488
513
  autoplay?: boolean;
514
+ autoplayMuteFallback: boolean;
489
515
  toLog(): any;
490
516
  }
491
517
 
@@ -1406,6 +1432,16 @@ export declare type LiveTvChannelSource = SourceBase & {
1406
1432
  channelName: string;
1407
1433
  };
1408
1434
 
1435
+ /**
1436
+ * @public
1437
+ */
1438
+ export declare type LoadScreenOptions = {
1439
+ /**
1440
+ * If true, then load rows of each loaded screen
1441
+ */
1442
+ loadRows?: boolean;
1443
+ };
1444
+
1409
1445
  /**
1410
1446
  * If value of the field (only 1st level) is undefined it means that it was never saved
1411
1447
  * and might or might not be present in maxmind service.
@@ -1713,6 +1749,7 @@ declare type OrderByDirection = 'desc' | 'asc';
1713
1749
  */
1714
1750
  export declare interface Organization {
1715
1751
  userProfileConfiguration: any;
1752
+ screenConfigs: ScreenConfig[];
1716
1753
  }
1717
1754
 
1718
1755
  /**
@@ -1889,6 +1926,7 @@ export declare interface PlayerEngineInterface {
1889
1926
  pause(): Promise<void>;
1890
1927
  unpause(): Promise<void>;
1891
1928
  isPaused(): boolean;
1929
+ isSeeking: boolean;
1892
1930
  stop(): Promise<void>;
1893
1931
  addEventListener<T>(event: PlayerEngineEvent, callback: PlayerEngineListener<T>): void;
1894
1932
  addEventListener(event: 'statechange', callback: PlayerEngineListener<PlayerState>): void;
@@ -2013,7 +2051,7 @@ export declare interface PlayerInterface {
2013
2051
  * or just load it and keep it paused and ready to play if `source.autoplay` is false.
2014
2052
  * If source is `null`, stop and close the player (this is the same as if `this.stop()` was called.)
2015
2053
  */
2016
- setSource: (source: CommonSource | null) => void;
2054
+ setSource: (source: CommonSource | null) => Promise<void> | void;
2017
2055
  /**
2018
2056
  * Set volume
2019
2057
  *
@@ -2082,6 +2120,7 @@ export declare interface PlayerSourceInterface<T extends NonAdSourceType = NonAd
2082
2120
  adSegment: AdSegment | null;
2083
2121
  consumedAds: ConsumedAds;
2084
2122
  currentMarker: any | null;
2123
+ drm?: Drm;
2085
2124
  markers: any[];
2086
2125
  setMarkers(markers: any[]): void;
2087
2126
  isMarkersLoaded: boolean;
@@ -2479,7 +2518,23 @@ export declare enum PurchaseStatus {
2479
2518
  /**
2480
2519
  * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
2481
2520
  */
2482
- BLOCKED = "BLOCKED"
2521
+ BLOCKED = "BLOCKED",
2522
+ /**
2523
+ * Used in subscription purchases when subscription is renewed.
2524
+ */
2525
+ RENEWED = "RENEWED",
2526
+ /**
2527
+ * From NEW to ABORTED when user cancels purchase before payment or when payment fails.
2528
+ */
2529
+ ABORTED = "ABORTED",
2530
+ /**
2531
+ * When user manually cancels purchase but still has access to content until expiration date.
2532
+ */
2533
+ CANCELLING = "CANCELLING",
2534
+ /**
2535
+ * From PAID to EXPIRED when payment fails to renew subscription.
2536
+ */
2537
+ EXPIRED = "EXPIRED"
2483
2538
  }
2484
2539
 
2485
2540
  /**
@@ -2815,6 +2870,7 @@ declare interface Screen_2 {
2815
2870
  rows: Row[];
2816
2871
  type?: ScreenType;
2817
2872
  filter?: RowFilterField | null;
2873
+ embedUrl?: string | null;
2818
2874
  }
2819
2875
  export { Screen_2 as Screen }
2820
2876
 
@@ -3230,6 +3286,8 @@ export declare interface TivioConfig {
3230
3286
  firebaseApp?: any | null;
3231
3287
  firestore?: any | null;
3232
3288
  currency: Currency;
3289
+ applicationId?: string;
3290
+ isTivioProApp?: boolean;
3233
3291
  /**
3234
3292
  * Configuration for GDPR consent collection (CMP)
3235
3293
  */
@@ -3385,6 +3443,12 @@ export declare type TivioInternalHooks = {
3385
3443
  useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
3386
3444
  subscriptions: PurchasableMonetization[];
3387
3445
  };
3446
+ useCurrentApplication: () => {
3447
+ screenConfigs: ScreenConfig[] | undefined;
3448
+ isLoading: boolean;
3449
+ switchApplicationByHandle: (handle?: string) => (Promise<void> | undefined);
3450
+ isDefaultOrganization: boolean;
3451
+ };
3388
3452
  useIsMonetizationPurchased: () => {
3389
3453
  isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
3390
3454
  };
@@ -4415,7 +4479,6 @@ export declare interface VirtualChannelSourceInterface extends ChannelSourceInte
4415
4479
  tvChannelType: TvChannelType.VIRTUAL;
4416
4480
  program?: TvProgram | null;
4417
4481
  video?: Video | null;
4418
- isPlayingBySchedule: boolean;
4419
4482
  clone(params?: Partial<VirtualChannelSourceParams>): VirtualChannelSourceInterface;
4420
4483
  initializeNext(): Promise<void>;
4421
4484
  }
@@ -4426,6 +4489,7 @@ export declare interface VirtualChannelSourceInterface extends ChannelSourceInte
4426
4489
  export declare interface VirtualChannelSourceParams extends ChannelSourceParams {
4427
4490
  tvChannelType: TvChannelType.VIRTUAL;
4428
4491
  currentProgram?: TvProgram | null;
4492
+ drm?: Drm;
4429
4493
  }
4430
4494
 
4431
4495
  /**