@tivio/sdk-react 6.0.1 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { FunctionComponentElement } from 'react';
3
3
  import { GeoPoint } from '@firebase/firestore-types';
4
4
  import { OperatingSystem } from 'detect-browser';
5
5
  import { default as React_2 } from 'react';
6
+ import { RecommendationsQuery } from '@algolia/recommend';
6
7
 
7
8
  /**
8
9
  * @public
@@ -60,13 +61,37 @@ export declare type AdMetadata = {
60
61
  /**
61
62
  * @public
62
63
  */
63
- export declare interface AdMonetization extends Monetization {
64
+ export declare type AdMonetization = Monetization;
65
+
66
+ export declare interface AdPackInfo {
67
+ order: number;
68
+ total: number;
69
+ }
70
+
71
+ export declare interface AdSegment {
72
+ id: string;
73
+ /**
74
+ * @deprecated alias to secondsToEnd * 1000
75
+ */
76
+ remainingMs: number;
77
+ secondsToEnd: number;
78
+ secondsToSkippable: number | null;
79
+ canSeek: boolean;
80
+ /**
81
+ * true if is skippable and skip countdown has passed
82
+ */
83
+ canSkip: boolean;
84
+ /**
85
+ * true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
86
+ */
87
+ isSkippable: boolean;
88
+ skip: () => any;
64
89
  }
65
90
 
66
91
  /**
67
92
  * @public
68
93
  */
69
- declare type AdSegment = {
94
+ declare type AdSegment_2 = {
70
95
  id: string;
71
96
  /**
72
97
  * @deprecated alias to secondsToEnd * 1000
@@ -89,17 +114,27 @@ declare type AdSegment = {
89
114
  /**
90
115
  * @public
91
116
  */
92
- export declare type AdSource = {
93
- new (url: string, name: string, description: string, skipDelayMs: number | null, adDurationMs: number, trackingContext?: any, // internal Tivio types
94
- adMarker?: any, // internal Tivio types
95
- packInfo?: any, // internal Tivio types
96
- provider?: any): AdSource;
97
- description: string;
98
- name: string;
99
- url: string;
117
+ declare type AdSource = SourceBase & {
118
+ type: 'ad';
119
+ };
120
+
121
+ export declare interface AdSourceActions {
122
+ click: () => void;
123
+ skip: () => void;
124
+ skipAll: () => void;
125
+ resumeAd: () => void;
126
+ pauseAd: () => void;
127
+ muteAd: () => void;
128
+ unmuteAd: () => void;
129
+ }
130
+
131
+ /**
132
+ * @public
133
+ */
134
+ export declare interface AdSourceInterface extends CommonSourceInterface<SourceType.ADVERTISEMENT> {
135
+ adType: AdType;
100
136
  durationMs: number;
101
137
  skipDelayMs: number | null;
102
- type: 'ad';
103
138
  /**
104
139
  * true if is skippable and skip countdown has passed
105
140
  */
@@ -108,6 +143,10 @@ export declare type AdSource = {
108
143
  * true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
109
144
  */
110
145
  isSkippable: boolean;
146
+ isSkipped: boolean;
147
+ isPaused: boolean;
148
+ isMuted: boolean;
149
+ setIsPaused(isPaused: boolean): void;
111
150
  /**
112
151
  * Skip ad. Only works when canSkip is true
113
152
  */
@@ -115,21 +154,47 @@ export declare type AdSource = {
115
154
  /**
116
155
  * Order in ad break (ad break is a group of ads played right after each other)
117
156
  */
118
- order: number;
157
+ order: number | null;
119
158
  /**
120
159
  * Total number of ads in ad break (ad break is a group of ads played right after each other)
121
160
  */
122
- totalCount: number;
161
+ totalCount: number | null;
123
162
  secondsToEnd: number;
124
163
  secondsToSkippable: number | null;
125
- };
164
+ provider?: VastProvider;
165
+ apiFramework: VastApiFramework | null;
166
+ parent: PlayerSourceInterface | null;
167
+ trackingContext: any | null;
168
+ resumeAd(): void;
169
+ pauseAd(): void;
170
+ muteAd(): void;
171
+ unmuteAd(): void;
172
+ skipAll(): void;
173
+ onRemainingTimeChanged(ms: number): void;
174
+ click(): void;
175
+ }
126
176
 
127
177
  /**
128
178
  * @public
129
179
  */
130
- declare type AdSource_2 = SourceBase & {
131
- type: 'ad';
132
- };
180
+ export declare interface AdSourceParams extends CommonSourceParams<SourceType.ADVERTISEMENT> {
181
+ id: string;
182
+ adType?: AdType;
183
+ actions?: AdSourceActions | null;
184
+ apiFramework?: VastApiFramework | null;
185
+ skipDelayMs?: number | null;
186
+ adDurationMs: number;
187
+ trackingContext?: any;
188
+ adMarker?: any;
189
+ packInfo?: AdPackInfo;
190
+ provider?: VastProvider;
191
+ parent?: PlayerSource | null;
192
+ }
193
+
194
+ /**
195
+ * @public
196
+ */
197
+ export declare type AdType = 'playable' | 'metadata-only';
133
198
 
134
199
  /**
135
200
  * @public
@@ -345,6 +410,7 @@ export declare type Callback<T = any> = (arg?: T) => void;
345
410
 
346
411
  /**
347
412
  * @public
413
+ * @deprecated this channel structure is not used anymore (don't confuse with tv channels, which are used).
348
414
  */
349
415
  export declare interface Channel {
350
416
  id: string;
@@ -354,36 +420,33 @@ export declare interface Channel {
354
420
  recentVideos: Video[];
355
421
  }
356
422
 
423
+ declare type ChannelPath = string;
424
+
357
425
  /**
358
426
  * @public
359
427
  */
360
- export declare type ChannelSource = {
361
- new (url: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
362
- description: string;
363
- name: string;
364
- url: string;
365
- from: Date;
428
+ export declare interface ChannelSourceInterface extends PlayerSourceInterface<SourceType.CHANNEL> {
429
+ tvChannelType: TvChannelType;
366
430
  channelName: string;
431
+ programName?: string;
432
+ programDescription?: string;
433
+ from: Date;
367
434
  to: Date;
368
- type: 'channel';
369
- watchWithoutAdsRecommendation: {
370
- showPurchaseDialog: () => void;
371
- } | null;
372
- };
435
+ poster: string | null;
436
+ tvMode: TvMode | 'live' | null;
437
+ }
373
438
 
374
439
  /**
375
440
  * @public
376
441
  */
377
- export declare interface ChannelSourcePojo {
378
- type: 'ChannelSource';
379
- url: string;
380
- originalOptions: any;
442
+ export declare interface ChannelSourceParams extends PlayerSourceParams<SourceType.CHANNEL> {
443
+ tvChannelType: TvChannelType;
381
444
  channelName: string;
382
- programName: string;
383
- programDescription: string;
445
+ programName?: string;
446
+ programDescription?: string;
384
447
  from: Date;
385
448
  to: Date;
386
- poster?: string;
449
+ tvMode?: TvMode | 'live' | null;
387
450
  }
388
451
 
389
452
  /**
@@ -396,6 +459,47 @@ export declare type Chapter = any;
396
459
  */
397
460
  export declare type CmpConfig = 'default' | 'debug' | 'none';
398
461
 
462
+ /**
463
+ * TODO same name as core-js entity, not convenient
464
+ * @public
465
+ */
466
+ export declare type CommonSource = PlayerSource | AdSourceInterface;
467
+
468
+ /**
469
+ * Use this interface only for inheritance. Otherwise use {@link CommonSource}
470
+ * @public
471
+ */
472
+ export declare interface CommonSourceInterface<T extends SourceType = SourceType> {
473
+ type: T;
474
+ url: string;
475
+ name?: string;
476
+ description?: string;
477
+ currentTime: number;
478
+ event: any | null;
479
+ setEvent(event: any | null): void;
480
+ onTimeChanged(ms: number): void;
481
+ next: CommonSource | null;
482
+ canSeek: boolean;
483
+ hasNext: boolean;
484
+ isFinished: boolean;
485
+ setIsFinished(isFinished: boolean): void;
486
+ isStarted: boolean;
487
+ setIsStarted(isStarted: boolean): void;
488
+ autoplay?: boolean;
489
+ toLog(): any;
490
+ }
491
+
492
+ /**
493
+ * @public
494
+ */
495
+ export declare interface CommonSourceParams<T extends SourceType = SourceType> {
496
+ type: T;
497
+ url: string;
498
+ name?: string;
499
+ description?: string;
500
+ autoplay?: boolean;
501
+ }
502
+
399
503
  /**
400
504
  * Just another alias. Reexported for backward compatibility.
401
505
  * @public
@@ -432,6 +536,46 @@ export declare interface ConfirmationOverlayPayloadBase {
432
536
  automaticConfirmDelayMs?: number;
433
537
  }
434
538
 
539
+ /**
540
+ * @public
541
+ */
542
+ export declare interface ConsumedAds {
543
+ chapterIds: Set<string>;
544
+ markerIds: Set<string>;
545
+ postroll: boolean;
546
+ /**
547
+ * TODO refactor
548
+ * true when preroll has been loaded (not when it was watched)
549
+ */
550
+ preroll: boolean;
551
+ }
552
+
553
+ /**
554
+ * @public
555
+ */
556
+ export declare enum ContentSortEnum {
557
+ LATEST = "latest",
558
+ OLDEST = "oldest",
559
+ A_TO_Z = "a_to_z",
560
+ Z_TO_A = "z_to_a",
561
+ EPISODE_ASC = "episode_asc",
562
+ EPISODE_DESC = "episode_desc"
563
+ }
564
+
565
+ /**
566
+ * @public
567
+ */
568
+ export declare type ContentSortPickerProps = {
569
+ value: ContentSortEnum;
570
+ isSeries?: boolean;
571
+ onChange: (value: ContentSortEnum) => void;
572
+ };
573
+
574
+ /**
575
+ * @public
576
+ */
577
+ export declare type ContinuePosition = number | null | Promise<number | null>;
578
+
435
579
  /**
436
580
  * Entity aggregate conversion statistics per day
437
581
  * TODO in future change structure, new used like array item
@@ -563,9 +707,24 @@ export declare enum CustomerId {
563
707
  GRAPE = "GRAPE",
564
708
  TIVIO = "TIVIO",
565
709
  STORYBOOK = "STORYBOOK",
566
- NANGU_DEV = "NANGU_DEV"
710
+ NANGU_DEV = "NANGU_DEV",
711
+ CNC = "CNC",
712
+ VOJTA_ZIZKA = "VOJTA_ZIZKA"
567
713
  }
568
714
 
715
+ /**
716
+ * @public
717
+ */
718
+ export declare interface Cutout {
719
+ startMs: number;
720
+ endMs: number;
721
+ }
722
+
723
+ /**
724
+ * @public
725
+ */
726
+ export declare const DEFAULT_LIMIT = 10;
727
+
569
728
  /**
570
729
  * @public
571
730
  */
@@ -745,6 +904,35 @@ export declare interface EmailTemplateVersion {
745
904
  thumbnail_url: string;
746
905
  }
747
906
 
907
+ export declare type EmbedScreenMessageNavigateType = {
908
+ type: EmbedScreenMessageType.NAVIGATE;
909
+ to: string | 'Profile' | 'Home' | 'Search' | 'Video' | 'Series';
910
+ value?: string;
911
+ };
912
+
913
+ export declare type EmbedScreenMessageResizeType = {
914
+ type: EmbedScreenMessageType.RESIZE;
915
+ height: number;
916
+ };
917
+
918
+ export declare enum EmbedScreenMessageType {
919
+ RESIZE = "RESIZE",
920
+ NAVIGATE = "NAVIGATE"
921
+ }
922
+
923
+ export declare type EmbedScreenPostMessage = EmbedScreenMessageNavigateType | EmbedScreenMessageResizeType;
924
+
925
+ export declare type EmbedScreenPostMessageFn = <T extends EmbedScreenPostMessage = EmbedScreenPostMessage>(message: T, origin?: string) => void;
926
+
927
+ /**
928
+ * @public
929
+ */
930
+ export declare interface EmitterInterface {
931
+ isSupported: (even: string) => boolean;
932
+ addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
933
+ removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
934
+ }
935
+
748
936
  /**
749
937
  * @public
750
938
  */
@@ -827,11 +1015,9 @@ export declare interface GetBaseAnalyticsRequest {
827
1015
  endDate: string;
828
1016
  }
829
1017
 
830
- export declare interface GetConversionAnalyticsRequest extends GetBaseAnalyticsRequest {
831
- }
1018
+ export declare type GetConversionAnalyticsRequest = GetBaseAnalyticsRequest;
832
1019
 
833
- export declare interface GetMonetizationsAnalyticsRequest extends GetBaseAnalyticsRequest {
834
- }
1020
+ export declare type GetMonetizationsAnalyticsRequest = GetBaseAnalyticsRequest;
835
1021
 
836
1022
  export declare interface GetMonetizationsAnalyticsResponse {
837
1023
  monetizationsAnalytics: MonetizationSummaryItem[];
@@ -903,6 +1089,10 @@ export declare interface GetSourceUrlRequest {
903
1089
  * construct sources based on source domains right away.
904
1090
  */
905
1091
  ignoreDocumentSources?: boolean;
1092
+ /**
1093
+ * See {@link SourcePlayMode} type. If not given, getSourceUrl will pick default based on requested document.
1094
+ */
1095
+ sourcePlayMode?: SourcePlayMode;
906
1096
  }
907
1097
 
908
1098
  export declare interface GetSourceUrlResponse {
@@ -918,6 +1108,62 @@ export declare interface GetSourceUrlResponse {
918
1108
  * DRM configuration to {@link url} if source is encrypted.
919
1109
  */
920
1110
  drm?: Drm;
1111
+ /**
1112
+ * See {@link SourcePlayMode} type.
1113
+ */
1114
+ sourcePlayMode: SourcePlayMode;
1115
+ }
1116
+
1117
+ export declare interface GetVideoAnalyticsErrorItem {
1118
+ count: number;
1119
+ timestamp: number;
1120
+ errorMessage: string;
1121
+ }
1122
+
1123
+ export declare interface GetVideoAnalyticsErrorResult {
1124
+ totalCount: number;
1125
+ errors: Array<GetVideoAnalyticsErrorItem>;
1126
+ }
1127
+
1128
+ export declare interface GetVideoAnalyticsRequest {
1129
+ contentId: string;
1130
+ timestamp?: number;
1131
+ userId?: string;
1132
+ source?: string;
1133
+ limit?: number;
1134
+ errorLimit?: number;
1135
+ errorTimestampFrom?: number;
1136
+ }
1137
+
1138
+ export declare interface GetVideoAnalyticsResponse {
1139
+ state?: GetVideoAnalyticsResult;
1140
+ quality?: GetVideoAnalyticsResult;
1141
+ error?: GetVideoAnalyticsErrorResult;
1142
+ localities?: unknown;
1143
+ }
1144
+
1145
+ export declare type GetVideoAnalyticsResult = {
1146
+ [timestamp: string]: {
1147
+ totalDuration: number;
1148
+ values: Array<{
1149
+ value: string;
1150
+ duration: number;
1151
+ percentage: number;
1152
+ }>;
1153
+ };
1154
+ };
1155
+
1156
+ export declare interface GetVideoAnalyticsViewsRequest {
1157
+ contentId: string;
1158
+ currentViewsIntervalMs: number;
1159
+ timestamp?: number;
1160
+ source?: string;
1161
+ }
1162
+
1163
+ export declare interface GetVideoAnalyticsViewsResponse {
1164
+ previousViews?: number;
1165
+ currentViews?: number;
1166
+ totalViews?: number;
921
1167
  }
922
1168
 
923
1169
  export declare interface GetViewAnalyticsResponse {
@@ -925,7 +1171,15 @@ export declare interface GetViewAnalyticsResponse {
925
1171
  topWatched: TopWatchItem[];
926
1172
  }
927
1173
 
928
- export declare interface GetViewsAnalyticsRequest extends GetBaseAnalyticsRequest {
1174
+ export declare type GetViewsAnalyticsRequest = GetBaseAnalyticsRequest;
1175
+
1176
+ /**
1177
+ * @public
1178
+ */
1179
+ export declare enum GRID_TYPES {
1180
+ ROW = "ROW",
1181
+ VIDEO = "VIDEO",
1182
+ SERIES = "SERIES"
929
1183
  }
930
1184
 
931
1185
  /**
@@ -976,6 +1230,7 @@ export declare interface IndexedUser extends IndexedObject {
976
1230
  export declare interface IndexedVideo extends IndexedObject {
977
1231
  assets: any;
978
1232
  organizationPath: string;
1233
+ sharedOrganizationPaths?: string[];
979
1234
  tagPaths?: string[];
980
1235
  created: Date | string;
981
1236
  isDraft: boolean;
@@ -988,11 +1243,6 @@ export declare interface IndexedVideo extends IndexedObject {
988
1243
  externals?: VideoExternals;
989
1244
  }
990
1245
 
991
- /**
992
- * @public
993
- */
994
- export declare type InputSource = AdSource | ChannelSource | VodTivioSource | VodExternalSource;
995
-
996
1246
  /**
997
1247
  * @public
998
1248
  */
@@ -1032,6 +1282,37 @@ declare interface IntroMarker {
1032
1282
  skip: () => void;
1033
1283
  }
1034
1284
 
1285
+ /**
1286
+ * @public
1287
+ * @param source
1288
+ */
1289
+ export declare function isAdSource(source?: CommonSource | null): source is AdSourceInterface;
1290
+
1291
+ /**
1292
+ * @public
1293
+ */
1294
+ export declare function isChannelSource(source?: CommonSource | null): source is ChannelSourceInterface;
1295
+
1296
+ /**
1297
+ * @public
1298
+ */
1299
+ export declare const isClassicChannelSource: (source?: CommonSource | null) => source is ChannelSourceInterface;
1300
+
1301
+ /**
1302
+ * @public
1303
+ */
1304
+ export declare const isVirtualChannelSource: (source?: CommonSource | null) => source is VirtualChannelSourceInterface;
1305
+
1306
+ /**
1307
+ * @public
1308
+ */
1309
+ export declare function isVodExternalSource(source?: CommonSource | null): source is VodExternalSourceInterface;
1310
+
1311
+ /**
1312
+ * @public
1313
+ */
1314
+ export declare function isVodTivioSource(source?: CommonSource | null): source is VodTivioSourceInterface;
1315
+
1035
1316
  /**
1036
1317
  * @public
1037
1318
  */
@@ -1238,6 +1519,18 @@ export declare interface Monetization {
1238
1519
  description?: string;
1239
1520
  }
1240
1521
 
1522
+ /**
1523
+ * @public
1524
+ */
1525
+ export declare enum MONETIZATION_DURATION {
1526
+ UNLIMITED = -1,
1527
+ DAY = 1,
1528
+ WEEK = 7,
1529
+ MONTH = 30,
1530
+ HALF_YEAR = 183,
1531
+ YEAR = 365
1532
+ }
1533
+
1241
1534
  /**
1242
1535
  * @public
1243
1536
  */
@@ -1355,6 +1648,11 @@ export declare type NewVoucher = {
1355
1648
  expirationDate: Date | number;
1356
1649
  };
1357
1650
 
1651
+ /**
1652
+ * @public
1653
+ */
1654
+ export declare type NonAdSourceType = Exclude<SourceType, SourceType.ADVERTISEMENT>;
1655
+
1358
1656
  declare interface Notification_2 {
1359
1657
  id: string;
1360
1658
  name: string;
@@ -1396,8 +1694,8 @@ export declare interface OktagonExternals {
1396
1694
  /**
1397
1695
  * @public
1398
1696
  */
1399
- export declare interface OrderBy {
1400
- field: string;
1697
+ export declare interface OrderBy<T = void> {
1698
+ field: T extends void ? string : T;
1401
1699
  directionStr?: OrderByDirection;
1402
1700
  }
1403
1701
 
@@ -1568,12 +1866,12 @@ export declare interface PlayerEngineConfig {
1568
1866
  /**
1569
1867
  * @public
1570
1868
  */
1571
- export declare type PlayerEngineEvent = 'bufferingchange' | 'bufferedinfochange' | 'statechange' | 'loaded' | 'loadfailed' | 'togglefullscreen' | 'durationchange' | 'busychange' | 'trackschanged' | 'abort' | 'canplay' | 'canplaythrough' | 'emptied' | 'ended' | 'error' | 'loadeddata' | 'loadedmetadata' | 'loadstart' | 'pause' | 'play' | 'playing' | 'progress' | 'ratechange' | 'seeked' | 'seeking' | 'stalled' | 'suspend' | 'timeupdate' | 'volumechange' | 'waiting' | 'click' | 'fullscreenchange';
1869
+ export declare type PlayerEngineEvent = 'bufferingchange' | 'bufferedinfochange' | 'statechange' | 'loaded' | 'loadfailed' | 'togglefullscreen' | 'durationchange' | 'busychange' | 'trackschanged' | 'abort' | 'canplay' | 'canplaythrough' | 'emptied' | 'enginedurationchange' | 'enginetimeupdate' | 'ended' | 'error' | 'loadeddata' | 'loadedmetadata' | 'loadstart' | 'pause' | 'play' | 'playing' | 'progress' | 'ratechange' | 'seeked' | 'seeking' | 'stalled' | 'suspend' | 'timeupdate' | 'volumechange' | 'waiting' | 'click' | 'fullscreenchange';
1572
1870
 
1573
1871
  /**
1574
1872
  * @public
1575
1873
  */
1576
- export declare type PlayerEngineFactory = (videoElement: HTMLVideoElement) => PlayerEngineInterface;
1874
+ export declare type PlayerEngineFactory = (videoElement: HTMLVideoElement) => Promise<PlayerEngineInterface>;
1577
1875
 
1578
1876
  /**
1579
1877
  * @public
@@ -1683,36 +1981,66 @@ export declare interface PlayerEngineOptions {
1683
1981
  seekDebounceMs?: number;
1684
1982
  }
1685
1983
 
1984
+ export declare interface PlayerError {
1985
+ message: string;
1986
+ }
1987
+
1686
1988
  /**
1687
1989
  * @public
1688
1990
  */
1689
1991
  export declare interface PlayerInterface {
1992
+ /**
1993
+ * Pause playback
1994
+ */
1690
1995
  pause: () => void;
1691
1996
  /**
1692
- * unpause
1997
+ * Unpause playback
1693
1998
  */
1694
- play: () => void;
1999
+ play: () => Promise<void> | void;
1695
2000
  /**
2001
+ * Stop and close video
2002
+ */
2003
+ stop: () => Promise<void> | void;
2004
+ /**
2005
+ * Seek to position in ms
2006
+ *
1696
2007
  * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
1697
2008
  * or in case of TV programs relative to start of the program (relative to source.from ms)
1698
2009
  */
1699
2010
  seekTo: (ms: number) => void;
1700
2011
  /**
1701
- * Source to be passed to player.
1702
- *
1703
- * Depending on autoplay settings it should either start playing
1704
- * immediately or just be loaded by player and stay paused.
2012
+ * Send this source to player. And either start playing it immediately if `source.autoplay` is true
2013
+ * or just load it and keep it paused and ready to play if `source.autoplay` is false.
2014
+ * If source is `null`, stop and close the player (this is the same as if `this.stop()` was called.)
1705
2015
  */
1706
- setSource: (source: InputSource | null) => void;
2016
+ setSource: (source: CommonSource | null) => void;
1707
2017
  /**
1708
- * volume in [0,1]
2018
+ * Set volume
2019
+ *
2020
+ * @param {number} volume value in [0,1]
1709
2021
  */
1710
2022
  setVolume?: (volume: number) => void;
2023
+ /**
2024
+ * Mute the player volume
2025
+ */
1711
2026
  mute?: () => void;
1712
2027
  /**
1713
- * restore volume to previous value
2028
+ * Unmute the player volume and restore it to the save level that was before it has been muted
1714
2029
  */
1715
2030
  unmute?: () => void;
2031
+ /**
2032
+ * Sets native IMA ad URL which is then loaded and played on RN side
2033
+ */
2034
+ setNativeImaAdUrl?: (url: string) => void;
2035
+ /**
2036
+ * Try to load and play native IMA ad using provided URL
2037
+ */
2038
+ playNativeImaAd?: (url: string) => Promise<void>;
2039
+ /**
2040
+ * Get URL of native IMA ad which is currently playing
2041
+ */
2042
+ getNativeImaAdUrl?: () => string | null;
2043
+ lastQuality?: number | null;
1716
2044
  }
1717
2045
 
1718
2046
  /**
@@ -1740,6 +2068,57 @@ export declare type PlayerProviderProps = {
1740
2068
  playerWrapperId?: string;
1741
2069
  };
1742
2070
 
2071
+ /**
2072
+ * TODO same name as core-js entity, not convenient
2073
+ * @public
2074
+ */
2075
+ export declare type PlayerSource = VodTivioSourceInterface | VodExternalSourceInterface | ChannelSourceInterface | VirtualChannelSourceInterface;
2076
+
2077
+ /**
2078
+ * Use this interface only for inheritance. Otherwise use {@link PlayerSource}
2079
+ * @public
2080
+ */
2081
+ export declare interface PlayerSourceInterface<T extends NonAdSourceType = NonAdSourceType> extends CommonSourceInterface<T> {
2082
+ adSegment: AdSegment | null;
2083
+ consumedAds: ConsumedAds;
2084
+ currentMarker: any | null;
2085
+ markers: any[];
2086
+ setMarkers(markers: any[]): void;
2087
+ isMarkersLoaded: boolean;
2088
+ setOutroMarker(marker: any): void;
2089
+ durationMs: number;
2090
+ setDurationMs(ms: number): void;
2091
+ reset(): void;
2092
+ cutout: Cutout | null;
2093
+ destroy(): void;
2094
+ seekTo(ms: number): void;
2095
+ adMonetization: any;
2096
+ setAdMonetization(monetization: any): void;
2097
+ setInitialTime(ms: number): void;
2098
+ setContinueFromPosition(ms: ContinuePosition): void;
2099
+ isLive: boolean;
2100
+ sourcePlayMode?: SourcePlayMode;
2101
+ language?: LangCode | null;
2102
+ availableLanguages?: LangCode[] | null;
2103
+ startOrResumeReactions(): void;
2104
+ pauseReactions(): void;
2105
+ correctStartPosition(): Promise<void | null>;
2106
+ setCanSeek(canSeek: boolean): void;
2107
+ originalOptions: Record<string, any>;
2108
+ }
2109
+
2110
+ /**
2111
+ * @public
2112
+ */
2113
+ export declare interface PlayerSourceParams<T extends NonAdSourceType = NonAdSourceType> extends CommonSourceParams<T> {
2114
+ originalOptions?: Record<string, any>;
2115
+ continuePositionMs?: ContinuePosition;
2116
+ poster?: string | null;
2117
+ language?: LangCode | null;
2118
+ availableLanguages?: LangCode[] | null;
2119
+ sourcePlayMode: SourcePlayMode;
2120
+ }
2121
+
1743
2122
  /**
1744
2123
  * @public
1745
2124
  */
@@ -1748,7 +2127,7 @@ export declare type PlayerState = 'idle' | 'playing' | 'paused';
1748
2127
  /**
1749
2128
  * @public
1750
2129
  */
1751
- export declare type PlayerWrapper = {
2130
+ export declare interface PlayerWrapper {
1752
2131
  /**
1753
2132
  * Report that playback of video has finished
1754
2133
  */
@@ -1764,7 +2143,7 @@ export declare type PlayerWrapper = {
1764
2143
  /**
1765
2144
  * Send source to Tivio
1766
2145
  */
1767
- onSourceChanged: (source: InputSource | null) => void;
2146
+ onSourceChanged: (source: PlayerSource | null) => void;
1768
2147
  /**
1769
2148
  * Report that video failed to load (never started playing)
1770
2149
  */
@@ -1784,13 +2163,8 @@ export declare type PlayerWrapper = {
1784
2163
  /**
1785
2164
  * Currently playing source
1786
2165
  */
1787
- source: InputSource | null;
1788
- events: {
1789
- isSupported: (even: string) => boolean;
1790
- addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
1791
- removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
1792
- removeAllListeners: () => void;
1793
- };
2166
+ source: PlayerSource | null;
2167
+ events: EmitterInterface;
1794
2168
  /**
1795
2169
  * Register a low level player that implements player methods, like play video, change volume, etc.
1796
2170
  */
@@ -1799,11 +2173,11 @@ export declare type PlayerWrapper = {
1799
2173
  * duration of current source in ms (both setter and getter)
1800
2174
  */
1801
2175
  durationMs: number | null;
1802
- isPlaybackStarted: boolean;
2176
+ isPlaybackStarted?: boolean;
1803
2177
  isPaused: boolean;
1804
2178
  isPlaying: boolean;
1805
2179
  isIdle: boolean;
1806
- error: Error | null;
2180
+ error: PlayerError | null;
1807
2181
  /**
1808
2182
  * Replay the video that finished playback
1809
2183
  */
@@ -1824,7 +2198,7 @@ export declare type PlayerWrapper = {
1824
2198
  changeVolumeBy: (volume: number) => void;
1825
2199
  setMuted: (muted: boolean) => void;
1826
2200
  toggleMuted: () => void;
1827
- };
2201
+ }
1828
2202
 
1829
2203
  /**
1830
2204
  * @public
@@ -1904,6 +2278,10 @@ export declare type Purchase = {
1904
2278
  * Timestamp of the purchase creation in milliseconds.
1905
2279
  */
1906
2280
  created: number | null;
2281
+ /**
2282
+ * Email of the user who created the purchase manually.
2283
+ */
2284
+ createdBy?: string;
1907
2285
  expirationDate: Date | null;
1908
2286
  id: string;
1909
2287
  isExpired: boolean;
@@ -1934,7 +2312,8 @@ export declare enum PurchaseDocumentGateway {
1934
2312
  'qerko' = "qerko",
1935
2313
  'oktagon' = "oktagon",
1936
2314
  'voucher' = "voucher",
1937
- 'comgate' = "comgate"
2315
+ 'comgate' = "comgate",
2316
+ 'tivio' = "tivio"
1938
2317
  }
1939
2318
 
1940
2319
  /**
@@ -2311,6 +2690,35 @@ export declare enum RowComponent {
2311
2690
  BANNER = "BANNER"
2312
2691
  }
2313
2692
 
2693
+ declare enum RowFilterCollection {
2694
+ VIDEOS = "videos",
2695
+ /**
2696
+ * This is not real collection path. Path always should be ${organizationId}/tags
2697
+ */
2698
+ TAGS = "tags",
2699
+ TV_CHANNELS = "tvChannels"
2700
+ }
2701
+
2702
+ /**
2703
+ * RowFilterField that is used in @tivio/firebase needs to be retyped here.
2704
+ * @public
2705
+ */
2706
+ export declare interface RowFilterField {
2707
+ collection: RowFilterCollection;
2708
+ limit?: number;
2709
+ orderBy: {
2710
+ fieldPath: RowOrderByFieldPath;
2711
+ directionStr: OrderByDirection;
2712
+ };
2713
+ where: RowFilterWhereField[];
2714
+ }
2715
+
2716
+ declare interface RowFilterWhereField {
2717
+ fieldPath: RowWhereFilterFieldPath;
2718
+ opStr: WhereFilterOp;
2719
+ value: any;
2720
+ }
2721
+
2314
2722
  /**
2315
2723
  * @public
2316
2724
  */
@@ -2356,6 +2764,15 @@ export declare type RowItemsSubscription = (rowId: string, cb: (error: Error | n
2356
2764
  hasNextPage: boolean;
2357
2765
  } | null, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => Disposer_2;
2358
2766
 
2767
+ /**
2768
+ * RowOrderByFieldPath that is used in @tivio/firebase needs to be retyped here.
2769
+ * @public
2770
+ */
2771
+ export declare enum RowOrderByFieldPath {
2772
+ CREATED = "created",
2773
+ DEFAULT_NAME = "defaultName"
2774
+ }
2775
+
2359
2776
  /**
2360
2777
  * @private
2361
2778
  */
@@ -2364,6 +2781,15 @@ export declare interface RowStandard extends RowBase {
2364
2781
  itemComponent: RowItemComponent;
2365
2782
  }
2366
2783
 
2784
+ export declare enum RowWhereFilterFieldPath {
2785
+ CREATED = "created",
2786
+ TAGS = "tags",
2787
+ TAG_TYPE_REF = "tagTypeRef",
2788
+ TYPE = "type",
2789
+ CONTENT_TYPE = "contentType",
2790
+ CHANNEL_KEY = "channelKey"
2791
+ }
2792
+
2367
2793
  /**
2368
2794
  * @public
2369
2795
  */
@@ -2383,10 +2809,12 @@ export declare type Scale = '@1' | '@2' | '@3';
2383
2809
  */
2384
2810
  declare interface Screen_2 {
2385
2811
  id: string;
2386
- name: string;
2387
- description?: string;
2812
+ name: string | null;
2813
+ description?: string | null;
2388
2814
  assets: Assets;
2389
2815
  rows: Row[];
2816
+ type?: ScreenType;
2817
+ filter?: RowFilterField | null;
2390
2818
  }
2391
2819
  export { Screen_2 as Screen }
2392
2820
 
@@ -2425,6 +2853,12 @@ export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'f
2425
2853
  */
2426
2854
  export declare type ScreenSubscription = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void) => Disposer_2;
2427
2855
 
2856
+ export declare enum ScreenType {
2857
+ DEFAULT = "default",
2858
+ GRID = "grid",
2859
+ EMBED = "embed"
2860
+ }
2861
+
2428
2862
  /**
2429
2863
  * Config of sdk-react. Contains all properties that can be passed via TivioProvider.
2430
2864
  * Consists of TivioConfig's properties + "sdk only" properties, that are used only in sdk, not in bundle.
@@ -2448,6 +2882,7 @@ export declare type SdkReactConfig = Omit<TivioConfig, 'language'> & {
2448
2882
 
2449
2883
  /**
2450
2884
  * @public
2885
+ * @deprecated sections are no longer used.
2451
2886
  */
2452
2887
  export declare interface Section {
2453
2888
  id: string;
@@ -2490,7 +2925,7 @@ export declare const showGdprConsentPreferences: () => Promise<void>;
2490
2925
  /**
2491
2926
  * @public
2492
2927
  */
2493
- export declare type Source = TvProgramSource | TivioVodSource | AdSource_2 | OtherSource | LiveTvChannelSource;
2928
+ export declare type Source = TvProgramSource | TivioVodSource | AdSource | OtherSource | LiveTvChannelSource;
2494
2929
 
2495
2930
  /**
2496
2931
  * @public
@@ -2511,6 +2946,37 @@ export declare type SourceBase = {
2511
2946
  uri: string;
2512
2947
  };
2513
2948
 
2949
+ /**
2950
+ * Used to instantiate types of corresponding interfaces (children of {@link PlayerSourceInterface}).
2951
+ * @public
2952
+ */
2953
+ export declare type SourceParams = VodTivioSourceParams | VodExternalSourceParams | ChannelSourceParams | VirtualChannelSourceParams;
2954
+
2955
+ /**
2956
+ * Based on this value player will change how the source is played. This, for example, affects whether source:
2957
+ * - will be seekable or not
2958
+ * - duration will be dynamically updated as time goes on
2959
+ * - live button will be shown in ui
2960
+ */
2961
+ export declare enum SourcePlayMode {
2962
+ ON_DEMAND = "ON_DEMAND",
2963
+ LIVE = "LIVE",
2964
+ /**
2965
+ * ON_DEMAND and LIVE at the same time.
2966
+ */
2967
+ HYBRID = "HYBRID"
2968
+ }
2969
+
2970
+ /**
2971
+ * @public
2972
+ */
2973
+ export declare enum SourceType {
2974
+ ADVERTISEMENT = "ad",
2975
+ CHANNEL = "channel",
2976
+ VOD_TIVIO = "vod_tivio",
2977
+ VOD_EXTERNAL = "vod_external"
2978
+ }
2979
+
2514
2980
  /**
2515
2981
  * @public
2516
2982
  */
@@ -2554,6 +3020,8 @@ export declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error |
2554
3020
  */
2555
3021
  export declare type SubscribeToItemsInRowOptions = Partial<{
2556
3022
  fetchTags: boolean;
3023
+ orderBy?: OrderBy<'defaultName' | DefaultOrderByField>[];
3024
+ where?: WhereFilter[];
2557
3025
  }> & PaginationOptions;
2558
3026
 
2559
3027
  /**
@@ -2574,11 +3042,8 @@ export declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Err
2574
3042
  /**
2575
3043
  * @public
2576
3044
  */
2577
- export declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOptions & {
2578
- orderBy?: (Omit<OrderBy, 'field'> & {
2579
- field: TaggedVideosOrderByField;
2580
- })[];
2581
- where?: WhereFilter[];
3045
+ export declare type SubscribeToTaggedVideosOptions = Omit<SubscribeToItemsInRowOptions, 'orderBy'> & {
3046
+ orderBy?: OrderBy<TaggedVideosOrderByField>[];
2582
3047
  };
2583
3048
 
2584
3049
  declare type SubscriptionInfo = {
@@ -2718,7 +3183,7 @@ export declare type TivioComponents = {
2718
3183
  onEnded?: () => any;
2719
3184
  }>;
2720
3185
  TvApp: React_2.ComponentType<TvAppProps>;
2721
- FeatureSupportCheck: React_2.ComponentType<{}>;
3186
+ FeatureSupportCheck: React_2.ComponentType;
2722
3187
  CustomerScreen: React_2.ComponentType<{
2723
3188
  screenId: string;
2724
3189
  }>;
@@ -2726,6 +3191,7 @@ export declare type TivioComponents = {
2726
3191
  tagId: string;
2727
3192
  onError?: (error: Error) => void;
2728
3193
  }>;
3194
+ WebGridScreen: React_2.ComponentType<WebGridScreenProps>;
2729
3195
  WebSearchScreen: React_2.ComponentType<{
2730
3196
  searchQuery?: string;
2731
3197
  }>;
@@ -2733,6 +3199,8 @@ export declare type TivioComponents = {
2733
3199
  WebTile: React_2.ComponentType<{
2734
3200
  item?: ItemsInRow;
2735
3201
  } & TilePropsPartial>;
3202
+ ChannelContext: React_2.Context<TvChannel | undefined>;
3203
+ ContentSortPicker: React_2.ComponentType<ContentSortPickerProps>;
2736
3204
  };
2737
3205
 
2738
3206
  /**
@@ -2819,9 +3287,9 @@ export declare type TivioGetters = {
2819
3287
  */
2820
3288
  export declare type TivioHooks = {
2821
3289
  useAd: () => [(AdExternal | null)];
2822
- useAdSegment: () => AdSegment | null;
3290
+ useAdSegment: () => AdSegment_2 | null;
2823
3291
  useCancelSubscription: UseCancelSubscription;
2824
- useItemsInRow: (rowId: string, options: PaginationOptions) => {
3292
+ useItemsInRow: (rowId?: string, options?: PaginationOptions) => {
2825
3293
  pagination: PaginationInterface<ItemsInRow> | null;
2826
3294
  error: Error | null;
2827
3295
  };
@@ -2837,20 +3305,19 @@ export declare type TivioHooks = {
2837
3305
  pagination: PaginationInterface<Row> | null;
2838
3306
  error: Error | null;
2839
3307
  };
2840
- useTaggedVideos: (tagIds: string[], options: SubscribeToItemsInRowOptions) => {
3308
+ useTag: (tagId: string) => {
3309
+ tag: Tag | null;
3310
+ };
3311
+ useTaggedVideos: (tagIds: string[], options: SubscribeToTaggedVideosOptions) => {
2841
3312
  pagination: PaginationInterface<Video> | null;
2842
3313
  error: Error | null;
2843
3314
  };
2844
3315
  useSearch: UseSearch;
2845
- useVideo: (videoId: string) => {
3316
+ useVideo: (videoId?: string) => {
2846
3317
  data: Video | null;
2847
3318
  error: string | null;
2848
3319
  };
2849
3320
  useVoucher: (voucherId: string) => any;
2850
- useWatchWithoutAdsOffer: () => {
2851
- canPurchaseWatchWithoutAds: boolean;
2852
- showPurchaseDialog: () => void;
2853
- };
2854
3321
  useApplyInviteCode: () => {
2855
3322
  applyInviteCodeResult?: boolean;
2856
3323
  loading: boolean;
@@ -2859,6 +3326,7 @@ export declare type TivioHooks = {
2859
3326
  inviteCodeReset: () => void;
2860
3327
  };
2861
3328
  useChannelSource: UseChannelSource;
3329
+ useTvChannel: UseTvChannel;
2862
3330
  };
2863
3331
 
2864
3332
  /**
@@ -2886,6 +3354,7 @@ export declare type TivioInternalComponents = {
2886
3354
  UserProfilesOverlay: React_2.ComponentType<{
2887
3355
  onClose: (selectedProfileId: string) => void;
2888
3356
  }>;
3357
+ Banner: React_2.ComponentType<BannerPropsPartial>;
2889
3358
  };
2890
3359
 
2891
3360
  /**
@@ -2900,6 +3369,19 @@ export declare type TivioInternalHooks = {
2900
3369
  usePurchasesWithVideos: () => {
2901
3370
  purchases: Purchase[];
2902
3371
  };
3372
+ useEpisodes: (seriesTagId: string | null | undefined, seasonNumber: number | null, options: UseEpisodesQueryOptions) => UseEpisodesResult;
3373
+ useVideosInScreen: (filters: RowFilterField) => {
3374
+ pagination: PaginationInterface<Video> | null;
3375
+ error: Error | null;
3376
+ };
3377
+ useSimilars: () => {
3378
+ getSimilars: ({ videoId, similarsQuery }: {
3379
+ videoId: string;
3380
+ similarsQuery?: RecommendationsQuery | undefined;
3381
+ }) => Promise<void>;
3382
+ pagination: PaginationInterface<Video>;
3383
+ error: Error | null;
3384
+ };
2903
3385
  useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
2904
3386
  subscriptions: PurchasableMonetization[];
2905
3387
  };
@@ -2925,6 +3407,8 @@ export declare type TivioInternalHooks = {
2925
3407
  isSignedIn: boolean;
2926
3408
  };
2927
3409
  useOrganization: () => Organization | null;
3410
+ useRow: UseRow;
3411
+ useScreen: (screenId: string | null) => Screen_2 | null;
2928
3412
  };
2929
3413
 
2930
3414
  /**
@@ -3220,6 +3704,7 @@ export declare interface TvChannel extends RowItem {
3220
3704
  country?: string;
3221
3705
  filters: string[];
3222
3706
  logo?: string;
3707
+ logoPendingOverlayWidth?: string;
3223
3708
  hls: string;
3224
3709
  dash: string;
3225
3710
  /**
@@ -3237,15 +3722,34 @@ export declare interface TvChannel extends RowItem {
3237
3722
  cover: string;
3238
3723
  isPlayable: boolean;
3239
3724
  url: string;
3725
+ type?: TvChannelType;
3240
3726
  }
3241
3727
 
3728
+ export declare enum TvChannelType {
3729
+ /**
3730
+ * Classic live tv channel
3731
+ */
3732
+ CLASSIC = "CLASSIC",
3733
+ /**
3734
+ * "Virtual" tv channel constructed from separate videos
3735
+ */
3736
+ VIRTUAL = "VIRTUAL"
3737
+ }
3738
+
3739
+ /**
3740
+ * @public
3741
+ */
3742
+ export declare type TvMode = 'startover' | 'timeshift';
3743
+
3242
3744
  export declare interface TvProgram {
3745
+ id: string;
3243
3746
  from: Date | null;
3244
3747
  to: Date | null;
3245
3748
  name: string;
3246
3749
  description: string;
3247
3750
  url: string;
3248
3751
  image: string;
3752
+ landscape?: string | null;
3249
3753
  video: Video | null;
3250
3754
  }
3251
3755
 
@@ -3278,6 +3782,13 @@ export declare type TvProgramSource = SourceBase & StartAndContinuePosition & {
3278
3782
  streamStart: Date;
3279
3783
  };
3280
3784
 
3785
+ export declare enum TvStreamType {
3786
+ STARTOVER = "startover",
3787
+ TIMESHIFT = "timeshift",
3788
+ LIVE = "live",
3789
+ ALL = "all"
3790
+ }
3791
+
3281
3792
  /**
3282
3793
  * @public
3283
3794
  */
@@ -3321,11 +3832,6 @@ export declare function useApplyInviteCode(): {
3321
3832
  inviteCodeReset: () => void;
3322
3833
  };
3323
3834
 
3324
- /**
3325
- * @public
3326
- */
3327
- export declare const useBetOffer: () => BetOffer | null;
3328
-
3329
3835
  /**
3330
3836
  * @public
3331
3837
  */
@@ -3351,20 +3857,25 @@ export declare interface UseCancelSubscriptionsResult {
3351
3857
 
3352
3858
  /**
3353
3859
  * @public
3860
+ * @deprecated No longer used. Pass channel path to 'WebPlayer.source' prop instead. Path can be obtained with useTvChannel hook.
3354
3861
  */
3355
3862
  export declare type UseChannelSource = (tvChannelId: string) => {
3356
- source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
3863
+ source: string;
3357
3864
  error: Error | null;
3358
3865
  };
3359
3866
 
3360
3867
  /**
3361
3868
  * Use channel source
3362
3869
  * @param tvChannelId
3870
+ * @deprecated No longer used. Pass channel path to 'WebPlayer.source' prop instead. Path can be obtained with useTvChannel hook.
3363
3871
  * @public
3364
3872
  */
3365
3873
  export declare const useChannelSource: (tvChannelId: string) => {
3366
- source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
3874
+ source: string;
3367
3875
  error: Error | null;
3876
+ } | {
3877
+ error: null;
3878
+ source: null;
3368
3879
  };
3369
3880
 
3370
3881
  /**
@@ -3372,6 +3883,37 @@ export declare const useChannelSource: (tvChannelId: string) => {
3372
3883
  */
3373
3884
  export declare const useCurrentMarker: () => Marker | null;
3374
3885
 
3886
+ /**
3887
+ * @public
3888
+ */
3889
+ export declare type UseEpisodesQueryOptions = {
3890
+ limit: number;
3891
+ fetchTags?: boolean;
3892
+ orderBy?: SubscribeToTaggedVideosOptions['orderBy'];
3893
+ };
3894
+
3895
+ /**
3896
+ * @public
3897
+ */
3898
+ export declare type UseEpisodesResult = {
3899
+ /**
3900
+ * Episodes of concrete season of series defined by seriesTagId.
3901
+ */
3902
+ episodes: Video[];
3903
+ /**
3904
+ * Function to fetch more episodes
3905
+ */
3906
+ fetchMoreEpisodes?: () => void;
3907
+ /**
3908
+ * True when fetching data
3909
+ */
3910
+ episodesLoading: boolean;
3911
+ /**
3912
+ * True when there are more episodes to fetch
3913
+ */
3914
+ hasMoreEpisodes: boolean;
3915
+ };
3916
+
3375
3917
  /**
3376
3918
  * @public
3377
3919
  */
@@ -3397,7 +3939,7 @@ export declare const useIsMonetizationPurchased: () => {
3397
3939
  * @param options - subscription options
3398
3940
  * @public
3399
3941
  */
3400
- export declare const useItemsInRow: (rowId: string, options?: SubscribeToItemsInRowOptions) => {
3942
+ export declare const useItemsInRow: (rowId?: string, options?: SubscribeToItemsInRowOptions) => {
3401
3943
  pagination: PaginationInterface<ItemsInRow> | null;
3402
3944
  error: Error | null;
3403
3945
  };
@@ -3497,6 +4039,14 @@ export declare enum UserGroup {
3497
4039
  PREMIUM = "premium"
3498
4040
  }
3499
4041
 
4042
+ /**
4043
+ * @public
4044
+ */
4045
+ export declare type UseRow = (rowId: string | null) => {
4046
+ row: Row | null;
4047
+ error: Error | null;
4048
+ };
4049
+
3500
4050
  /**
3501
4051
  * @public
3502
4052
  */
@@ -3571,7 +4121,7 @@ export declare const useSeekState: () => boolean | null;
3571
4121
  * @param options - subscription options
3572
4122
  * @public
3573
4123
  */
3574
- export declare const useTaggedVideos: (tagIds: string[], options?: SubscribeToItemsInRowOptions) => {
4124
+ export declare const useTaggedVideos: (tagIds: string[], options?: SubscribeToTaggedVideosOptions) => {
3575
4125
  pagination: PaginationInterface<Video> | null;
3576
4126
  error: Error | null;
3577
4127
  };
@@ -3640,15 +4190,15 @@ export declare const useVoucher: (voucherId: string) => {
3640
4190
  /**
3641
4191
  * @public
3642
4192
  */
3643
- export declare const useWatchWithoutAdsOffer: () => {
3644
- canPurchaseWatchWithoutAds: boolean;
3645
- showPurchaseDialog: () => void;
3646
- };
4193
+ export declare const VAST_PROVIDERS: VastProvidersItem[];
3647
4194
 
3648
4195
  /**
3649
4196
  * @public
4197
+ * null - classic VAST
4198
+ * VPAID - VAST with VPAID extension
4199
+ * others...
3650
4200
  */
3651
- export declare const VAST_PROVIDERS: VastProvidersItem[];
4201
+ export declare type VastApiFramework = string | 'VPAID' | null;
3652
4202
 
3653
4203
  /**
3654
4204
  * @public
@@ -3713,6 +4263,12 @@ export declare interface Video extends RowItem {
3713
4263
  }): Promise<GetSourceUrlResponse & {
3714
4264
  language?: LangCode;
3715
4265
  }>;
4266
+ getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex: number): {
4267
+ url: string;
4268
+ x: number;
4269
+ y: number;
4270
+ timeMs: number;
4271
+ } | null;
3716
4272
  purchasableMonetization: any | null;
3717
4273
  transaction: PurchasableMonetization | undefined;
3718
4274
  subscriptions: PurchasableMonetization[];
@@ -3855,42 +4411,76 @@ export declare interface ViewCountItem {
3855
4411
  /**
3856
4412
  * @public
3857
4413
  */
3858
- export declare interface VirtualChannelSourcePojo extends Omit<ChannelSourcePojo, 'type'> {
3859
- type: 'VirtualChannelSource';
3860
- epg: TvProgram[];
4414
+ export declare interface VirtualChannelSourceInterface extends ChannelSourceInterface {
4415
+ tvChannelType: TvChannelType.VIRTUAL;
4416
+ program?: TvProgram | null;
4417
+ video?: Video | null;
4418
+ isPlayingBySchedule: boolean;
4419
+ clone(params?: Partial<VirtualChannelSourceParams>): VirtualChannelSourceInterface;
4420
+ initializeNext(): Promise<void>;
3861
4421
  }
3862
4422
 
3863
4423
  /**
3864
4424
  * @public
3865
4425
  */
3866
- export declare type VodExternalSource = {
3867
- new (url: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
3868
- type: 'vod_external';
3869
- description: string;
3870
- name: string;
3871
- url: string;
3872
- };
4426
+ export declare interface VirtualChannelSourceParams extends ChannelSourceParams {
4427
+ tvChannelType: TvChannelType.VIRTUAL;
4428
+ currentProgram?: TvProgram | null;
4429
+ }
3873
4430
 
3874
4431
  /**
3875
4432
  * @public
3876
4433
  */
3877
- export declare type VodTivioSource = {
3878
- new (url: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
3879
- type: 'vod_tivio';
3880
- description: string;
3881
- name: string;
3882
- url: string;
3883
- };
4434
+ export declare interface VodExternalSourceInterface extends PlayerSourceInterface<SourceType.VOD_EXTERNAL> {
4435
+ monetizationId?: string;
4436
+ originalOptions: Record<string, any>;
4437
+ poster: string | null;
4438
+ }
3884
4439
 
3885
- declare interface VodTivioSourcePojo {
3886
- type: 'VodTivioSource';
3887
- description: string;
3888
- path: string;
3889
- name: string;
3890
- url: string;
3891
- poster?: string;
4440
+ /**
4441
+ * @public
4442
+ */
4443
+ export declare interface VodExternalSourceParams extends PlayerSourceParams<SourceType.VOD_EXTERNAL> {
4444
+ monetizationId?: string;
4445
+ }
4446
+
4447
+ /**
4448
+ * @public
4449
+ */
4450
+ export declare interface VodTivioSourceInterface extends PlayerSourceInterface<SourceType.VOD_TIVIO> {
4451
+ /**
4452
+ * e.g. 259ud0fgdf4
4453
+ */
3892
4454
  adMonetizationId?: string;
4455
+ /**
4456
+ * e.g. videos/1532543
4457
+ */
4458
+ videoPath: string;
4459
+ poster: string | null;
4460
+ /**
4461
+ * Position to continue playing from in milliseconds
4462
+ */
4463
+ continuePositionMs?: ContinuePosition;
4464
+ /**
4465
+ * Drm configuration
4466
+ */
4467
+ drm?: Drm;
4468
+ watermark: Watermark | null;
4469
+ canWatchOnDevice: boolean;
4470
+ isAvailable: boolean;
3893
4471
  availability: VideoAvailability | null;
4472
+ video: Video;
4473
+ clone: (params?: Partial<VodTivioSourceParams>) => VodTivioSourceInterface;
4474
+ }
4475
+
4476
+ /**
4477
+ * @public
4478
+ */
4479
+ export declare interface VodTivioSourceParams extends PlayerSourceParams<SourceType.VOD_TIVIO> {
4480
+ videoPath: string;
4481
+ adMonetizationId?: string;
4482
+ language?: LangCode;
4483
+ drm?: Drm;
3894
4484
  }
3895
4485
 
3896
4486
  /**
@@ -3913,12 +4503,31 @@ export declare interface WarningConfirmationOverlayPayload extends ConfirmationO
3913
4503
  closeButtonText?: string;
3914
4504
  }
3915
4505
 
4506
+ /**
4507
+ * @public
4508
+ */
4509
+ export declare interface Watermark {
4510
+ caption: string;
4511
+ size: 'large' | 'medium';
4512
+ }
4513
+
4514
+ /**
4515
+ * @public
4516
+ */
4517
+ export declare type WebGridScreenProps = {
4518
+ screen?: Screen_2;
4519
+ seriesId?: string;
4520
+ season?: number;
4521
+ rowId?: string;
4522
+ videoId?: string;
4523
+ };
4524
+
3916
4525
  /**
3917
4526
  * @public
3918
4527
  */
3919
4528
  export declare interface WebPlayerProps {
3920
4529
  id: string;
3921
- source?: VodTivioSourcePojo | ChannelSourcePojo | VirtualChannelSourcePojo | VideoPath | null;
4530
+ source?: SourceParams | VideoPath | ChannelPath | null;
3922
4531
  onEnded?: () => any;
3923
4532
  /**
3924
4533
  * If this function is specified, then "Back" button is shown in top right corner.
@@ -3965,6 +4574,41 @@ export declare interface WebPlayerProps {
3965
4574
  * @deprecated this callback is never called. Will be removed in @tivio/sdk-react version 4
3966
4575
  */
3967
4576
  onPlayerControllerCreated?: (playerController: any) => void;
4577
+ /**
4578
+ * If true, saving of watch position won't be performed.
4579
+ */
4580
+ doNotSaveWatchPosition?: boolean;
4581
+ /**
4582
+ * If true, then is muted by default, but still be possible to unmute
4583
+ */
4584
+ isMutedByDefault?: boolean;
4585
+ markerColor?: string;
4586
+ showTvStreamType?: boolean;
4587
+ showCookiesSettings?: boolean;
4588
+ /**
4589
+ * If false, then OSD is never shown.
4590
+ * If true then OSD is shown based on condition resolved in HidableOsdContainer, e.g. on pause, on mouse move etc.
4591
+ */
4592
+ showOsd?: boolean;
4593
+ /**
4594
+ * If false, then buffering spinner is never shown.
4595
+ * If true then buffering spinner is shown while buffering.
4596
+ */
4597
+ showBufferingSpinner?: boolean;
4598
+ /**
4599
+ * If true, then check adblock and show warning if it's turned on.
4600
+ * If false, adblock warning is never shown.
4601
+ */
4602
+ checkAdBlock?: boolean;
4603
+ /**
4604
+ * Player video can be scaled. Used in WebVideoDetailBanner to "hide" black stripes on video.
4605
+ * Should be positive number.
4606
+ */
4607
+ scale?: number;
4608
+ /**
4609
+ * If true, it does not play the next video when the current video reaches the end.
4610
+ */
4611
+ disablePlayNext?: boolean;
3968
4612
  }
3969
4613
 
3970
4614
  /**
@@ -4005,6 +4649,7 @@ declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-cont
4005
4649
 
4006
4650
  /**
4007
4651
  * @public
4652
+ * @deprecated this widget structure is no longer used.
4008
4653
  */
4009
4654
  export declare type Widget = {
4010
4655
  id: string;
@@ -4019,6 +4664,6 @@ export declare type Widget = {
4019
4664
  /**
4020
4665
  * @public
4021
4666
  */
4022
- export declare function withPlayerContext(id: string): <P extends JSX.IntrinsicAttributes>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
4667
+ export declare function withPlayerContext(id: string): <P extends JSX.IntrinsicAttributes>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => React_2.JSX.Element;
4023
4668
 
4024
4669
  export { }