@tivio/sdk-react 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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;
@@ -256,9 +280,6 @@ export declare interface Channel {
256
280
  recentVideos: Video[];
257
281
  }
258
282
 
259
- /**
260
- * @public
261
- */
262
283
  export declare type ChannelSource = {
263
284
  new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
264
285
  description: string;
@@ -424,7 +445,7 @@ export declare type Customizations = {
424
445
  * @internal
425
446
  */
426
447
  export declare interface CustomTheme {
427
- customizations?: Customizations;
448
+ customizations?: Partial<Customizations>;
428
449
  components: Components;
429
450
  size: (size: number) => number;
430
451
  }
@@ -433,7 +454,7 @@ export declare interface CustomTheme {
433
454
  * @internal
434
455
  */
435
456
  export declare interface CustomThemeOptions {
436
- customizations?: Customizations;
457
+ customizations?: Partial<Customizations>;
437
458
  components: Components;
438
459
  size: (size: number) => number;
439
460
  }
@@ -463,7 +484,7 @@ export declare type DetailedPrice = {
463
484
  /**
464
485
  * @public
465
486
  */
466
- export declare type DeviceInfo = ArrisDeviceInfo | WebosDeviceInfo | TizenDeviceInfo;
487
+ export declare type DeviceInfo = ArrisDeviceInfo | ReactNativeDeviceInfo;
467
488
 
468
489
  /**
469
490
  * @public
@@ -496,6 +517,11 @@ export declare type DocumentOptions = Partial<{
496
517
  */
497
518
  export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
498
519
 
520
+ /**
521
+ * @public
522
+ */
523
+ declare type Empty_2 = void | Promise<void> | undefined | Promise<undefined>;
524
+
499
525
  /**
500
526
  * @public
501
527
  */
@@ -616,7 +642,7 @@ export declare type InternalConfig = SdkReactConfig & {
616
642
  fetchPackage: FetchPackage;
617
643
  pubSub: PubSub;
618
644
  /**
619
- * @private URL of resolver. Resolver is a script used to fetch remove code bundle
645
+ * @private URL of resolver. Resolver is a script used to fetch remote code bundle
620
646
  */
621
647
  resolverUrl: string;
622
648
  sdkVersion: string;
@@ -653,6 +679,24 @@ declare interface IntroMarker {
653
679
  */
654
680
  export declare type ItemsInRow = Tag | Video | TvChannel;
655
681
 
682
+ /**
683
+ * @public
684
+ */
685
+ export declare interface JojExternals {
686
+ tvProfiProgramId?: string;
687
+ tvProfiContentId?: string;
688
+ tvProfiSerialId?: string;
689
+ contentId?: string;
690
+ provysId?: string;
691
+ tvProfiProvysId?: string;
692
+ tvProfiHouseId?: string;
693
+ tvProfiTitleOriginal?: string;
694
+ tvProfiTitleSk?: string;
695
+ tvProfiType?: string;
696
+ tvProfiSeriesName?: string;
697
+ tvProfiDistributor?: string;
698
+ }
699
+
656
700
  /**
657
701
  * Enum of all supported languages codes as in ISO 639-1
658
702
  * @public
@@ -687,6 +731,34 @@ export declare type LinkedVideo = {
687
731
  type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
688
732
  };
689
733
 
734
+ /**
735
+ * @public
736
+ */
737
+ export declare type Listener = ListenerAdMetadata | ListenerMarkers;
738
+
739
+ /**
740
+ * @public
741
+ */
742
+ export declare type ListenerAdMetadata = (metadata: AdMetadata) => void;
743
+
744
+ /**
745
+ * @public
746
+ */
747
+ export declare type ListenerMarkers = (marker: Marker[] | null) => void;
748
+
749
+ /**
750
+ * Not supported yet, now it does pass-through only.
751
+ *
752
+ * @public
753
+ */
754
+ export declare type LiveTvChannelSource = SourceBase & {
755
+ type: 'live_tv_channel';
756
+ /**
757
+ * Tivio needs channel name in order to load markers.
758
+ */
759
+ channelName: string;
760
+ };
761
+
690
762
  declare interface Logger {
691
763
  /** important messages */
692
764
  warn(...data: LoggerArgs): void;
@@ -709,15 +781,24 @@ declare type LoggerArgs = any[];
709
781
  /**
710
782
  * @public
711
783
  */
712
- export declare type Marker = {
784
+ export declare interface MallTvExternals {
785
+ mallTvEntityId: string;
786
+ }
787
+
788
+ /**
789
+ * @public
790
+ */
791
+ export declare interface Marker {
713
792
  id: string;
714
- type: string;
715
793
  from: Date;
716
794
  to: Date;
717
795
  count?: number;
718
796
  fromMs?: number;
719
797
  toMs?: number;
720
- };
798
+ relativeFromMs: number;
799
+ relativeToMs: number;
800
+ type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
801
+ }
721
802
 
722
803
  /**
723
804
  * @public
@@ -773,6 +854,16 @@ export declare type Nullable<T> = {
773
854
  */
774
855
  export declare type ObjectType = Record<string, any>;
775
856
 
857
+ /**
858
+ * @public
859
+ */
860
+ export declare interface OktagonExternals {
861
+ /**
862
+ * DRM content Key ID - shouldn't be more connected with buyDRM or streamOnline? It is not general thing
863
+ */
864
+ keyId?: string;
865
+ }
866
+
776
867
  /**
777
868
  * @public
778
869
  */
@@ -789,6 +880,16 @@ declare type OrderByDirection = 'desc' | 'asc';
789
880
  export declare interface Organization {
790
881
  }
791
882
 
883
+ /**
884
+ * If Tivio PlayerWrapper is an interception layer, it should allow the pass-through
885
+ * of not just Tivio source types but any other source types that the 3rd party app may be using.
886
+ *
887
+ * @public
888
+ */
889
+ export declare type OtherSource = SourceBase & StartAndContinuePosition & {
890
+ type: 'other';
891
+ };
892
+
792
893
  /**
793
894
  * @public
794
895
  */
@@ -816,6 +917,30 @@ export declare enum PLATFORM {
816
917
  TV = "TV"
817
918
  }
818
919
 
920
+ /**
921
+ * @public
922
+ */
923
+ export declare type Player = {
924
+ ad: any;
925
+ currentTime: any;
926
+ adSegment: any;
927
+ event: any;
928
+ events: any;
929
+ source: any;
930
+ state: any;
931
+ onPlaybackEnded: any;
932
+ onSourceChanged: any;
933
+ onStateChanged: any;
934
+ onTimeChanged: any;
935
+ pause: any;
936
+ play: any;
937
+ togglePlayPause: any;
938
+ register: any;
939
+ seekTo: any;
940
+ setVolume: any;
941
+ triggerEvent: any;
942
+ };
943
+
819
944
  /**
820
945
  * @public
821
946
  */
@@ -871,6 +996,17 @@ export declare type PlayerConfig = {
871
996
  fullFileDownloadSupport?: boolean;
872
997
  };
873
998
  };
999
+ /**
1000
+ * Ad service settings
1001
+ */
1002
+ adService?: {
1003
+ /**
1004
+ * Tivio - can be used in websites and TV apps. Does not support VPAID
1005
+ * IMA - can be used only in websites. Supports VAST 2, partially VAST 3, VAST 4, SIMID 1.0, OM SDK 1.3,
1006
+ * VPAID 2 (HTML5) https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/compatibility
1007
+ */
1008
+ name: 'IMA SDK' | 'Tivio';
1009
+ };
874
1010
  };
875
1011
 
876
1012
  /**
@@ -905,6 +1041,18 @@ export declare interface PlayerInterface {
905
1041
  unmute?: () => void;
906
1042
  }
907
1043
 
1044
+ /**
1045
+ * @public
1046
+ */
1047
+ export declare interface PlayerInterfaceForPlayerWrapper {
1048
+ /**
1049
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
1050
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
1051
+ */
1052
+ seekTo: (ms: number) => void;
1053
+ setSource: (source: Source | null) => void;
1054
+ }
1055
+
908
1056
  /**
909
1057
  * @public
910
1058
  */
@@ -962,8 +1110,8 @@ export declare type PlayerWrapper = {
962
1110
  source: InputSource | null;
963
1111
  events: {
964
1112
  isSupported: (even: string) => boolean;
965
- addListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
966
- removeListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
1113
+ addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
1114
+ removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
967
1115
  removeAllListeners: () => void;
968
1116
  };
969
1117
  /**
@@ -1001,6 +1149,19 @@ export declare type PlayerWrapper = {
1001
1149
  toggleMuted: () => void;
1002
1150
  };
1003
1151
 
1152
+ /**
1153
+ * @public
1154
+ */
1155
+ export declare enum PlayerWrapperEventType {
1156
+ adMetadata = "adMetadata",
1157
+ markers = "markers"
1158
+ }
1159
+
1160
+ /**
1161
+ * @public
1162
+ */
1163
+ export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
1164
+
1004
1165
  /**
1005
1166
  * @public
1006
1167
  */
@@ -1020,12 +1181,16 @@ export declare type Purchase = {
1020
1181
  expirationDate: Date | null;
1021
1182
  id: string;
1022
1183
  isExpired: boolean;
1184
+ /**
1185
+ * @deprecated isPurchased is ambiguous name. Now it means that purchase.status is "PAID".
1186
+ * So use purchase.status === PurchaseStatus.PAID instead.
1187
+ */
1023
1188
  isPurchased: boolean;
1024
1189
  monetization: PurchaseMonetization | null;
1025
1190
  monetizationId: string | null;
1026
1191
  monetizationRef: any | null;
1027
1192
  status: PurchaseStatus | null;
1028
- type: MonetizationType | null;
1193
+ type: PurchaseType | null;
1029
1194
  /**
1030
1195
  * Timestamp of the last purchase status update in milliseconds.
1031
1196
  */
@@ -1043,7 +1208,10 @@ export declare type PurchaseMonetization = {
1043
1208
  currency?: Currency;
1044
1209
  period?: number;
1045
1210
  price?: number;
1046
- type: MonetizationType;
1211
+ /**
1212
+ * Here are only transaction and subscription, because purchasing of advertisement monetization doesn't make sense.
1213
+ */
1214
+ type: 'transaction' | 'subscription';
1047
1215
  title?: string;
1048
1216
  frequency?: MONETIZATION_FREQUENCY | null;
1049
1217
  /**
@@ -1064,9 +1232,16 @@ export declare enum PurchaseStatus {
1064
1232
  /**
1065
1233
  * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
1066
1234
  */
1067
- KILL = "KILL"
1235
+ BLOCKED = "BLOCKED"
1068
1236
  }
1069
1237
 
1238
+ /**
1239
+ * Purchase is a purchase of one video (transaction type), purchase of subscription or voucher.
1240
+ *
1241
+ * @public
1242
+ */
1243
+ export declare type PurchaseType = 'transaction' | 'subscription' | 'voucher';
1244
+
1070
1245
  /**
1071
1246
  * @public
1072
1247
  */
@@ -1080,7 +1255,7 @@ export declare interface QerkoCancellationInfo {
1080
1255
  */
1081
1256
  export declare interface QerkoData {
1082
1257
  monetization: Monetization;
1083
- video?: Video;
1258
+ item?: Video | TvChannel;
1084
1259
  onPurchase?: () => void;
1085
1260
  onClose?: () => void;
1086
1261
  }
@@ -1133,6 +1308,19 @@ export declare interface QerkoTransaction {
1133
1308
  voucherId?: string;
1134
1309
  }
1135
1310
 
1311
+ /**
1312
+ * @public
1313
+ */
1314
+ export declare type ReactNativeDeviceInfo = {
1315
+ type: 'react-native';
1316
+ /**
1317
+ * Type values defined according to {@link OperatingSystem} from `detect-browser` package for convenience.
1318
+ */
1319
+ os?: 'iOS' | 'Android OS';
1320
+ osVersion: string;
1321
+ platform: PLATFORM;
1322
+ };
1323
+
1136
1324
  /**
1137
1325
  * @public
1138
1326
  */
@@ -1147,7 +1335,7 @@ export declare type RemoteBundleState = {
1147
1335
  */
1148
1336
  export declare type RemoteProviderProps = {
1149
1337
  disableUnmounting?: boolean;
1150
- language?: string;
1338
+ language?: LangCode;
1151
1339
  children: any;
1152
1340
  };
1153
1341
 
@@ -1221,6 +1409,7 @@ export declare interface RowItemAssets {
1221
1409
  portrait?: string | null;
1222
1410
  circled?: string | null;
1223
1411
  banner?: string | null;
1412
+ bannerMobile?: string | null;
1224
1413
  }
1225
1414
 
1226
1415
  /**
@@ -1308,7 +1497,7 @@ export declare type ScreenSubscription = (screenId: string, cb: (error: Error |
1308
1497
  *
1309
1498
  * @public
1310
1499
  */
1311
- export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'language'> & {
1500
+ export declare type SdkReactConfig = Omit<TivioConfig, 'language'> & {
1312
1501
  disableUnmounting?: boolean;
1313
1502
  enable?: boolean;
1314
1503
  enableSentry?: boolean;
@@ -1317,7 +1506,9 @@ export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'l
1317
1506
  }>;
1318
1507
  LoaderComponent?: ComponentType;
1319
1508
  logger?: Logger | null;
1320
- deviceCapabilities: PlayerCapability[] | 'auto';
1509
+ /**
1510
+ * language is required for bundle init (TivioConfig), but it can be set to default EN on SDK side, so here it's optional.
1511
+ */
1321
1512
  language?: LangCode;
1322
1513
  };
1323
1514
 
@@ -1356,6 +1547,63 @@ export declare const setUser: (userId: string | null, payload?: UserPayload | un
1356
1547
  */
1357
1548
  export declare const showGdprConsentPreferences: () => Promise<void>;
1358
1549
 
1550
+ /**
1551
+ * @public
1552
+ */
1553
+ export declare type Source = TvProgramSource | TivioVodSource | AdSource_2 | OtherSource | LiveTvChannelSource;
1554
+
1555
+ /**
1556
+ * @public
1557
+ */
1558
+ export declare type SourceBase = {
1559
+ /**
1560
+ * Tivio SDK users may use pretty complicated source objects in their existing code and if Tivio player
1561
+ * is an interception layer, it should allow them to pass through any type of object.
1562
+ */
1563
+ additionalPayload?: Record<string, any>;
1564
+ /**
1565
+ * Source type.
1566
+ */
1567
+ type: 'ad' | 'live_tv_channel' | 'other' | 'tivio_vod' | 'tv_program';
1568
+ /**
1569
+ * URI to play.
1570
+ */
1571
+ uri: string;
1572
+ };
1573
+
1574
+ /**
1575
+ * @public
1576
+ */
1577
+ export declare type StartAndContinuePosition = {
1578
+ /**
1579
+ * Relative from stream start, in ms.
1580
+ *
1581
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1582
+ *
1583
+ * On output from Tivio it is always defined. Tivio can change this value.
1584
+ * (e.g. in order to fix start position of a TV program)
1585
+ */
1586
+ startFromPosition?: number;
1587
+ /**
1588
+ * Relative from stream start, in ms.
1589
+ *
1590
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1591
+ *
1592
+ * If provided, tivio will not correct it and will send this value back in startFromPosition.
1593
+ * If provided, startFromPosition is ignored.
1594
+ */
1595
+ continueFromPosition?: number;
1596
+ };
1597
+
1598
+ /**
1599
+ * @public
1600
+ */
1601
+ declare interface StorageManager_2 {
1602
+ getItem(key: string): string | null | Promise<string | null>;
1603
+ setItem(key: string, value: string): void | Promise<void>;
1604
+ }
1605
+ export { StorageManager_2 as StorageManager }
1606
+
1359
1607
  /**
1360
1608
  * @public
1361
1609
  */
@@ -1467,6 +1715,9 @@ export declare type TileOptions = {
1467
1715
  opacity: string | number;
1468
1716
  fontWeight: string;
1469
1717
  };
1718
+ sizes: {
1719
+ [variant in TileSizeVariant]: TileSizesMap;
1720
+ };
1470
1721
  };
1471
1722
 
1472
1723
  /**
@@ -1474,7 +1725,6 @@ export declare type TileOptions = {
1474
1725
  */
1475
1726
  export declare type TileProps = {
1476
1727
  cover: string;
1477
- isLoading: boolean;
1478
1728
  bottomLabel: string;
1479
1729
  bottomLabelAreaHeight: number;
1480
1730
  innerLabel: string;
@@ -1483,7 +1733,6 @@ export declare type TileProps = {
1483
1733
  focused: boolean;
1484
1734
  onClick?: () => void;
1485
1735
  hoverable: boolean;
1486
- overlay: boolean;
1487
1736
  coverPadding: CoverPadding;
1488
1737
  variant: RowItemComponent;
1489
1738
  coverWidth: number;
@@ -1503,6 +1752,34 @@ export declare type TileProps = {
1503
1752
  */
1504
1753
  export declare type TilePropsPartial = Partial<TileProps>;
1505
1754
 
1755
+ /**
1756
+ * @internal
1757
+ */
1758
+ export declare type TileSizes = {
1759
+ coverPaddingTop: number;
1760
+ coverPaddingBottom: number;
1761
+ coverWidth: number;
1762
+ coverHeight: number;
1763
+ cellPaddingRight: number;
1764
+ labelHeight: number;
1765
+ };
1766
+
1767
+ /**
1768
+ * Tile sizes by Tile variant (row item component)
1769
+ *
1770
+ * @internal
1771
+ */
1772
+ export declare type TileSizesMap = {
1773
+ [item in RowItemComponent]: TileSizes;
1774
+ };
1775
+
1776
+ /**
1777
+ * Default (desktop) or mobile variants are used for WEB.
1778
+ *
1779
+ * @internal
1780
+ */
1781
+ export declare type TileSizeVariant = 'default' | 'mobile';
1782
+
1506
1783
  /**
1507
1784
  * @public
1508
1785
  */
@@ -1572,10 +1849,6 @@ export declare type TivioComponents = {
1572
1849
  WebTile: React_2.ComponentType<{
1573
1850
  item?: ItemsInRow;
1574
1851
  } & TilePropsPartial>;
1575
- AdIndicationButtonWeb: React_2.ReactNode;
1576
- Recommendation: React_2.ReactNode;
1577
- SkipButtonWeb: React_2.ReactNode;
1578
- TvPlayer: React_2.ComponentType<WebPlayerProps>;
1579
1852
  };
1580
1853
 
1581
1854
  /**
@@ -1634,7 +1907,7 @@ export declare type TivioGetters = {
1634
1907
  */
1635
1908
  getPlayerWrapper: (opt: {
1636
1909
  playerWrapperId?: string;
1637
- }) => any;
1910
+ }) => PlayerWrapper;
1638
1911
  getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
1639
1912
  /**
1640
1913
  * Get video by its id.
@@ -1653,7 +1926,7 @@ export declare type TivioGetters = {
1653
1926
  * @public
1654
1927
  */
1655
1928
  export declare type TivioHooks = {
1656
- useAd: () => [(AdSource | null)];
1929
+ useAd: () => [(AdExternal | null)];
1657
1930
  useAdSegment: () => AdSegment | null;
1658
1931
  useCancelSubscription: UseCancelSubscription;
1659
1932
  useItemsInRow: (rowId: string, options: PaginationOptions) => {
@@ -1764,6 +2037,59 @@ export declare type TivioInternalProviders = {
1764
2037
  RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
1765
2038
  };
1766
2039
 
2040
+ /**
2041
+ * @internal
2042
+ */
2043
+ export declare type TivioJsBundle = TivioJsBundleExposedApi & {
2044
+ init: (config: TivioConfig) => void | Promise<void>;
2045
+ tivio: any;
2046
+ };
2047
+
2048
+ /**
2049
+ * @public
2050
+ */
2051
+ export declare type TivioJsBundleExposedApi = {
2052
+ AdSource: any;
2053
+ ChannelSource: any;
2054
+ VodTivioSource: any;
2055
+ /**
2056
+ * Get (or create) player wrapper instance
2057
+ * @param id - player wrapper id
2058
+ * @returns {Player} player wrapper instance
2059
+ */
2060
+ getPlayer: (id: string) => Player;
2061
+ /**
2062
+ * Get tv channel by its id.
2063
+ * @param tvChannelId - tv channel id
2064
+ * @returns {Promise<TvChannel | null>} channel or null if tv channel does not exists
2065
+ */
2066
+ getTvChannelById: (tvChannelId: string) => Promise<TvChannel | null>;
2067
+ /**
2068
+ * Get tag by its id.
2069
+ * @param tagId - tag id
2070
+ * @returns {Promise<Tag | null>} widget or null if tag does not exists
2071
+ */
2072
+ getTagById: (tagId: string) => Promise<Tag | null>;
2073
+ createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
2074
+ destroy: () => Promise<void>;
2075
+ } & Pick<TivioGetters, 'getVideoById'> & Pick<TivioSubscriptions, 'subscribeToVideo' | 'subscribeToItemsInRow'> & Pick<TivioAuth, 'createUserWithEmailAndPassword' | 'signInWithEmailAndPassword'> & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
2076
+
2077
+ /**
2078
+ * @public
2079
+ */
2080
+ export declare interface TivioPlayerWrapper {
2081
+ addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
2082
+ reportError: (error: Error) => void;
2083
+ reportPlaybackEnded: () => void;
2084
+ reportTimeProgress: (ms: number) => void;
2085
+ seekTo: (ms: number) => void;
2086
+ /**
2087
+ * @param {Source} source - source to set
2088
+ * @param {string} calibrationId - id of calibration profile
2089
+ */
2090
+ setSource: (source: Source | null, calibrationId?: string) => void;
2091
+ }
2092
+
1767
2093
  /**
1768
2094
  * @public
1769
2095
  */
@@ -1798,12 +2124,6 @@ export declare type TivioReactBundle = {
1798
2124
  expirationDate: Date;
1799
2125
  }) => Promise<QerkoPaymentInfo>;
1800
2126
  cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
1801
- /**
1802
- * Set tivio language.
1803
- * @param language
1804
- */
1805
- setLanguage: (language: LangCode) => void;
1806
- setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1807
2127
  showConsentPreferences: () => void;
1808
2128
  /**
1809
2129
  * Contains hooks and providers for internal usages.
@@ -1812,6 +2132,20 @@ export declare type TivioReactBundle = {
1812
2132
  */
1813
2133
  internal: TivioInternalBundle;
1814
2134
  destroy: () => Promise<void>;
2135
+ } & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
2136
+
2137
+ /**
2138
+ * @public
2139
+ */
2140
+ export declare type TivioSetters = {
2141
+ setBundleVersion: (bundleVersion: string | null) => void;
2142
+ /**
2143
+ * Set tivio language.
2144
+ * @param language
2145
+ */
2146
+ setLanguage: (language: LangCode) => void;
2147
+ setStorageManager: (storageManager: StorageManager_2) => void;
2148
+ setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
1815
2149
  };
1816
2150
 
1817
2151
  /**
@@ -1844,6 +2178,17 @@ export declare type TivioSubscriptions = {
1844
2178
  }) => void;
1845
2179
  };
1846
2180
 
2181
+ /**
2182
+ * @public
2183
+ */
2184
+ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
2185
+ type: 'tivio_vod';
2186
+ /**
2187
+ * Allows Tivio to load monetization config an apply ads.
2188
+ */
2189
+ videoPath: string;
2190
+ };
2191
+
1847
2192
  /**
1848
2193
  * @public
1849
2194
  */
@@ -1893,15 +2238,6 @@ export declare interface TivioWidgetRef {
1893
2238
  });
1894
2239
  }
1895
2240
 
1896
- /**
1897
- * @public
1898
- */
1899
- export declare type TizenDeviceInfo = {
1900
- type: 'tizen';
1901
- model?: string;
1902
- osVersion?: string;
1903
- };
1904
-
1905
2241
  declare type TransactionInfo = {
1906
2242
  type: 'transaction';
1907
2243
  name: string;
@@ -1942,6 +2278,35 @@ export declare interface TvChannel extends RowItem {
1942
2278
  price: number;
1943
2279
  }
1944
2280
 
2281
+ /**
2282
+ * @public
2283
+ */
2284
+ export declare type TvProgramSource = SourceBase & StartAndContinuePosition & {
2285
+ type: 'tv_program';
2286
+ /**
2287
+ * If epgTo is wrong, Tivio cannot correctly guess if the video it startover or timeshift . For such cases
2288
+ * Tivio needs explicit tv mode.
2289
+ * null if source begins in the future.
2290
+ */
2291
+ tvMode: 'startover' | 'timeshift' | null;
2292
+ /**
2293
+ * Tivio needs channel name in order to load markers.
2294
+ */
2295
+ channelName: string;
2296
+ /**
2297
+ * Tivio needs EPG from in order to load markers.
2298
+ */
2299
+ epgFrom: Date;
2300
+ /**
2301
+ * Tivio needs EPG to in order to load markers.
2302
+ */
2303
+ epgTo: Date;
2304
+ /**
2305
+ * When the stream (provided in uri) really starts - typically few minutes before epgFrom.
2306
+ */
2307
+ streamStart: Date;
2308
+ };
2309
+
1945
2310
  /**
1946
2311
  * @public
1947
2312
  */
@@ -1950,7 +2315,7 @@ export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
1950
2315
  /**
1951
2316
  * @public
1952
2317
  */
1953
- export declare const useAd: () => AdSource | null;
2318
+ export declare const useAd: () => AdExternal | null;
1954
2319
 
1955
2320
  /**
1956
2321
  * @public
@@ -2102,9 +2467,23 @@ export declare const usePurchasesWithVideos: () => {
2102
2467
  * @public
2103
2468
  */
2104
2469
  export declare type User = {
2470
+ /**
2471
+ * Returns "active" (non-expired) purchases, so they give access to some content.
2472
+ * Does not return voucher purchases, because they give access to videos/subscriptions only for user who activates voucher,
2473
+ * not for user who purchases it.
2474
+ */
2105
2475
  purchases: Purchase[];
2476
+ /**
2477
+ * Returns all PAID or CANCELLED user purchases (expired and non-expired)
2478
+ */
2106
2479
  allPurchases: Purchase[];
2480
+ /**
2481
+ * Returns "active" (not CANCELLED) VoD purchases ("transaction" type)
2482
+ */
2107
2483
  purchasedVods: Purchase[];
2484
+ /**
2485
+ * Returns "active" (non-expired) subscription purchases
2486
+ */
2108
2487
  purchasedSubscriptions: Purchase[];
2109
2488
  isPurchasesInitialized: boolean;
2110
2489
  isSignedIn: boolean;
@@ -2281,7 +2660,8 @@ export declare enum VastProvider {
2281
2660
  MALL_TV = "malltv",
2282
2661
  MALL_TV_PREBID = "malltv-prebid",
2283
2662
  PRIMA = "prima",
2284
- TEST = "test"
2663
+ TEST = "test",
2664
+ TEST_VPAID = "test-vpaid"
2285
2665
  }
2286
2666
 
2287
2667
  /**
@@ -2363,18 +2743,7 @@ export declare enum VideoContentType {
2363
2743
  /**
2364
2744
  * @public
2365
2745
  */
2366
- export declare interface VideoExternals {
2367
- tvProfiProgramId?: string;
2368
- tvProfiContentId?: string;
2369
- tvProfiSerialId?: string;
2370
- contentId?: string;
2371
- provysId?: string;
2372
- mallTvEntityId?: string;
2373
- /**
2374
- * DRM content Key ID - should't be more connected with buyDRM or streamOnline? It is not general thing
2375
- */
2376
- keyId?: string;
2377
- }
2746
+ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExternals;
2378
2747
 
2379
2748
  declare type VideoPath = string;
2380
2749
 
@@ -2391,7 +2760,11 @@ export declare enum VideoType {
2391
2760
  * Video is a standard single video.
2392
2761
  */
2393
2762
  VIDEO = "VIDEO",
2394
- TV_PROGRAM = "TV_PROGRAM"
2763
+ TV_PROGRAM = "TV_PROGRAM",
2764
+ /**
2765
+ * Video object represents whole series, e.g. tv show.
2766
+ */
2767
+ SERIES = "SERIES"
2395
2768
  }
2396
2769
 
2397
2770
  /**
@@ -2438,15 +2811,6 @@ declare type Voucher = {
2438
2811
  voucherInfo: SubscriptionInfo | TransactionInfo;
2439
2812
  };
2440
2813
 
2441
- /**
2442
- * @public
2443
- */
2444
- export declare type WebosDeviceInfo = {
2445
- type: 'webos';
2446
- model?: string;
2447
- osVersion?: string;
2448
- };
2449
-
2450
2814
  /**
2451
2815
  * @public
2452
2816
  */