@tivio/sdk-react 7.0.1 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -6,6 +6,10 @@ settings in the administration of Tivio Studio while having the freedom to build
6
6
 
7
7
  ## Changelog
8
8
 
9
+ * 7.1.0
10
+ * minor: export useTvChannelHook
11
+ * patch: bump "react-i18next", "i18next" versions.
12
+
9
13
  * 7.0.1
10
14
  * patch: fix dependency to @tivio/common
11
15
 
package/README.md.bak CHANGED
@@ -6,6 +6,10 @@ settings in the administration of Tivio Studio while having the freedom to build
6
6
 
7
7
  ## Changelog
8
8
 
9
+ * 7.1.0
10
+ * minor: export useTvChannelHook
11
+ * patch: bump "react-i18next", "i18next" versions.
12
+
9
13
  * 7.0.1
10
14
  * patch: fix dependency to @tivio/common
11
15
 
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;
@@ -2815,6 +2854,7 @@ declare interface Screen_2 {
2815
2854
  rows: Row[];
2816
2855
  type?: ScreenType;
2817
2856
  filter?: RowFilterField | null;
2857
+ embedUrl?: string | null;
2818
2858
  }
2819
2859
  export { Screen_2 as Screen }
2820
2860
 
@@ -3230,6 +3270,8 @@ export declare interface TivioConfig {
3230
3270
  firebaseApp?: any | null;
3231
3271
  firestore?: any | null;
3232
3272
  currency: Currency;
3273
+ applicationId?: string;
3274
+ isTivioProApp?: boolean;
3233
3275
  /**
3234
3276
  * Configuration for GDPR consent collection (CMP)
3235
3277
  */
@@ -3385,6 +3427,12 @@ export declare type TivioInternalHooks = {
3385
3427
  useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
3386
3428
  subscriptions: PurchasableMonetization[];
3387
3429
  };
3430
+ useCurrentApplication: () => {
3431
+ screenConfigs: ScreenConfig[] | undefined;
3432
+ isLoading: boolean;
3433
+ switchApplicationByHandle: (handle?: string) => (Promise<void> | undefined);
3434
+ isDefaultOrganization: boolean;
3435
+ };
3388
3436
  useIsMonetizationPurchased: () => {
3389
3437
  isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
3390
3438
  };
@@ -4150,6 +4198,17 @@ export declare type UseTvChannel = (tvChannelId: string) => {
4150
4198
  loading: boolean;
4151
4199
  };
4152
4200
 
4201
+ /**
4202
+ * Use Tv channel
4203
+ * @param tvChannelId
4204
+ * @public
4205
+ */
4206
+ export declare const useTvChannel: (tvChannelId: string) => {
4207
+ tvChannel: TvChannel | null;
4208
+ error: Error | null;
4209
+ loading: boolean;
4210
+ } | undefined;
4211
+
4153
4212
  /**
4154
4213
  * @public
4155
4214
  */
@@ -4415,7 +4474,6 @@ export declare interface VirtualChannelSourceInterface extends ChannelSourceInte
4415
4474
  tvChannelType: TvChannelType.VIRTUAL;
4416
4475
  program?: TvProgram | null;
4417
4476
  video?: Video | null;
4418
- isPlayingBySchedule: boolean;
4419
4477
  clone(params?: Partial<VirtualChannelSourceParams>): VirtualChannelSourceInterface;
4420
4478
  initializeNext(): Promise<void>;
4421
4479
  }
@@ -4426,6 +4484,7 @@ export declare interface VirtualChannelSourceInterface extends ChannelSourceInte
4426
4484
  export declare interface VirtualChannelSourceParams extends ChannelSourceParams {
4427
4485
  tvChannelType: TvChannelType.VIRTUAL;
4428
4486
  currentProgram?: TvProgram | null;
4487
+ drm?: Drm;
4429
4488
  }
4430
4489
 
4431
4490
  /**