@tivio/sdk-react 5.0.3-alpha-3 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -0
- package/README.md.bak +7 -0
- package/dist/index.d.ts +534 -55
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +535 -56
- package/package.json +2 -2
package/dist/sdk-react.d.ts
CHANGED
@@ -90,13 +90,13 @@ declare type AdSegment = {
|
|
90
90
|
* @public
|
91
91
|
*/
|
92
92
|
export declare type AdSource = {
|
93
|
-
new (
|
93
|
+
new (url: string, name: string, description: string, skipDelayMs: number | null, adDurationMs: number, trackingContext?: any, // internal Tivio types
|
94
94
|
adMarker?: any, // internal Tivio types
|
95
95
|
packInfo?: any, // internal Tivio types
|
96
96
|
provider?: any): AdSource;
|
97
97
|
description: string;
|
98
98
|
name: string;
|
99
|
-
|
99
|
+
url: string;
|
100
100
|
durationMs: number;
|
101
101
|
skipDelayMs: number | null;
|
102
102
|
type: 'ad';
|
@@ -140,6 +140,14 @@ export declare interface Advertisement extends RowItem {
|
|
140
140
|
type?: string | null;
|
141
141
|
}
|
142
142
|
|
143
|
+
export declare type AdvertisementAnalyticParams = {
|
144
|
+
adFramework?: string;
|
145
|
+
adOrder: number;
|
146
|
+
adProvider?: string;
|
147
|
+
adTitle?: string;
|
148
|
+
videoId: string;
|
149
|
+
};
|
150
|
+
|
143
151
|
/**
|
144
152
|
* @public
|
145
153
|
*/
|
@@ -198,14 +206,22 @@ export declare enum AnalyticsConversionTargetBase {
|
|
198
206
|
}
|
199
207
|
|
200
208
|
export declare interface AnalyticsInterface {
|
201
|
-
reportAdvertisementPlay: () => void;
|
209
|
+
reportAdvertisementPlay: (params: AdvertisementAnalyticParams) => void;
|
202
210
|
reportAdvertisementProgress: () => void;
|
203
211
|
reportElementClick: (elementId: string) => void;
|
204
212
|
reportLocationChange: (path: string, pathParam?: string) => void;
|
205
213
|
createMonetizationPurchase: () => void;
|
206
214
|
completeMonetizationPurchase: (status: AnalyticsConversionStatus, monetizationId?: string) => void;
|
207
215
|
reportVideoPlay: (status: AnalyticsConversionStatus, videoId: string) => void;
|
208
|
-
reportVideoProgress: (
|
216
|
+
reportVideoProgress: (data: {
|
217
|
+
checkpoint: number;
|
218
|
+
organizationId?: string;
|
219
|
+
seriesId?: string;
|
220
|
+
videoDuration: string;
|
221
|
+
videoId: string;
|
222
|
+
videoMonetizationId?: string;
|
223
|
+
videoType?: VideoType;
|
224
|
+
}) => void;
|
209
225
|
}
|
210
226
|
|
211
227
|
/**
|
@@ -300,6 +316,22 @@ export declare type BetOffer = {
|
|
300
316
|
time: Date;
|
301
317
|
};
|
302
318
|
|
319
|
+
/**
|
320
|
+
* @public
|
321
|
+
*/
|
322
|
+
export declare interface BufferChunk {
|
323
|
+
startMs: number;
|
324
|
+
endMs: number;
|
325
|
+
}
|
326
|
+
|
327
|
+
/**
|
328
|
+
* @public
|
329
|
+
*/
|
330
|
+
export declare interface BufferPercentChunk extends BufferChunk {
|
331
|
+
startPercent: number;
|
332
|
+
endPercent: number;
|
333
|
+
}
|
334
|
+
|
303
335
|
/**
|
304
336
|
* rejects when bundle is not available
|
305
337
|
* @public
|
@@ -330,11 +362,14 @@ export declare interface Channel {
|
|
330
362
|
recentVideos: Video[];
|
331
363
|
}
|
332
364
|
|
365
|
+
/**
|
366
|
+
* @public
|
367
|
+
*/
|
333
368
|
export declare type ChannelSource = {
|
334
|
-
new (
|
369
|
+
new (url: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
|
335
370
|
description: string;
|
336
371
|
name: string;
|
337
|
-
|
372
|
+
url: string;
|
338
373
|
from: Date;
|
339
374
|
channelName: string;
|
340
375
|
to: Date;
|
@@ -349,7 +384,7 @@ export declare type ChannelSource = {
|
|
349
384
|
*/
|
350
385
|
export declare interface ChannelSourcePojo {
|
351
386
|
type: 'ChannelSource';
|
352
|
-
|
387
|
+
url: string;
|
353
388
|
originalOptions: any;
|
354
389
|
channelName: string;
|
355
390
|
programName: string;
|
@@ -424,6 +459,7 @@ export declare interface ConfirmationOverlayPayloadBase {
|
|
424
459
|
|
425
460
|
/**
|
426
461
|
* Entity aggregate conversion statistics per day
|
462
|
+
* TODO in future change structure, new used like array item
|
427
463
|
*/
|
428
464
|
export declare interface ConversionAnalytic {
|
429
465
|
/**
|
@@ -734,6 +770,41 @@ export declare type DocumentOptions = Partial<{
|
|
734
770
|
subscribeOnChanges: boolean;
|
735
771
|
}>;
|
736
772
|
|
773
|
+
export declare interface Drm {
|
774
|
+
encryption: VideoSourceEncryption;
|
775
|
+
/**
|
776
|
+
* Url to retrieve fairplay from.
|
777
|
+
*/
|
778
|
+
certificateUrl?: string;
|
779
|
+
/**
|
780
|
+
* Url to send license to.
|
781
|
+
*/
|
782
|
+
licenseUrl: string;
|
783
|
+
/**
|
784
|
+
* Headers with corresponding values to send to license server.
|
785
|
+
*/
|
786
|
+
licenseRequestHeaders: {
|
787
|
+
[key: string]: string;
|
788
|
+
};
|
789
|
+
}
|
790
|
+
|
791
|
+
export declare enum DrmProvider {
|
792
|
+
/**
|
793
|
+
* Original oktagon stream provider.
|
794
|
+
*
|
795
|
+
* https://streamonline.pl
|
796
|
+
*/
|
797
|
+
STREAMONLINE = "streamonline",
|
798
|
+
/**
|
799
|
+
* New stream provider for tivio. Also known as insys video technologies.
|
800
|
+
*
|
801
|
+
* https://insysvideotechnologies.com
|
802
|
+
* https://www.drm.cloud
|
803
|
+
* https://videokit.cloud
|
804
|
+
*/
|
805
|
+
INSYS = "insys"
|
806
|
+
}
|
807
|
+
|
737
808
|
/**
|
738
809
|
* @public
|
739
810
|
*/
|
@@ -750,6 +821,76 @@ export declare enum DurationUnits {
|
|
750
821
|
MONTH = "month"
|
751
822
|
}
|
752
823
|
|
824
|
+
/**
|
825
|
+
* Represents a SendGrid transactional template.
|
826
|
+
*/
|
827
|
+
export declare interface EmailTemplate {
|
828
|
+
/**
|
829
|
+
* The ID of the transactional template.
|
830
|
+
*/
|
831
|
+
id: string;
|
832
|
+
/**
|
833
|
+
* The name of the transactional template.
|
834
|
+
* @maxLength 100
|
835
|
+
*/
|
836
|
+
name: string;
|
837
|
+
/**
|
838
|
+
* Defines the generation of the template.
|
839
|
+
* @format 'dynamic' | 'legacy'
|
840
|
+
*/
|
841
|
+
generation: 'dynamic' | 'legacy';
|
842
|
+
/**
|
843
|
+
* The date and time the template was last updated.
|
844
|
+
*/
|
845
|
+
updated_at: string;
|
846
|
+
/**
|
847
|
+
* An array of versions associated with the template.
|
848
|
+
*/
|
849
|
+
versions: EmailTemplateVersion[];
|
850
|
+
}
|
851
|
+
|
852
|
+
export declare interface EmailTemplateVersion {
|
853
|
+
/**
|
854
|
+
* ID of the transactional template version.
|
855
|
+
*/
|
856
|
+
id: string;
|
857
|
+
/**
|
858
|
+
* ID of the transactional template.
|
859
|
+
*/
|
860
|
+
template_id: string;
|
861
|
+
/**
|
862
|
+
* Set the version as the active version associated with the template.
|
863
|
+
* Only one version of a template can be active.
|
864
|
+
* The first version created for a template will automatically be set to Active.
|
865
|
+
*/
|
866
|
+
active: boolean;
|
867
|
+
/**
|
868
|
+
* Name of the transactional template version.
|
869
|
+
*/
|
870
|
+
name: string;
|
871
|
+
/**
|
872
|
+
* Subject of the new transactional template version.
|
873
|
+
* @maxLength 255
|
874
|
+
*/
|
875
|
+
subject: string;
|
876
|
+
/**
|
877
|
+
* The date and time that this transactional template version was updated.
|
878
|
+
*/
|
879
|
+
updated_at: string;
|
880
|
+
/**
|
881
|
+
* If true, plain_content is always generated from html_content. If false, plain_content is not altered.
|
882
|
+
*/
|
883
|
+
generate_plain_content: boolean;
|
884
|
+
/**
|
885
|
+
* The editor used in the UI.
|
886
|
+
*/
|
887
|
+
editor: string;
|
888
|
+
/**
|
889
|
+
* A Thumbnail preview of the template's html content.
|
890
|
+
*/
|
891
|
+
thumbnail_url: string;
|
892
|
+
}
|
893
|
+
|
753
894
|
/**
|
754
895
|
* @public
|
755
896
|
*/
|
@@ -817,6 +958,31 @@ export declare interface GenericOnCallError extends Error {
|
|
817
958
|
details?: Record<string, string>;
|
818
959
|
}
|
819
960
|
|
961
|
+
export declare interface GetBaseAnalyticsRequest {
|
962
|
+
/**
|
963
|
+
* Id of organization to return analytics data.
|
964
|
+
*/
|
965
|
+
organizationId: string;
|
966
|
+
/**
|
967
|
+
* Date in string with format e.g. '2023-04-19'.
|
968
|
+
*/
|
969
|
+
startDate: string;
|
970
|
+
/**
|
971
|
+
* Date in string with format e.g. '2023-04-26'.
|
972
|
+
*/
|
973
|
+
endDate: string;
|
974
|
+
}
|
975
|
+
|
976
|
+
export declare interface GetConversionAnalyticsRequest extends GetBaseAnalyticsRequest {
|
977
|
+
}
|
978
|
+
|
979
|
+
export declare interface GetMonetizationsAnalyticsRequest extends GetBaseAnalyticsRequest {
|
980
|
+
}
|
981
|
+
|
982
|
+
export declare interface GetMonetizationsAnalyticsResponse {
|
983
|
+
monetizationsAnalytics: MonetizationSummaryItem[];
|
984
|
+
}
|
985
|
+
|
820
986
|
/**
|
821
987
|
* Share singleton instance
|
822
988
|
* @public
|
@@ -894,6 +1060,18 @@ export declare interface GetSourceUrlResponse {
|
|
894
1060
|
* Which sources did client (or cloud function) has already tried out.
|
895
1061
|
*/
|
896
1062
|
sourceHistory: string[];
|
1063
|
+
/**
|
1064
|
+
* DRM configuration to {@link url} if source is encrypted.
|
1065
|
+
*/
|
1066
|
+
drm?: Drm;
|
1067
|
+
}
|
1068
|
+
|
1069
|
+
export declare interface GetViewAnalyticsResponse {
|
1070
|
+
viewCountAnalytics: ViewCountItem[];
|
1071
|
+
topWatched: TopWatchItem[];
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
export declare interface GetViewsAnalyticsRequest extends GetBaseAnalyticsRequest {
|
897
1075
|
}
|
898
1076
|
|
899
1077
|
/**
|
@@ -1274,11 +1452,51 @@ export declare type MonetizationsSelectOverlayState = {
|
|
1274
1452
|
closeMonetizationsSelectOverlay: () => void;
|
1275
1453
|
};
|
1276
1454
|
|
1455
|
+
export declare interface MonetizationSummaryItem {
|
1456
|
+
/**
|
1457
|
+
* Unix timestamp at which the data is aggregated
|
1458
|
+
*/
|
1459
|
+
date: number;
|
1460
|
+
/**
|
1461
|
+
* Monetization under the videos played, if not filled it is free
|
1462
|
+
*/
|
1463
|
+
monetizationId: string;
|
1464
|
+
/**
|
1465
|
+
* Sum of successful (new and regular) payment price in current period
|
1466
|
+
*/
|
1467
|
+
totalPrice: number;
|
1468
|
+
/**
|
1469
|
+
* Count of new payments in the current period
|
1470
|
+
*/
|
1471
|
+
newPaymentCount: number;
|
1472
|
+
/**
|
1473
|
+
* Count of payments cancelled in in the current period
|
1474
|
+
*/
|
1475
|
+
cancelledPaymentCount: number;
|
1476
|
+
/**
|
1477
|
+
* Count of payments made regularly like in the previous period
|
1478
|
+
*/
|
1479
|
+
regularPaymentCount: number;
|
1480
|
+
/**
|
1481
|
+
* Price which was charged independent on price list (full and discounted)
|
1482
|
+
*/
|
1483
|
+
paymentPrice: number;
|
1484
|
+
/**
|
1485
|
+
* Monetization type frequency
|
1486
|
+
*/
|
1487
|
+
monetizationFrequency: MONETIZATION_FREQUENCY;
|
1488
|
+
/**
|
1489
|
+
* For PPV payments there will be videoId for which payment charged
|
1490
|
+
* If not filled it is not PPV
|
1491
|
+
*/
|
1492
|
+
videoId?: string;
|
1493
|
+
}
|
1494
|
+
|
1277
1495
|
/**
|
1278
1496
|
* @public
|
1279
1497
|
* @TODO change to enum
|
1280
1498
|
*/
|
1281
|
-
export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
|
1499
|
+
export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription' | 'display';
|
1282
1500
|
|
1283
1501
|
/**
|
1284
1502
|
* TODO: Duplicate, because we can't import types from core-js.
|
@@ -1290,6 +1508,22 @@ export declare type NewVoucher = {
|
|
1290
1508
|
expirationDate: Date | number;
|
1291
1509
|
};
|
1292
1510
|
|
1511
|
+
declare interface Notification_2 {
|
1512
|
+
id: string;
|
1513
|
+
name: string;
|
1514
|
+
targeting: UserGroup;
|
1515
|
+
templateId: string;
|
1516
|
+
thumbnailUrl?: string;
|
1517
|
+
triggerType: TriggerType;
|
1518
|
+
status?: NotificationStatus;
|
1519
|
+
}
|
1520
|
+
export { Notification_2 as Notification }
|
1521
|
+
|
1522
|
+
export declare enum NotificationStatus {
|
1523
|
+
PLANNED = "planned",
|
1524
|
+
SENT = "sent"
|
1525
|
+
}
|
1526
|
+
|
1293
1527
|
/**
|
1294
1528
|
* @public
|
1295
1529
|
*/
|
@@ -1384,7 +1618,11 @@ export declare enum PLATFORM {
|
|
1384
1618
|
*/
|
1385
1619
|
MOBILE = "MOBILE",
|
1386
1620
|
WEB = "WEB",
|
1387
|
-
TV = "TV"
|
1621
|
+
TV = "TV",
|
1622
|
+
/**
|
1623
|
+
* @deprecated Used only in big query. In the future we'll migrate to undefined value and delete this.
|
1624
|
+
*/
|
1625
|
+
UNKNOWN = "unknown"
|
1388
1626
|
}
|
1389
1627
|
|
1390
1628
|
/**
|
@@ -1415,9 +1653,9 @@ export declare type Player = {
|
|
1415
1653
|
* @public
|
1416
1654
|
*/
|
1417
1655
|
export declare interface PlayerCapability {
|
1418
|
-
codec:
|
1419
|
-
encryption:
|
1420
|
-
protocol:
|
1656
|
+
codec: VideoSourceCodec;
|
1657
|
+
encryption: VideoSourceEncryption;
|
1658
|
+
protocol: VideoSourceProtocol;
|
1421
1659
|
}
|
1422
1660
|
|
1423
1661
|
/**
|
@@ -1479,6 +1717,135 @@ export declare type PlayerConfig = {
|
|
1479
1717
|
};
|
1480
1718
|
};
|
1481
1719
|
|
1720
|
+
/**
|
1721
|
+
* @public
|
1722
|
+
*/
|
1723
|
+
export declare interface PlayerEngineConfig {
|
1724
|
+
getDrmConfiguration?: () => Promise<Drm | undefined>;
|
1725
|
+
encryption?: string;
|
1726
|
+
isAd?: boolean;
|
1727
|
+
positionMs?: number;
|
1728
|
+
url: string;
|
1729
|
+
}
|
1730
|
+
|
1731
|
+
/**
|
1732
|
+
* @public
|
1733
|
+
*/
|
1734
|
+
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';
|
1735
|
+
|
1736
|
+
/**
|
1737
|
+
* @public
|
1738
|
+
*/
|
1739
|
+
export declare type PlayerEngineFactory = (videoElement: HTMLVideoElement) => PlayerEngineInterface;
|
1740
|
+
|
1741
|
+
/**
|
1742
|
+
* @public
|
1743
|
+
*/
|
1744
|
+
export declare interface PlayerEngineInterface {
|
1745
|
+
/**
|
1746
|
+
* Loads video but keeps it paused
|
1747
|
+
*/
|
1748
|
+
load(config: PlayerEngineConfig): Promise<void>;
|
1749
|
+
/**
|
1750
|
+
* Loads and starts playing video
|
1751
|
+
* @throws
|
1752
|
+
*/
|
1753
|
+
play(config: PlayerEngineConfig): Promise<void>;
|
1754
|
+
pause(): Promise<void>;
|
1755
|
+
unpause(): Promise<void>;
|
1756
|
+
isPaused(): boolean;
|
1757
|
+
stop(): Promise<void>;
|
1758
|
+
addEventListener<T>(event: PlayerEngineEvent, callback: PlayerEngineListener<T>): void;
|
1759
|
+
addEventListener(event: 'statechange', callback: PlayerEngineListener<PlayerState>): void;
|
1760
|
+
addEventListener(event: 'bufferingchange', callback: PlayerEngineListener<boolean>): void;
|
1761
|
+
addEventListener(event: 'bufferedinfochange', callback: PlayerEngineListener<BufferPercentChunk[]>): void;
|
1762
|
+
addEventListener(event: 'togglefullscreen', callback: PlayerEngineListener<boolean>): void;
|
1763
|
+
removeEventListener<T>(event: PlayerEngineEvent, listener: PlayerEngineListener<T>): void;
|
1764
|
+
/**
|
1765
|
+
* @returns currently playing audio track in ISO 639-1 format ('cs', 'en' etc.) or null if not available
|
1766
|
+
*/
|
1767
|
+
getActiveAudioTrack?: () => LangCode | null;
|
1768
|
+
/**
|
1769
|
+
* @returns currently selected subtitles in ISO 639-1 format ('cs', 'en' etc.)
|
1770
|
+
*/
|
1771
|
+
getActiveSubtitles?: () => LangCode | null;
|
1772
|
+
/**
|
1773
|
+
* Returns currently available audio tracks of currently playing video.
|
1774
|
+
*
|
1775
|
+
* @returns array of available audio tracks in ISO 639-1 format ('cs', 'en' etc.)
|
1776
|
+
*/
|
1777
|
+
getAudioTracks?: () => LangCode[];
|
1778
|
+
/**
|
1779
|
+
* @returns array of available subtitles in ISO 639-1 format ('cs', 'en' etc.)
|
1780
|
+
*/
|
1781
|
+
getSubtitles?: () => LangCode[];
|
1782
|
+
getCurrentQuality?: (lang?: LangCode) => Track | null;
|
1783
|
+
getQualities?: () => Track[];
|
1784
|
+
/**
|
1785
|
+
* options.force to change quality immediately, otherwise it takes some time
|
1786
|
+
* (because previously loaded higher or lower quality chunks are not discarded)
|
1787
|
+
*/
|
1788
|
+
selectQuality?: (track: Track, options?: {
|
1789
|
+
force: boolean;
|
1790
|
+
}) => void;
|
1791
|
+
/**
|
1792
|
+
* Is automatic selection of video quality based on network bandwidth (aka ABR) enabled?
|
1793
|
+
*/
|
1794
|
+
isAdaptationEnabled?: () => boolean;
|
1795
|
+
/**
|
1796
|
+
* Turn on automatic selection of video quality based on network bandwidth (aka ABR).
|
1797
|
+
* It is enabled by default.
|
1798
|
+
* It automatically becomes disabled when selectQuality() is called.
|
1799
|
+
*/
|
1800
|
+
enableAdaptation?: (enable: boolean) => void;
|
1801
|
+
goFullScreen(): Promise<void>;
|
1802
|
+
/**
|
1803
|
+
* @param {number} value 0-1
|
1804
|
+
*/
|
1805
|
+
changeVolume(value: number): void;
|
1806
|
+
getState(): PlayerState;
|
1807
|
+
isIdle(): boolean;
|
1808
|
+
mute(): void;
|
1809
|
+
unmute(): void;
|
1810
|
+
/**
|
1811
|
+
* @returns {number} duration in seconds
|
1812
|
+
*/
|
1813
|
+
getDuration(): number;
|
1814
|
+
seekTo(ms: number): void;
|
1815
|
+
/**
|
1816
|
+
* Changes audio track of currently playing video.
|
1817
|
+
*
|
1818
|
+
* @param {LangCode} audioTrack - audio track to select in ISO 639-1 format ('cs', 'en' etc.)
|
1819
|
+
*/
|
1820
|
+
selectAudioTrack?: (audioTrack: LangCode) => void;
|
1821
|
+
/**
|
1822
|
+
* Changes audio track of currently playing video.
|
1823
|
+
* @param {LangCode} langCode - subtitles to select in ISO 639-1 format ('cs', 'en' etc.) or null to disable subtitles
|
1824
|
+
*/
|
1825
|
+
selectSubtitles?: (langCode: LangCode | null) => void;
|
1826
|
+
/**
|
1827
|
+
* Changes audio track of currently playing video.
|
1828
|
+
*
|
1829
|
+
* @param {number} playbackSpeed - playback speed to select (1 = normal speed, 2 = twice as fast, etc.)
|
1830
|
+
*/
|
1831
|
+
selectPlaybackSpeed?: (playbackSpeed: number) => void;
|
1832
|
+
destroy(): Promise<void>;
|
1833
|
+
getBufferedInfo?(): BufferChunk[];
|
1834
|
+
lastQuality: number | null;
|
1835
|
+
}
|
1836
|
+
|
1837
|
+
/**
|
1838
|
+
* @public
|
1839
|
+
*/
|
1840
|
+
export declare type PlayerEngineListener<T> = (value: T) => any;
|
1841
|
+
|
1842
|
+
/**
|
1843
|
+
* @public
|
1844
|
+
*/
|
1845
|
+
export declare interface PlayerEngineOptions {
|
1846
|
+
seekDebounceMs?: number;
|
1847
|
+
}
|
1848
|
+
|
1482
1849
|
/**
|
1483
1850
|
* @public
|
1484
1851
|
*/
|
@@ -1536,7 +1903,10 @@ export declare type PlayerProviderProps = {
|
|
1536
1903
|
playerWrapperId?: string;
|
1537
1904
|
};
|
1538
1905
|
|
1539
|
-
|
1906
|
+
/**
|
1907
|
+
* @public
|
1908
|
+
*/
|
1909
|
+
export declare type PlayerState = 'idle' | 'playing' | 'paused';
|
1540
1910
|
|
1541
1911
|
/**
|
1542
1912
|
* @public
|
@@ -1683,6 +2053,10 @@ export declare interface PurchasableMonetization extends Monetization {
|
|
1683
2053
|
* If not set or set to false, users cannot buy it as a voucher.
|
1684
2054
|
*/
|
1685
2055
|
isPurchasableAsVoucher?: boolean;
|
2056
|
+
/**
|
2057
|
+
* Returns array of tag ids of monetization placements
|
2058
|
+
*/
|
2059
|
+
tagIds: string[];
|
1686
2060
|
}
|
1687
2061
|
|
1688
2062
|
/**
|
@@ -1745,6 +2119,11 @@ export declare type PurchaseEndpointPayload = {
|
|
1745
2119
|
* Two-letter upper-case country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
|
1746
2120
|
*/
|
1747
2121
|
countryIsoCode?: LocationField['countryIsoCode'];
|
2122
|
+
/**
|
2123
|
+
* Purchase expiration timestamp. Only present for "subscription" monetization type. This timestamp does not mean it will
|
2124
|
+
* really expire at this timestamp - additional payment of this subscription can occur so expiration timestamp may be increased.
|
2125
|
+
*/
|
2126
|
+
expiration?: number;
|
1748
2127
|
/**
|
1749
2128
|
* Gateway name or "voucher".
|
1750
2129
|
*/
|
@@ -1753,22 +2132,22 @@ export declare type PurchaseEndpointPayload = {
|
|
1753
2132
|
* Tivio ID of the purchase.
|
1754
2133
|
*/
|
1755
2134
|
id: string;
|
1756
|
-
/**
|
1757
|
-
* Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
|
1758
|
-
*/
|
1759
|
-
updated: number;
|
1760
2135
|
/**
|
1761
2136
|
* True if delayed payment is confirmed but not charged yet, undefined in all other cases.
|
1762
2137
|
*/
|
1763
2138
|
isDelayedPayment?: boolean;
|
2139
|
+
/**
|
2140
|
+
* Purchase status after change.
|
2141
|
+
*/
|
2142
|
+
newStatus: PurchaseStatus;
|
1764
2143
|
/**
|
1765
2144
|
* Purchase status before change.
|
1766
2145
|
*/
|
1767
2146
|
previousStatus: PurchaseStatus;
|
1768
2147
|
/**
|
1769
|
-
*
|
2148
|
+
* Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
|
1770
2149
|
*/
|
1771
|
-
|
2150
|
+
updated: number;
|
1772
2151
|
};
|
1773
2152
|
/**
|
1774
2153
|
* Information about the monetization which has been bought by this purchase. Monetization definition may change in time so information provided here
|
@@ -2091,6 +2470,9 @@ declare interface RowBase {
|
|
2091
2470
|
type: ScreenRowType;
|
2092
2471
|
isLiveRow: boolean;
|
2093
2472
|
numberOfLines?: number;
|
2473
|
+
monetizations?: {
|
2474
|
+
monetizationRef: any;
|
2475
|
+
}[];
|
2094
2476
|
}
|
2095
2477
|
|
2096
2478
|
/**
|
@@ -2129,8 +2511,7 @@ export declare interface RowItemAssets {
|
|
2129
2511
|
export declare enum RowItemComponent {
|
2130
2512
|
ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
|
2131
2513
|
ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
|
2132
|
-
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
2133
|
-
ROW_ITEM_BANNER = "ROW_ITEM_BANNER"
|
2514
|
+
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
2134
2515
|
}
|
2135
2516
|
|
2136
2517
|
/**
|
@@ -2505,7 +2886,7 @@ export declare type TileSizes = {
|
|
2505
2886
|
* @internal
|
2506
2887
|
*/
|
2507
2888
|
export declare type TileSizesMap = {
|
2508
|
-
[item in RowItemComponent]: TileSizes;
|
2889
|
+
[item in RowItemComponent | BannerItemComponent]: TileSizes;
|
2509
2890
|
};
|
2510
2891
|
|
2511
2892
|
/**
|
@@ -2579,7 +2960,7 @@ export declare type TivioComponents = {
|
|
2579
2960
|
onEnded?: () => any;
|
2580
2961
|
}>;
|
2581
2962
|
TvApp: React_2.ComponentType<TvAppProps>;
|
2582
|
-
FeatureSupportCheck: React_2.ComponentType
|
2963
|
+
FeatureSupportCheck: React_2.ComponentType<{}>;
|
2583
2964
|
CustomerScreen: React_2.ComponentType<{
|
2584
2965
|
screenId: string;
|
2585
2966
|
}>;
|
@@ -2761,7 +3142,7 @@ export declare type TivioInternalHooks = {
|
|
2761
3142
|
usePurchasesWithVideos: () => {
|
2762
3143
|
purchases: Purchase[];
|
2763
3144
|
};
|
2764
|
-
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
|
3145
|
+
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
|
2765
3146
|
subscriptions: PurchasableMonetization[];
|
2766
3147
|
};
|
2767
3148
|
useIsMonetizationPurchased: () => {
|
@@ -2837,7 +3218,7 @@ export declare type TivioJsBundleExposedApi = {
|
|
2837
3218
|
* @param id - player wrapper id
|
2838
3219
|
* @returns {Player} player wrapper instance
|
2839
3220
|
*/
|
2840
|
-
|
3221
|
+
getPlayerWrapper: (id: string) => Player;
|
2841
3222
|
/**
|
2842
3223
|
* Get tv channel by its id.
|
2843
3224
|
* @param tvChannelId - tv channel id
|
@@ -2975,11 +3356,6 @@ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
|
|
2975
3356
|
*/
|
2976
3357
|
export declare const TivioWidget: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<TivioWidgetRef>>;
|
2977
3358
|
|
2978
|
-
/**
|
2979
|
-
* @public
|
2980
|
-
*/
|
2981
|
-
export declare const TivioWidgetApp: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<unknown>>;
|
2982
|
-
|
2983
3359
|
/**
|
2984
3360
|
* @public
|
2985
3361
|
*/
|
@@ -3006,7 +3382,6 @@ export declare interface TivioWidgetProps {
|
|
3006
3382
|
width: number;
|
3007
3383
|
x: number;
|
3008
3384
|
}) => any;
|
3009
|
-
navigateFunction?: any;
|
3010
3385
|
}
|
3011
3386
|
|
3012
3387
|
/**
|
@@ -3025,6 +3400,40 @@ export declare interface TivioWidgetRef {
|
|
3025
3400
|
});
|
3026
3401
|
}
|
3027
3402
|
|
3403
|
+
export declare interface TopWatchItem {
|
3404
|
+
videoId: string;
|
3405
|
+
/**
|
3406
|
+
* If video is part of series we get a tagId to series
|
3407
|
+
*/
|
3408
|
+
seriesId?: string;
|
3409
|
+
/**
|
3410
|
+
* Video type {@link VideoType}
|
3411
|
+
*/
|
3412
|
+
videoType: VideoType;
|
3413
|
+
/**
|
3414
|
+
* Uniq users count
|
3415
|
+
*/
|
3416
|
+
userCount: number;
|
3417
|
+
/**
|
3418
|
+
* Count of video view events
|
3419
|
+
*/
|
3420
|
+
viewCount: number;
|
3421
|
+
}
|
3422
|
+
|
3423
|
+
/**
|
3424
|
+
* @public
|
3425
|
+
* Video track
|
3426
|
+
*/
|
3427
|
+
declare interface Track {
|
3428
|
+
id: number;
|
3429
|
+
/**
|
3430
|
+
* e.g. 480, 720, 1080
|
3431
|
+
*/
|
3432
|
+
height: number;
|
3433
|
+
active: boolean;
|
3434
|
+
language: LangCode;
|
3435
|
+
}
|
3436
|
+
|
3028
3437
|
declare type TransactionInfo = {
|
3029
3438
|
type: 'transaction';
|
3030
3439
|
name: string;
|
@@ -3041,6 +3450,8 @@ export declare type Translation = {
|
|
3041
3450
|
[key in LangCode]?: string;
|
3042
3451
|
};
|
3043
3452
|
|
3453
|
+
export declare type TriggerType = 'scheduled' | 'manual';
|
3454
|
+
|
3044
3455
|
/**
|
3045
3456
|
* @public
|
3046
3457
|
*/
|
@@ -3066,12 +3477,26 @@ export declare interface TvChannel extends RowItem {
|
|
3066
3477
|
* Transactions before subscriptions, sorted by price ascending.
|
3067
3478
|
*/
|
3068
3479
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
3069
|
-
getSourceUrl(
|
3480
|
+
getSourceUrl(options?: {
|
3481
|
+
language?: LangCode;
|
3482
|
+
}): Promise<GetSourceUrlResponse & {
|
3483
|
+
language?: LangCode;
|
3484
|
+
}>;
|
3070
3485
|
purchasableMonetization: any | null;
|
3071
3486
|
price: number;
|
3072
3487
|
cover: string;
|
3073
3488
|
isPlayable: boolean;
|
3074
|
-
|
3489
|
+
url: string;
|
3490
|
+
}
|
3491
|
+
|
3492
|
+
export declare interface TvProgram {
|
3493
|
+
from: Date | null;
|
3494
|
+
to: Date | null;
|
3495
|
+
name: string;
|
3496
|
+
description: string;
|
3497
|
+
url: string;
|
3498
|
+
image: string;
|
3499
|
+
video: Video | null;
|
3075
3500
|
}
|
3076
3501
|
|
3077
3502
|
/**
|
@@ -3178,7 +3603,7 @@ export declare interface UseCancelSubscriptionsResult {
|
|
3178
3603
|
* @public
|
3179
3604
|
*/
|
3180
3605
|
export declare type UseChannelSource = (tvChannelId: string) => {
|
3181
|
-
source: ChannelSourcePojo | null;
|
3606
|
+
source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
|
3182
3607
|
error: Error | null;
|
3183
3608
|
};
|
3184
3609
|
|
@@ -3188,7 +3613,7 @@ export declare type UseChannelSource = (tvChannelId: string) => {
|
|
3188
3613
|
* @public
|
3189
3614
|
*/
|
3190
3615
|
export declare const useChannelSource: (tvChannelId: string) => {
|
3191
|
-
source: ChannelSourcePojo | null;
|
3616
|
+
source: ChannelSourcePojo | VirtualChannelSourcePojo | null;
|
3192
3617
|
error: Error | null;
|
3193
3618
|
};
|
3194
3619
|
|
@@ -3234,21 +3659,16 @@ export declare const useMarkers: () => Marker[] | null;
|
|
3234
3659
|
|
3235
3660
|
/**
|
3236
3661
|
* @public
|
3662
|
+
*
|
3663
|
+
* @param onlyPurchasableSubscriptions When it is true, it returns only enabled subscriptions.
|
3664
|
+
* @param videoId If it is not defined returns all subscriptions except one time payment.
|
3665
|
+
* When it is set, returns only subscriptions which is described in tagIds for video.
|
3666
|
+
* @returns Array of subscriptions according to set parameters
|
3237
3667
|
*/
|
3238
|
-
export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
|
3668
|
+
export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
|
3239
3669
|
subscriptions: PurchasableMonetization[];
|
3240
3670
|
};
|
3241
3671
|
|
3242
|
-
/**
|
3243
|
-
* @public
|
3244
|
-
*/
|
3245
|
-
export declare type UsePlayerEvent = <T = any>(eventName: string) => T | null;
|
3246
|
-
|
3247
|
-
/**
|
3248
|
-
* @public
|
3249
|
-
*/
|
3250
|
-
export declare const usePlayerEvent: UsePlayerEvent;
|
3251
|
-
|
3252
3672
|
/**
|
3253
3673
|
* Is used to mark purchase in recovery state as PAID.
|
3254
3674
|
*
|
@@ -3321,6 +3741,12 @@ export declare type User = {
|
|
3321
3741
|
setActiveUserProfileId: (id: string) => void;
|
3322
3742
|
};
|
3323
3743
|
|
3744
|
+
export declare enum UserGroup {
|
3745
|
+
ALL = "all",
|
3746
|
+
FREE = "free",
|
3747
|
+
PREMIUM = "premium"
|
3748
|
+
}
|
3749
|
+
|
3324
3750
|
/**
|
3325
3751
|
* @public
|
3326
3752
|
*/
|
@@ -3532,7 +3958,11 @@ export declare interface Video extends RowItem {
|
|
3532
3958
|
* Transactions before subscriptions, sorted by price ascending.
|
3533
3959
|
*/
|
3534
3960
|
getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
|
3535
|
-
getSourceUrl(
|
3961
|
+
getSourceUrl(options?: {
|
3962
|
+
language?: LangCode;
|
3963
|
+
}): Promise<GetSourceUrlResponse & {
|
3964
|
+
language?: LangCode;
|
3965
|
+
}>;
|
3536
3966
|
purchasableMonetization: any | null;
|
3537
3967
|
transaction: PurchasableMonetization | undefined;
|
3538
3968
|
subscriptions: PurchasableMonetization[];
|
@@ -3543,7 +3973,6 @@ export declare interface Video extends RowItem {
|
|
3543
3973
|
urlName?: string;
|
3544
3974
|
price: number | null;
|
3545
3975
|
detailedPrice: DetailedPrice | null;
|
3546
|
-
uri: string;
|
3547
3976
|
url: string;
|
3548
3977
|
adMonetizationId?: string;
|
3549
3978
|
from?: Date;
|
@@ -3565,7 +3994,7 @@ export declare interface Video extends RowItem {
|
|
3565
3994
|
removeFromFavorites: () => void;
|
3566
3995
|
availability: VideoAvailability | null;
|
3567
3996
|
sourceLanguages: LangCode[];
|
3568
|
-
|
3997
|
+
urlByLanguage: (lang: LangCode) => string | undefined;
|
3569
3998
|
}
|
3570
3999
|
|
3571
4000
|
/**
|
@@ -3596,6 +4025,29 @@ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExt
|
|
3596
4025
|
|
3597
4026
|
declare type VideoPath = string;
|
3598
4027
|
|
4028
|
+
export declare enum VideoSourceCodec {
|
4029
|
+
H264 = "h264",
|
4030
|
+
H265 = "h265"
|
4031
|
+
}
|
4032
|
+
|
4033
|
+
export declare enum VideoSourceEncryption {
|
4034
|
+
NONE = "none",
|
4035
|
+
WIDEVINE = "widevine",
|
4036
|
+
FAIRPLAY = "fairplay",
|
4037
|
+
PLAYREADY = "playready"
|
4038
|
+
}
|
4039
|
+
|
4040
|
+
/**
|
4041
|
+
* Lower number = higher priority.
|
4042
|
+
*/
|
4043
|
+
export declare type VideoSourcePriority = 1 | 2 | 3 | 4 | 5;
|
4044
|
+
|
4045
|
+
export declare enum VideoSourceProtocol {
|
4046
|
+
HLS = "hls",
|
4047
|
+
DASH = "dash",
|
4048
|
+
MP4 = "mp4"
|
4049
|
+
}
|
4050
|
+
|
3599
4051
|
/**
|
3600
4052
|
* Video type.
|
3601
4053
|
* @public
|
@@ -3627,30 +4079,57 @@ export declare enum VideoType {
|
|
3627
4079
|
/**
|
3628
4080
|
* @public
|
3629
4081
|
*/
|
3630
|
-
export declare type
|
4082
|
+
export declare type VideoUrlNames = {
|
3631
4083
|
[key in LangCode]?: string[];
|
3632
4084
|
};
|
3633
4085
|
|
4086
|
+
export declare interface ViewCountItem {
|
4087
|
+
/**
|
4088
|
+
* Unix timestamp
|
4089
|
+
*/
|
4090
|
+
date: number;
|
4091
|
+
/**
|
4092
|
+
* Monetization under the videos played, if not filled it is free
|
4093
|
+
*/
|
4094
|
+
monetizationId?: string;
|
4095
|
+
/**
|
4096
|
+
* Device where the video played
|
4097
|
+
*/
|
4098
|
+
deviceType: PLATFORM;
|
4099
|
+
/**
|
4100
|
+
* Count of video view events in group
|
4101
|
+
*/
|
4102
|
+
totalCount: number;
|
4103
|
+
}
|
4104
|
+
|
4105
|
+
/**
|
4106
|
+
* @public
|
4107
|
+
*/
|
4108
|
+
export declare interface VirtualChannelSourcePojo extends Omit<ChannelSourcePojo, 'type'> {
|
4109
|
+
type: 'VirtualChannelSource';
|
4110
|
+
epg: TvProgram[];
|
4111
|
+
}
|
4112
|
+
|
3634
4113
|
/**
|
3635
4114
|
* @public
|
3636
4115
|
*/
|
3637
4116
|
export declare type VodExternalSource = {
|
3638
|
-
new (
|
4117
|
+
new (url: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
|
3639
4118
|
type: 'vod_external';
|
3640
4119
|
description: string;
|
3641
4120
|
name: string;
|
3642
|
-
|
4121
|
+
url: string;
|
3643
4122
|
};
|
3644
4123
|
|
3645
4124
|
/**
|
3646
4125
|
* @public
|
3647
4126
|
*/
|
3648
4127
|
export declare type VodTivioSource = {
|
3649
|
-
new (
|
4128
|
+
new (url: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
|
3650
4129
|
type: 'vod_tivio';
|
3651
4130
|
description: string;
|
3652
4131
|
name: string;
|
3653
|
-
|
4132
|
+
url: string;
|
3654
4133
|
};
|
3655
4134
|
|
3656
4135
|
declare interface VodTivioSourcePojo {
|
@@ -3658,7 +4137,7 @@ declare interface VodTivioSourcePojo {
|
|
3658
4137
|
description: string;
|
3659
4138
|
path: string;
|
3660
4139
|
name: string;
|
3661
|
-
|
4140
|
+
url: string;
|
3662
4141
|
poster?: string;
|
3663
4142
|
adMonetizationId?: string;
|
3664
4143
|
availability: VideoAvailability | null;
|
@@ -3689,7 +4168,7 @@ export declare interface WarningConfirmationOverlayPayload extends ConfirmationO
|
|
3689
4168
|
*/
|
3690
4169
|
export declare interface WebPlayerProps {
|
3691
4170
|
id: string;
|
3692
|
-
source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
|
4171
|
+
source?: VodTivioSourcePojo | ChannelSourcePojo | VirtualChannelSourcePojo | VideoPath | null;
|
3693
4172
|
onEnded?: () => any;
|
3694
4173
|
/**
|
3695
4174
|
* If this function is specified, then "Back" button is shown in top right corner.
|