@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.
@@ -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
  */
@@ -495,6 +520,7 @@ export declare interface CommonSourceInterface<T extends SourceType = SourceType
495
520
  isStarted: boolean;
496
521
  setIsStarted(isStarted: boolean): void;
497
522
  autoplay?: boolean;
523
+ autoplayMuteFallback: boolean;
498
524
  toLog(): any;
499
525
  }
500
526
 
@@ -1577,6 +1603,16 @@ export declare type LiveTvChannelSource = SourceBase & {
1577
1603
  channelName: string;
1578
1604
  };
1579
1605
 
1606
+ /**
1607
+ * @public
1608
+ */
1609
+ export declare type LoadScreenOptions = {
1610
+ /**
1611
+ * If true, then load rows of each loaded screen
1612
+ */
1613
+ loadRows?: boolean;
1614
+ };
1615
+
1580
1616
  /**
1581
1617
  * If value of the field (only 1st level) is undefined it means that it was never saved
1582
1618
  * and might or might not be present in maxmind service.
@@ -1894,6 +1930,7 @@ declare type OrderByDirection = 'desc' | 'asc';
1894
1930
  */
1895
1931
  export declare interface Organization {
1896
1932
  userProfileConfiguration: any;
1933
+ screenConfigs: ScreenConfig[];
1897
1934
  }
1898
1935
 
1899
1936
  /**
@@ -2070,6 +2107,7 @@ export declare interface PlayerEngineInterface {
2070
2107
  pause(): Promise<void>;
2071
2108
  unpause(): Promise<void>;
2072
2109
  isPaused(): boolean;
2110
+ isSeeking: boolean;
2073
2111
  stop(): Promise<void>;
2074
2112
  addEventListener<T>(event: PlayerEngineEvent, callback: PlayerEngineListener<T>): void;
2075
2113
  addEventListener(event: 'statechange', callback: PlayerEngineListener<PlayerState>): void;
@@ -2194,7 +2232,7 @@ export declare interface PlayerInterface {
2194
2232
  * or just load it and keep it paused and ready to play if `source.autoplay` is false.
2195
2233
  * If source is `null`, stop and close the player (this is the same as if `this.stop()` was called.)
2196
2234
  */
2197
- setSource: (source: CommonSource | null) => void;
2235
+ setSource: (source: CommonSource | null) => Promise<void> | void;
2198
2236
  /**
2199
2237
  * Set volume
2200
2238
  *
@@ -2263,6 +2301,7 @@ export declare interface PlayerSourceInterface<T extends NonAdSourceType = NonAd
2263
2301
  adSegment: AdSegment | null;
2264
2302
  consumedAds: ConsumedAds;
2265
2303
  currentMarker: any | null;
2304
+ drm?: Drm;
2266
2305
  markers: any[];
2267
2306
  setMarkers(markers: any[]): void;
2268
2307
  isMarkersLoaded: boolean;
@@ -3005,6 +3044,7 @@ declare interface Screen_2 {
3005
3044
  rows: Row[];
3006
3045
  type?: ScreenType;
3007
3046
  filter?: RowFilterField | null;
3047
+ embedUrl?: string | null;
3008
3048
  }
3009
3049
  export { Screen_2 as Screen }
3010
3050
 
@@ -3491,6 +3531,8 @@ export declare interface TivioConfig {
3491
3531
  firebaseApp?: any | null;
3492
3532
  firestore?: any | null;
3493
3533
  currency: Currency;
3534
+ applicationId?: string;
3535
+ isTivioProApp?: boolean;
3494
3536
  /**
3495
3537
  * Configuration for GDPR consent collection (CMP)
3496
3538
  */
@@ -3646,6 +3688,12 @@ export declare type TivioInternalHooks = {
3646
3688
  useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
3647
3689
  subscriptions: PurchasableMonetization[];
3648
3690
  };
3691
+ useCurrentApplication: () => {
3692
+ screenConfigs: ScreenConfig[] | undefined;
3693
+ isLoading: boolean;
3694
+ switchApplicationByHandle: (handle?: string) => (Promise<void> | undefined);
3695
+ isDefaultOrganization: boolean;
3696
+ };
3649
3697
  useIsMonetizationPurchased: () => {
3650
3698
  isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
3651
3699
  };
@@ -4419,6 +4467,17 @@ export declare type UseTvChannel = (tvChannelId: string) => {
4419
4467
  loading: boolean;
4420
4468
  };
4421
4469
 
4470
+ /**
4471
+ * Use Tv channel
4472
+ * @param tvChannelId
4473
+ * @public
4474
+ */
4475
+ export declare const useTvChannel: (tvChannelId: string) => {
4476
+ tvChannel: TvChannel | null;
4477
+ error: Error | null;
4478
+ loading: boolean;
4479
+ } | undefined;
4480
+
4422
4481
  /**
4423
4482
  * @public
4424
4483
  */
@@ -4684,7 +4743,6 @@ export declare interface VirtualChannelSourceInterface extends ChannelSourceInte
4684
4743
  tvChannelType: TvChannelType.VIRTUAL;
4685
4744
  program?: TvProgram | null;
4686
4745
  video?: Video | null;
4687
- isPlayingBySchedule: boolean;
4688
4746
  clone(params?: Partial<VirtualChannelSourceParams>): VirtualChannelSourceInterface;
4689
4747
  initializeNext(): Promise<void>;
4690
4748
  }
@@ -4695,6 +4753,7 @@ export declare interface VirtualChannelSourceInterface extends ChannelSourceInte
4695
4753
  export declare interface VirtualChannelSourceParams extends ChannelSourceParams {
4696
4754
  tvChannelType: TvChannelType.VIRTUAL;
4697
4755
  currentProgram?: TvProgram | null;
4756
+ drm?: Drm;
4698
4757
  }
4699
4758
 
4700
4759
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tivio/sdk-react",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "source": "src/index.ts",
@@ -33,15 +33,15 @@
33
33
  "@material-ui/core": "^4.11.2",
34
34
  "@material-ui/icons": "^4.11.2",
35
35
  "@sentry/browser": "^6.1.0",
36
- "@tivio/common": "1.1.112",
36
+ "@tivio/common": "1.1.113",
37
37
  "dayjs": "^1.11.0",
38
38
  "es7-object-polyfill": "^1.0.1",
39
39
  "firebase": "8.10.1",
40
40
  "formik": "^2.2.7",
41
- "i18next": "^19.8.4",
41
+ "i18next": "^20.1.0",
42
42
  "mobx": "^6.0.4",
43
43
  "mobx-react": "^7.1.0",
44
- "react-i18next": "^9.0.10",
44
+ "react-i18next": "^13.0.1",
45
45
  "react-router-dom": "^5.3.4",
46
46
  "react-spring": "^9.2.4",
47
47
  "react-virtualized": "^9.22.3",