@tivio/sdk-react 4.0.0 → 4.0.1

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
@@ -37,6 +37,27 @@ export declare interface AdExternal {
37
37
  skip: () => void;
38
38
  }
39
39
 
40
+ /**
41
+ * @public
42
+ */
43
+ export declare type AdMetadata = {
44
+ type: 'ad';
45
+ subType: 'inserted' | 'original';
46
+ secondsToEnd: number;
47
+ /**
48
+ * null when ad is not skippable
49
+ */
50
+ secondsToSkippable: number | null;
51
+ canTriggerSkip: boolean;
52
+ isSkippable: boolean;
53
+ order: number | null;
54
+ totalCount: number | null;
55
+ skip: () => void;
56
+ } | null;
57
+
58
+ /**
59
+ * @public
60
+ */
40
61
  declare type AdSegment = {
41
62
  id: string;
42
63
  /**
@@ -95,6 +116,13 @@ export declare type AdSource = {
95
116
  secondsToSkippable: number | null;
96
117
  };
97
118
 
119
+ /**
120
+ * @public
121
+ */
122
+ declare type AdSource_2 = SourceBase & {
123
+ type: 'ad';
124
+ };
125
+
98
126
  /**
99
127
  * @public
100
128
  */
@@ -193,11 +221,7 @@ export declare type BannerProps = {
193
221
  hoverable: boolean;
194
222
  broadcastInfo: string;
195
223
  height: number;
196
- coverPadding: CoverPadding;
197
224
  cover: string;
198
- fullWidth: boolean;
199
- coverContainerPaddingTop: string;
200
- width: number;
201
225
  overlay: boolean;
202
226
  price: string;
203
227
  hasRoundCorners: boolean;
@@ -248,9 +272,6 @@ export declare interface Channel {
248
272
  recentVideos: Video[];
249
273
  }
250
274
 
251
- /**
252
- * @public
253
- */
254
275
  export declare type ChannelSource = {
255
276
  new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
256
277
  description: string;
@@ -375,7 +396,7 @@ export declare type DetailedPrice = {
375
396
  /**
376
397
  * @public
377
398
  */
378
- export declare type DeviceInfo = ArrisDeviceInfo | WebosDeviceInfo | TizenDeviceInfo;
399
+ export declare type DeviceInfo = ArrisDeviceInfo | ReactNativeDeviceInfo;
379
400
 
380
401
  /**
381
402
  * @public
@@ -408,6 +429,11 @@ export declare type DocumentOptions = Partial<{
408
429
  */
409
430
  export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
410
431
 
432
+ /**
433
+ * @public
434
+ */
435
+ declare type Empty_2 = void | Promise<void> | undefined | Promise<undefined>;
436
+
411
437
  /**
412
438
  * @public
413
439
  */
@@ -521,7 +547,7 @@ export declare type InternalConfig = SdkReactConfig & {
521
547
  fetchPackage: FetchPackage;
522
548
  pubSub: PubSub;
523
549
  /**
524
- * @private URL of resolver. Resolver is a script used to fetch remove code bundle
550
+ * @private URL of resolver. Resolver is a script used to fetch remote code bundle
525
551
  */
526
552
  resolverUrl: string;
527
553
  sdkVersion: string;
@@ -558,6 +584,24 @@ declare interface IntroMarker {
558
584
  */
559
585
  export declare type ItemsInRow = Tag | Video | TvChannel;
560
586
 
587
+ /**
588
+ * @public
589
+ */
590
+ export declare interface JojExternals {
591
+ tvProfiProgramId?: string;
592
+ tvProfiContentId?: string;
593
+ tvProfiSerialId?: string;
594
+ contentId?: string;
595
+ provysId?: string;
596
+ tvProfiProvysId?: string;
597
+ tvProfiHouseId?: string;
598
+ tvProfiTitleOriginal?: string;
599
+ tvProfiTitleSk?: string;
600
+ tvProfiType?: string;
601
+ tvProfiSeriesName?: string;
602
+ tvProfiDistributor?: string;
603
+ }
604
+
561
605
  /**
562
606
  * Enum of all supported languages codes as in ISO 639-1
563
607
  * @public
@@ -592,6 +636,34 @@ export declare type LinkedVideo = {
592
636
  type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
593
637
  };
594
638
 
639
+ /**
640
+ * @public
641
+ */
642
+ export declare type Listener = ListenerAdMetadata | ListenerMarkers;
643
+
644
+ /**
645
+ * @public
646
+ */
647
+ export declare type ListenerAdMetadata = (metadata: AdMetadata) => void;
648
+
649
+ /**
650
+ * @public
651
+ */
652
+ export declare type ListenerMarkers = (marker: Marker[] | null) => void;
653
+
654
+ /**
655
+ * Not supported yet, now it does pass-through only.
656
+ *
657
+ * @public
658
+ */
659
+ export declare type LiveTvChannelSource = SourceBase & {
660
+ type: 'live_tv_channel';
661
+ /**
662
+ * Tivio needs channel name in order to load markers.
663
+ */
664
+ channelName: string;
665
+ };
666
+
595
667
  declare interface Logger {
596
668
  /** important messages */
597
669
  warn(...data: LoggerArgs): void;
@@ -614,15 +686,24 @@ declare type LoggerArgs = any[];
614
686
  /**
615
687
  * @public
616
688
  */
617
- export declare type Marker = {
689
+ export declare interface MallTvExternals {
690
+ mallTvEntityId: string;
691
+ }
692
+
693
+ /**
694
+ * @public
695
+ */
696
+ export declare interface Marker {
618
697
  id: string;
619
- type: string;
620
698
  from: Date;
621
699
  to: Date;
622
700
  count?: number;
623
701
  fromMs?: number;
624
702
  toMs?: number;
625
- };
703
+ relativeFromMs: number;
704
+ relativeToMs: number;
705
+ type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
706
+ }
626
707
 
627
708
  /**
628
709
  * @public
@@ -678,6 +759,16 @@ export declare type Nullable<T> = {
678
759
  */
679
760
  export declare type ObjectType = Record<string, any>;
680
761
 
762
+ /**
763
+ * @public
764
+ */
765
+ export declare interface OktagonExternals {
766
+ /**
767
+ * DRM content Key ID - shouldn't be more connected with buyDRM or streamOnline? It is not general thing
768
+ */
769
+ keyId?: string;
770
+ }
771
+
681
772
  /**
682
773
  * @public
683
774
  */
@@ -694,6 +785,16 @@ declare type OrderByDirection = 'desc' | 'asc';
694
785
  export declare interface Organization {
695
786
  }
696
787
 
788
+ /**
789
+ * If Tivio PlayerWrapper is an interception layer, it should allow the pass-through
790
+ * of not just Tivio source types but any other source types that the 3rd party app may be using.
791
+ *
792
+ * @public
793
+ */
794
+ export declare type OtherSource = SourceBase & StartAndContinuePosition & {
795
+ type: 'other';
796
+ };
797
+
697
798
  /**
698
799
  * @public
699
800
  */
@@ -721,6 +822,30 @@ export declare enum PLATFORM {
721
822
  TV = "TV"
722
823
  }
723
824
 
825
+ /**
826
+ * @public
827
+ */
828
+ export declare type Player = {
829
+ ad: any;
830
+ currentTime: any;
831
+ adSegment: any;
832
+ event: any;
833
+ events: any;
834
+ source: any;
835
+ state: any;
836
+ onPlaybackEnded: any;
837
+ onSourceChanged: any;
838
+ onStateChanged: any;
839
+ onTimeChanged: any;
840
+ pause: any;
841
+ play: any;
842
+ togglePlayPause: any;
843
+ register: any;
844
+ seekTo: any;
845
+ setVolume: any;
846
+ triggerEvent: any;
847
+ };
848
+
724
849
  /**
725
850
  * @public
726
851
  */
@@ -776,6 +901,17 @@ export declare type PlayerConfig = {
776
901
  fullFileDownloadSupport?: boolean;
777
902
  };
778
903
  };
904
+ /**
905
+ * Ad service settings
906
+ */
907
+ adService?: {
908
+ /**
909
+ * Tivio - can be used in websites and TV apps. Does not support VPAID
910
+ * IMA - can be used only in websites. Supports VAST 2, partially VAST 3, VAST 4, SIMID 1.0, OM SDK 1.3,
911
+ * VPAID 2 (HTML5) https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/compatibility
912
+ */
913
+ name: 'IMA SDK' | 'Tivio';
914
+ };
779
915
  };
780
916
 
781
917
  /**
@@ -810,6 +946,18 @@ export declare interface PlayerInterface {
810
946
  unmute?: () => void;
811
947
  }
812
948
 
949
+ /**
950
+ * @public
951
+ */
952
+ export declare interface PlayerInterfaceForPlayerWrapper {
953
+ /**
954
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
955
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
956
+ */
957
+ seekTo: (ms: number) => void;
958
+ setSource: (source: Source | null) => void;
959
+ }
960
+
813
961
  /**
814
962
  * @public
815
963
  */
@@ -867,8 +1015,8 @@ export declare type PlayerWrapper = {
867
1015
  source: InputSource | null;
868
1016
  events: {
869
1017
  isSupported: (even: string) => boolean;
870
- addListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
871
- removeListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
1018
+ addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
1019
+ removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
872
1020
  removeAllListeners: () => void;
873
1021
  };
874
1022
  /**
@@ -906,6 +1054,19 @@ export declare type PlayerWrapper = {
906
1054
  toggleMuted: () => void;
907
1055
  };
908
1056
 
1057
+ /**
1058
+ * @public
1059
+ */
1060
+ export declare enum PlayerWrapperEventType {
1061
+ adMetadata = "adMetadata",
1062
+ markers = "markers"
1063
+ }
1064
+
1065
+ /**
1066
+ * @public
1067
+ */
1068
+ export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
1069
+
909
1070
  /**
910
1071
  * @public
911
1072
  */
@@ -925,12 +1086,16 @@ export declare type Purchase = {
925
1086
  expirationDate: Date | null;
926
1087
  id: string;
927
1088
  isExpired: boolean;
1089
+ /**
1090
+ * @deprecated isPurchased is ambiguous name. Now it means that purchase.status is "PAID".
1091
+ * So use purchase.status === PurchaseStatus.PAID instead.
1092
+ */
928
1093
  isPurchased: boolean;
929
1094
  monetization: PurchaseMonetization | null;
930
1095
  monetizationId: string | null;
931
1096
  monetizationRef: any | null;
932
1097
  status: PurchaseStatus | null;
933
- type: MonetizationType | null;
1098
+ type: PurchaseType | null;
934
1099
  /**
935
1100
  * Timestamp of the last purchase status update in milliseconds.
936
1101
  */
@@ -948,7 +1113,10 @@ export declare type PurchaseMonetization = {
948
1113
  currency?: Currency;
949
1114
  period?: number;
950
1115
  price?: number;
951
- type: MonetizationType;
1116
+ /**
1117
+ * Here are only transaction and subscription, because purchasing of advertisement monetization doesn't make sense.
1118
+ */
1119
+ type: 'transaction' | 'subscription';
952
1120
  title?: string;
953
1121
  frequency?: MONETIZATION_FREQUENCY | null;
954
1122
  /**
@@ -969,9 +1137,16 @@ export declare enum PurchaseStatus {
969
1137
  /**
970
1138
  * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
971
1139
  */
972
- KILL = "KILL"
1140
+ BLOCKED = "BLOCKED"
973
1141
  }
974
1142
 
1143
+ /**
1144
+ * Purchase is a purchase of one video (transaction type), purchase of subscription or voucher.
1145
+ *
1146
+ * @public
1147
+ */
1148
+ export declare type PurchaseType = 'transaction' | 'subscription' | 'voucher';
1149
+
975
1150
  /**
976
1151
  * @public
977
1152
  */
@@ -985,7 +1160,7 @@ export declare interface QerkoCancellationInfo {
985
1160
  */
986
1161
  export declare interface QerkoData {
987
1162
  monetization: Monetization;
988
- video?: Video;
1163
+ item?: Video | TvChannel;
989
1164
  onPurchase?: () => void;
990
1165
  onClose?: () => void;
991
1166
  }
@@ -1038,6 +1213,19 @@ export declare interface QerkoTransaction {
1038
1213
  voucherId?: string;
1039
1214
  }
1040
1215
 
1216
+ /**
1217
+ * @public
1218
+ */
1219
+ export declare type ReactNativeDeviceInfo = {
1220
+ type: 'react-native';
1221
+ /**
1222
+ * Type values defined according to {@link OperatingSystem} from `detect-browser` package for convenience.
1223
+ */
1224
+ os?: 'iOS' | 'Android OS';
1225
+ osVersion: string;
1226
+ platform: PLATFORM;
1227
+ };
1228
+
1041
1229
  /**
1042
1230
  * @public
1043
1231
  */
@@ -1052,7 +1240,7 @@ export declare type RemoteBundleState = {
1052
1240
  */
1053
1241
  export declare type RemoteProviderProps = {
1054
1242
  disableUnmounting?: boolean;
1055
- language?: string;
1243
+ language?: LangCode;
1056
1244
  children: any;
1057
1245
  };
1058
1246
 
@@ -1126,6 +1314,7 @@ export declare interface RowItemAssets {
1126
1314
  portrait?: string | null;
1127
1315
  circled?: string | null;
1128
1316
  banner?: string | null;
1317
+ bannerMobile?: string | null;
1129
1318
  }
1130
1319
 
1131
1320
  /**
@@ -1213,7 +1402,7 @@ export declare type ScreenSubscription = (screenId: string, cb: (error: Error |
1213
1402
  *
1214
1403
  * @public
1215
1404
  */
1216
- export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'language'> & {
1405
+ export declare type SdkReactConfig = Omit<TivioConfig, 'language'> & {
1217
1406
  disableUnmounting?: boolean;
1218
1407
  enable?: boolean;
1219
1408
  enableSentry?: boolean;
@@ -1222,7 +1411,9 @@ export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'l
1222
1411
  }>;
1223
1412
  LoaderComponent?: ComponentType;
1224
1413
  logger?: Logger | null;
1225
- deviceCapabilities: PlayerCapability[] | 'auto';
1414
+ /**
1415
+ * language is required for bundle init (TivioConfig), but it can be set to default EN on SDK side, so here it's optional.
1416
+ */
1226
1417
  language?: LangCode;
1227
1418
  };
1228
1419
 
@@ -1261,6 +1452,63 @@ export declare const setUser: (userId: string | null, payload?: UserPayload | un
1261
1452
  */
1262
1453
  export declare const showGdprConsentPreferences: () => Promise<void>;
1263
1454
 
1455
+ /**
1456
+ * @public
1457
+ */
1458
+ export declare type Source = TvProgramSource | TivioVodSource | AdSource_2 | OtherSource | LiveTvChannelSource;
1459
+
1460
+ /**
1461
+ * @public
1462
+ */
1463
+ export declare type SourceBase = {
1464
+ /**
1465
+ * Tivio SDK users may use pretty complicated source objects in their existing code and if Tivio player
1466
+ * is an interception layer, it should allow them to pass through any type of object.
1467
+ */
1468
+ additionalPayload?: Record<string, any>;
1469
+ /**
1470
+ * Source type.
1471
+ */
1472
+ type: 'ad' | 'live_tv_channel' | 'other' | 'tivio_vod' | 'tv_program';
1473
+ /**
1474
+ * URI to play.
1475
+ */
1476
+ uri: string;
1477
+ };
1478
+
1479
+ /**
1480
+ * @public
1481
+ */
1482
+ export declare type StartAndContinuePosition = {
1483
+ /**
1484
+ * Relative from stream start, in ms.
1485
+ *
1486
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1487
+ *
1488
+ * On output from Tivio it is always defined. Tivio can change this value.
1489
+ * (e.g. in order to fix start position of a TV program)
1490
+ */
1491
+ startFromPosition?: number;
1492
+ /**
1493
+ * Relative from stream start, in ms.
1494
+ *
1495
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1496
+ *
1497
+ * If provided, tivio will not correct it and will send this value back in startFromPosition.
1498
+ * If provided, startFromPosition is ignored.
1499
+ */
1500
+ continueFromPosition?: number;
1501
+ };
1502
+
1503
+ /**
1504
+ * @public
1505
+ */
1506
+ declare interface StorageManager_2 {
1507
+ getItem(key: string): string | null | Promise<string | null>;
1508
+ setItem(key: string, value: string): void | Promise<void>;
1509
+ }
1510
+ export { StorageManager_2 as StorageManager }
1511
+
1264
1512
  /**
1265
1513
  * @public
1266
1514
  */
@@ -1360,7 +1608,6 @@ export declare type TaggedVideosOrderByField = 'seasonNumber' | 'episodeNumber'
1360
1608
  */
1361
1609
  export declare type TileProps = {
1362
1610
  cover: string;
1363
- isLoading: boolean;
1364
1611
  bottomLabel: string;
1365
1612
  bottomLabelAreaHeight: number;
1366
1613
  innerLabel: string;
@@ -1369,7 +1616,6 @@ export declare type TileProps = {
1369
1616
  focused: boolean;
1370
1617
  onClick?: () => void;
1371
1618
  hoverable: boolean;
1372
- overlay: boolean;
1373
1619
  coverPadding: CoverPadding;
1374
1620
  variant: RowItemComponent;
1375
1621
  coverWidth: number;
@@ -1458,10 +1704,6 @@ export declare type TivioComponents = {
1458
1704
  WebTile: React_2.ComponentType<{
1459
1705
  item?: ItemsInRow;
1460
1706
  } & TilePropsPartial>;
1461
- AdIndicationButtonWeb: React_2.ReactNode;
1462
- Recommendation: React_2.ReactNode;
1463
- SkipButtonWeb: React_2.ReactNode;
1464
- TvPlayer: React_2.ComponentType<WebPlayerProps>;
1465
1707
  };
1466
1708
 
1467
1709
  /**
@@ -1520,7 +1762,7 @@ export declare type TivioGetters = {
1520
1762
  */
1521
1763
  getPlayerWrapper: (opt: {
1522
1764
  playerWrapperId?: string;
1523
- }) => any;
1765
+ }) => PlayerWrapper;
1524
1766
  getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
1525
1767
  /**
1526
1768
  * Get video by its id.
@@ -1539,7 +1781,7 @@ export declare type TivioGetters = {
1539
1781
  * @public
1540
1782
  */
1541
1783
  export declare type TivioHooks = {
1542
- useAd: () => [(AdSource | null)];
1784
+ useAd: () => [(AdExternal | null)];
1543
1785
  useAdSegment: () => AdSegment | null;
1544
1786
  useCancelSubscription: UseCancelSubscription;
1545
1787
  useItemsInRow: (rowId: string, options: PaginationOptions) => {
@@ -1650,6 +1892,51 @@ export declare type TivioInternalProviders = {
1650
1892
  RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
1651
1893
  };
1652
1894
 
1895
+ /**
1896
+ * @public
1897
+ */
1898
+ export declare type TivioJsBundleExposedApi = {
1899
+ AdSource: any;
1900
+ ChannelSource: any;
1901
+ VodTivioSource: any;
1902
+ /**
1903
+ * Get (or create) player wrapper instance
1904
+ * @param id - player wrapper id
1905
+ * @returns {Player} player wrapper instance
1906
+ */
1907
+ getPlayer: (id: string) => Player;
1908
+ /**
1909
+ * Get tv channel by its id.
1910
+ * @param tvChannelId - tv channel id
1911
+ * @returns {Promise<TvChannel | null>} channel or null if tv channel does not exists
1912
+ */
1913
+ getTvChannelById: (tvChannelId: string) => Promise<TvChannel | null>;
1914
+ /**
1915
+ * Get tag by its id.
1916
+ * @param tagId - tag id
1917
+ * @returns {Promise<Tag | null>} widget or null if tag does not exists
1918
+ */
1919
+ getTagById: (tagId: string) => Promise<Tag | null>;
1920
+ createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
1921
+ destroy: () => Promise<void>;
1922
+ } & Pick<TivioGetters, 'getVideoById'> & Pick<TivioSubscriptions, 'subscribeToVideo' | 'subscribeToItemsInRow'> & Pick<TivioAuth, 'createUserWithEmailAndPassword' | 'signInWithEmailAndPassword'> & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
1923
+
1924
+ /**
1925
+ * @public
1926
+ */
1927
+ export declare interface TivioPlayerWrapper {
1928
+ addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
1929
+ reportError: (error: Error) => void;
1930
+ reportPlaybackEnded: () => void;
1931
+ reportTimeProgress: (ms: number) => void;
1932
+ seekTo: (ms: number) => void;
1933
+ /**
1934
+ * @param {Source} source - source to set
1935
+ * @param {string} calibrationId - id of calibration profile
1936
+ */
1937
+ setSource: (source: Source | null, calibrationId?: string) => void;
1938
+ }
1939
+
1653
1940
  /**
1654
1941
  * @public
1655
1942
  */
@@ -1684,12 +1971,6 @@ export declare type TivioReactBundle = {
1684
1971
  expirationDate: Date;
1685
1972
  }) => Promise<QerkoPaymentInfo>;
1686
1973
  cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
1687
- /**
1688
- * Set tivio language.
1689
- * @param language
1690
- */
1691
- setLanguage: (language: LangCode) => void;
1692
- setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1693
1974
  showConsentPreferences: () => void;
1694
1975
  /**
1695
1976
  * Contains hooks and providers for internal usages.
@@ -1698,6 +1979,20 @@ export declare type TivioReactBundle = {
1698
1979
  */
1699
1980
  internal: TivioInternalBundle;
1700
1981
  destroy: () => Promise<void>;
1982
+ } & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
1983
+
1984
+ /**
1985
+ * @public
1986
+ */
1987
+ export declare type TivioSetters = {
1988
+ setBundleVersion: (bundleVersion: string | null) => void;
1989
+ /**
1990
+ * Set tivio language.
1991
+ * @param language
1992
+ */
1993
+ setLanguage: (language: LangCode) => void;
1994
+ setStorageManager: (storageManager: StorageManager_2) => void;
1995
+ setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1701
1996
  };
1702
1997
 
1703
1998
  /**
@@ -1730,6 +2025,17 @@ export declare type TivioSubscriptions = {
1730
2025
  }) => void;
1731
2026
  };
1732
2027
 
2028
+ /**
2029
+ * @public
2030
+ */
2031
+ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
2032
+ type: 'tivio_vod';
2033
+ /**
2034
+ * Allows Tivio to load monetization config an apply ads.
2035
+ */
2036
+ videoPath: string;
2037
+ };
2038
+
1733
2039
  /**
1734
2040
  * @public
1735
2041
  */
@@ -1779,15 +2085,6 @@ export declare interface TivioWidgetRef {
1779
2085
  });
1780
2086
  }
1781
2087
 
1782
- /**
1783
- * @public
1784
- */
1785
- export declare type TizenDeviceInfo = {
1786
- type: 'tizen';
1787
- model?: string;
1788
- osVersion?: string;
1789
- };
1790
-
1791
2088
  declare type TransactionInfo = {
1792
2089
  type: 'transaction';
1793
2090
  name: string;
@@ -1828,6 +2125,35 @@ export declare interface TvChannel extends RowItem {
1828
2125
  price: number;
1829
2126
  }
1830
2127
 
2128
+ /**
2129
+ * @public
2130
+ */
2131
+ export declare type TvProgramSource = SourceBase & StartAndContinuePosition & {
2132
+ type: 'tv_program';
2133
+ /**
2134
+ * If epgTo is wrong, Tivio cannot correctly guess if the video it startover or timeshift . For such cases
2135
+ * Tivio needs explicit tv mode.
2136
+ * null if source begins in the future.
2137
+ */
2138
+ tvMode: 'startover' | 'timeshift' | null;
2139
+ /**
2140
+ * Tivio needs channel name in order to load markers.
2141
+ */
2142
+ channelName: string;
2143
+ /**
2144
+ * Tivio needs EPG from in order to load markers.
2145
+ */
2146
+ epgFrom: Date;
2147
+ /**
2148
+ * Tivio needs EPG to in order to load markers.
2149
+ */
2150
+ epgTo: Date;
2151
+ /**
2152
+ * When the stream (provided in uri) really starts - typically few minutes before epgFrom.
2153
+ */
2154
+ streamStart: Date;
2155
+ };
2156
+
1831
2157
  /**
1832
2158
  * @public
1833
2159
  */
@@ -1836,7 +2162,7 @@ export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
1836
2162
  /**
1837
2163
  * @public
1838
2164
  */
1839
- export declare const useAd: () => AdSource | null;
2165
+ export declare const useAd: () => AdExternal | null;
1840
2166
 
1841
2167
  /**
1842
2168
  * @public
@@ -1988,9 +2314,23 @@ export declare const usePurchasesWithVideos: () => {
1988
2314
  * @public
1989
2315
  */
1990
2316
  export declare type User = {
2317
+ /**
2318
+ * Returns "active" (non-expired) purchases, so they give access to some content.
2319
+ * Does not return voucher purchases, because they give access to videos/subscriptions only for user who activates voucher,
2320
+ * not for user who purchases it.
2321
+ */
1991
2322
  purchases: Purchase[];
2323
+ /**
2324
+ * Returns all PAID or CANCELLED user purchases (expired and non-expired)
2325
+ */
1992
2326
  allPurchases: Purchase[];
2327
+ /**
2328
+ * Returns "active" (not CANCELLED) VoD purchases ("transaction" type)
2329
+ */
1993
2330
  purchasedVods: Purchase[];
2331
+ /**
2332
+ * Returns "active" (non-expired) subscription purchases
2333
+ */
1994
2334
  purchasedSubscriptions: Purchase[];
1995
2335
  isPurchasesInitialized: boolean;
1996
2336
  isSignedIn: boolean;
@@ -2167,7 +2507,8 @@ export declare enum VastProvider {
2167
2507
  MALL_TV = "malltv",
2168
2508
  MALL_TV_PREBID = "malltv-prebid",
2169
2509
  PRIMA = "prima",
2170
- TEST = "test"
2510
+ TEST = "test",
2511
+ TEST_VPAID = "test-vpaid"
2171
2512
  }
2172
2513
 
2173
2514
  /**
@@ -2249,18 +2590,7 @@ export declare enum VideoContentType {
2249
2590
  /**
2250
2591
  * @public
2251
2592
  */
2252
- export declare interface VideoExternals {
2253
- tvProfiProgramId?: string;
2254
- tvProfiContentId?: string;
2255
- tvProfiSerialId?: string;
2256
- contentId?: string;
2257
- provysId?: string;
2258
- mallTvEntityId?: string;
2259
- /**
2260
- * DRM content Key ID - should't be more connected with buyDRM or streamOnline? It is not general thing
2261
- */
2262
- keyId?: string;
2263
- }
2593
+ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExternals;
2264
2594
 
2265
2595
  declare type VideoPath = string;
2266
2596
 
@@ -2277,7 +2607,11 @@ export declare enum VideoType {
2277
2607
  * Video is a standard single video.
2278
2608
  */
2279
2609
  VIDEO = "VIDEO",
2280
- TV_PROGRAM = "TV_PROGRAM"
2610
+ TV_PROGRAM = "TV_PROGRAM",
2611
+ /**
2612
+ * Video object represents whole series, e.g. tv show.
2613
+ */
2614
+ SERIES = "SERIES"
2281
2615
  }
2282
2616
 
2283
2617
  /**
@@ -2324,15 +2658,6 @@ declare type Voucher = {
2324
2658
  voucherInfo: SubscriptionInfo | TransactionInfo;
2325
2659
  };
2326
2660
 
2327
- /**
2328
- * @public
2329
- */
2330
- export declare type WebosDeviceInfo = {
2331
- type: 'webos';
2332
- model?: string;
2333
- osVersion?: string;
2334
- };
2335
-
2336
2661
  /**
2337
2662
  * @public
2338
2663
  */