@tivio/sdk-react 5.0.3-alpha-4 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +10 -0
- package/README.md.bak +10 -0
- package/dist/index.d.ts +353 -74
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +353 -74
- 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';
|
@@ -316,6 +316,22 @@ export declare type BetOffer = {
|
|
316
316
|
time: Date;
|
317
317
|
};
|
318
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
|
+
|
319
335
|
/**
|
320
336
|
* rejects when bundle is not available
|
321
337
|
* @public
|
@@ -346,11 +362,14 @@ export declare interface Channel {
|
|
346
362
|
recentVideos: Video[];
|
347
363
|
}
|
348
364
|
|
365
|
+
/**
|
366
|
+
* @public
|
367
|
+
*/
|
349
368
|
export declare type ChannelSource = {
|
350
|
-
new (
|
369
|
+
new (url: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
|
351
370
|
description: string;
|
352
371
|
name: string;
|
353
|
-
|
372
|
+
url: string;
|
354
373
|
from: Date;
|
355
374
|
channelName: string;
|
356
375
|
to: Date;
|
@@ -365,7 +384,7 @@ export declare type ChannelSource = {
|
|
365
384
|
*/
|
366
385
|
export declare interface ChannelSourcePojo {
|
367
386
|
type: 'ChannelSource';
|
368
|
-
|
387
|
+
url: string;
|
369
388
|
originalOptions: any;
|
370
389
|
channelName: string;
|
371
390
|
programName: string;
|
@@ -752,11 +771,38 @@ export declare type DocumentOptions = Partial<{
|
|
752
771
|
}>;
|
753
772
|
|
754
773
|
export declare interface Drm {
|
755
|
-
|
774
|
+
encryption: VideoSourceEncryption;
|
775
|
+
/**
|
776
|
+
* Url to retrieve fairplay from.
|
777
|
+
*/
|
778
|
+
certificateUrl?: string;
|
756
779
|
/**
|
757
|
-
*
|
780
|
+
* Url to send license to.
|
781
|
+
*/
|
782
|
+
licenseUrl: string;
|
783
|
+
/**
|
784
|
+
* Headers with corresponding values to send to license server.
|
758
785
|
*/
|
759
|
-
|
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"
|
760
806
|
}
|
761
807
|
|
762
808
|
/**
|
@@ -775,6 +821,76 @@ export declare enum DurationUnits {
|
|
775
821
|
MONTH = "month"
|
776
822
|
}
|
777
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
|
+
|
778
894
|
/**
|
779
895
|
* @public
|
780
896
|
*/
|
@@ -801,17 +917,6 @@ export declare type ExternalTvConfig = {
|
|
801
917
|
splashScreenBackgroundColor?: string;
|
802
918
|
};
|
803
919
|
|
804
|
-
export declare interface FairplayDrmConfiguration {
|
805
|
-
/**
|
806
|
-
* Url to retrieve fairplay certificate from.
|
807
|
-
*/
|
808
|
-
fairplayCertificateUrl: string;
|
809
|
-
/**
|
810
|
-
* Url to send license to.
|
811
|
-
*/
|
812
|
-
fairplayLicenseUrl: string;
|
813
|
-
}
|
814
|
-
|
815
920
|
/**
|
816
921
|
* @throws if fetch fails
|
817
922
|
* @public
|
@@ -1403,6 +1508,22 @@ export declare type NewVoucher = {
|
|
1403
1508
|
expirationDate: Date | number;
|
1404
1509
|
};
|
1405
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
|
+
|
1406
1527
|
/**
|
1407
1528
|
* @public
|
1408
1529
|
*/
|
@@ -1532,9 +1653,9 @@ export declare type Player = {
|
|
1532
1653
|
* @public
|
1533
1654
|
*/
|
1534
1655
|
export declare interface PlayerCapability {
|
1535
|
-
codec:
|
1536
|
-
encryption:
|
1537
|
-
protocol:
|
1656
|
+
codec: VideoSourceCodec;
|
1657
|
+
encryption: VideoSourceEncryption;
|
1658
|
+
protocol: VideoSourceProtocol;
|
1538
1659
|
}
|
1539
1660
|
|
1540
1661
|
/**
|
@@ -1596,6 +1717,135 @@ export declare type PlayerConfig = {
|
|
1596
1717
|
};
|
1597
1718
|
};
|
1598
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
|
+
|
1599
1849
|
/**
|
1600
1850
|
* @public
|
1601
1851
|
*/
|
@@ -1653,7 +1903,10 @@ export declare type PlayerProviderProps = {
|
|
1653
1903
|
playerWrapperId?: string;
|
1654
1904
|
};
|
1655
1905
|
|
1656
|
-
|
1906
|
+
/**
|
1907
|
+
* @public
|
1908
|
+
*/
|
1909
|
+
export declare type PlayerState = 'idle' | 'playing' | 'paused';
|
1657
1910
|
|
1658
1911
|
/**
|
1659
1912
|
* @public
|
@@ -1749,13 +2002,6 @@ export declare enum PlayerWrapperEventType {
|
|
1749
2002
|
*/
|
1750
2003
|
export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
|
1751
2004
|
|
1752
|
-
export declare interface PlayreadyDrmConfiguration {
|
1753
|
-
/**
|
1754
|
-
* Url to send license to.
|
1755
|
-
*/
|
1756
|
-
playreadyLicenseUrl: string;
|
1757
|
-
}
|
1758
|
-
|
1759
2005
|
/**
|
1760
2006
|
* @public
|
1761
2007
|
*/
|
@@ -1807,6 +2053,10 @@ export declare interface PurchasableMonetization extends Monetization {
|
|
1807
2053
|
* If not set or set to false, users cannot buy it as a voucher.
|
1808
2054
|
*/
|
1809
2055
|
isPurchasableAsVoucher?: boolean;
|
2056
|
+
/**
|
2057
|
+
* Returns array of tag ids of monetization placements
|
2058
|
+
*/
|
2059
|
+
tagIds: string[];
|
1810
2060
|
}
|
1811
2061
|
|
1812
2062
|
/**
|
@@ -1869,6 +2119,11 @@ export declare type PurchaseEndpointPayload = {
|
|
1869
2119
|
* Two-letter upper-case country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
|
1870
2120
|
*/
|
1871
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;
|
1872
2127
|
/**
|
1873
2128
|
* Gateway name or "voucher".
|
1874
2129
|
*/
|
@@ -1877,22 +2132,22 @@ export declare type PurchaseEndpointPayload = {
|
|
1877
2132
|
* Tivio ID of the purchase.
|
1878
2133
|
*/
|
1879
2134
|
id: string;
|
1880
|
-
/**
|
1881
|
-
* Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
|
1882
|
-
*/
|
1883
|
-
updated: number;
|
1884
2135
|
/**
|
1885
2136
|
* True if delayed payment is confirmed but not charged yet, undefined in all other cases.
|
1886
2137
|
*/
|
1887
2138
|
isDelayedPayment?: boolean;
|
2139
|
+
/**
|
2140
|
+
* Purchase status after change.
|
2141
|
+
*/
|
2142
|
+
newStatus: PurchaseStatus;
|
1888
2143
|
/**
|
1889
2144
|
* Purchase status before change.
|
1890
2145
|
*/
|
1891
2146
|
previousStatus: PurchaseStatus;
|
1892
2147
|
/**
|
1893
|
-
*
|
2148
|
+
* Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
|
1894
2149
|
*/
|
1895
|
-
|
2150
|
+
updated: number;
|
1896
2151
|
};
|
1897
2152
|
/**
|
1898
2153
|
* Information about the monetization which has been bought by this purchase. Monetization definition may change in time so information provided here
|
@@ -2705,7 +2960,7 @@ export declare type TivioComponents = {
|
|
2705
2960
|
onEnded?: () => any;
|
2706
2961
|
}>;
|
2707
2962
|
TvApp: React_2.ComponentType<TvAppProps>;
|
2708
|
-
FeatureSupportCheck: React_2.ComponentType
|
2963
|
+
FeatureSupportCheck: React_2.ComponentType<{}>;
|
2709
2964
|
CustomerScreen: React_2.ComponentType<{
|
2710
2965
|
screenId: string;
|
2711
2966
|
}>;
|
@@ -2887,7 +3142,7 @@ export declare type TivioInternalHooks = {
|
|
2887
3142
|
usePurchasesWithVideos: () => {
|
2888
3143
|
purchases: Purchase[];
|
2889
3144
|
};
|
2890
|
-
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
|
3145
|
+
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
|
2891
3146
|
subscriptions: PurchasableMonetization[];
|
2892
3147
|
};
|
2893
3148
|
useIsMonetizationPurchased: () => {
|
@@ -2963,7 +3218,7 @@ export declare type TivioJsBundleExposedApi = {
|
|
2963
3218
|
* @param id - player wrapper id
|
2964
3219
|
* @returns {Player} player wrapper instance
|
2965
3220
|
*/
|
2966
|
-
|
3221
|
+
getPlayerWrapper: (id: string) => Player;
|
2967
3222
|
/**
|
2968
3223
|
* Get tv channel by its id.
|
2969
3224
|
* @param tvChannelId - tv channel id
|
@@ -3101,11 +3356,6 @@ export declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
|
|
3101
3356
|
*/
|
3102
3357
|
export declare const TivioWidget: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<TivioWidgetRef>>;
|
3103
3358
|
|
3104
|
-
/**
|
3105
|
-
* @public
|
3106
|
-
*/
|
3107
|
-
export declare const TivioWidgetApp: React_2.ForwardRefExoticComponent<Omit<TivioWidgetProps, "ref"> & React_2.RefAttributes<unknown>>;
|
3108
|
-
|
3109
3359
|
/**
|
3110
3360
|
* @public
|
3111
3361
|
*/
|
@@ -3132,8 +3382,6 @@ export declare interface TivioWidgetProps {
|
|
3132
3382
|
width: number;
|
3133
3383
|
x: number;
|
3134
3384
|
}) => any;
|
3135
|
-
navigateFunction?: any;
|
3136
|
-
isFocused?: boolean;
|
3137
3385
|
}
|
3138
3386
|
|
3139
3387
|
/**
|
@@ -3172,6 +3420,20 @@ export declare interface TopWatchItem {
|
|
3172
3420
|
viewCount: number;
|
3173
3421
|
}
|
3174
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
|
+
|
3175
3437
|
declare type TransactionInfo = {
|
3176
3438
|
type: 'transaction';
|
3177
3439
|
name: string;
|
@@ -3188,12 +3450,13 @@ export declare type Translation = {
|
|
3188
3450
|
[key in LangCode]?: string;
|
3189
3451
|
};
|
3190
3452
|
|
3453
|
+
export declare type TriggerType = 'scheduled' | 'manual';
|
3454
|
+
|
3191
3455
|
/**
|
3192
3456
|
* @public
|
3193
3457
|
*/
|
3194
3458
|
export declare type TvAppProps = {
|
3195
3459
|
customer: CustomerId;
|
3196
|
-
navigateFunction: (url: string) => void;
|
3197
3460
|
};
|
3198
3461
|
|
3199
3462
|
/**
|
@@ -3223,7 +3486,7 @@ export declare interface TvChannel extends RowItem {
|
|
3223
3486
|
price: number;
|
3224
3487
|
cover: string;
|
3225
3488
|
isPlayable: boolean;
|
3226
|
-
|
3489
|
+
url: string;
|
3227
3490
|
}
|
3228
3491
|
|
3229
3492
|
export declare interface TvProgram {
|
@@ -3231,7 +3494,7 @@ export declare interface TvProgram {
|
|
3231
3494
|
to: Date | null;
|
3232
3495
|
name: string;
|
3233
3496
|
description: string;
|
3234
|
-
|
3497
|
+
url: string;
|
3235
3498
|
image: string;
|
3236
3499
|
video: Video | null;
|
3237
3500
|
}
|
@@ -3396,21 +3659,16 @@ export declare const useMarkers: () => Marker[] | null;
|
|
3396
3659
|
|
3397
3660
|
/**
|
3398
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
|
3399
3667
|
*/
|
3400
|
-
export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
|
3668
|
+
export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
|
3401
3669
|
subscriptions: PurchasableMonetization[];
|
3402
3670
|
};
|
3403
3671
|
|
3404
|
-
/**
|
3405
|
-
* @public
|
3406
|
-
*/
|
3407
|
-
export declare type UsePlayerEvent = <T = any>(eventName: string) => T | null;
|
3408
|
-
|
3409
|
-
/**
|
3410
|
-
* @public
|
3411
|
-
*/
|
3412
|
-
export declare const usePlayerEvent: UsePlayerEvent;
|
3413
|
-
|
3414
3672
|
/**
|
3415
3673
|
* Is used to mark purchase in recovery state as PAID.
|
3416
3674
|
*
|
@@ -3483,6 +3741,12 @@ export declare type User = {
|
|
3483
3741
|
setActiveUserProfileId: (id: string) => void;
|
3484
3742
|
};
|
3485
3743
|
|
3744
|
+
export declare enum UserGroup {
|
3745
|
+
ALL = "all",
|
3746
|
+
FREE = "free",
|
3747
|
+
PREMIUM = "premium"
|
3748
|
+
}
|
3749
|
+
|
3486
3750
|
/**
|
3487
3751
|
* @public
|
3488
3752
|
*/
|
@@ -3709,7 +3973,6 @@ export declare interface Video extends RowItem {
|
|
3709
3973
|
urlName?: string;
|
3710
3974
|
price: number | null;
|
3711
3975
|
detailedPrice: DetailedPrice | null;
|
3712
|
-
uri: string;
|
3713
3976
|
url: string;
|
3714
3977
|
adMonetizationId?: string;
|
3715
3978
|
from?: Date;
|
@@ -3731,7 +3994,7 @@ export declare interface Video extends RowItem {
|
|
3731
3994
|
removeFromFavorites: () => void;
|
3732
3995
|
availability: VideoAvailability | null;
|
3733
3996
|
sourceLanguages: LangCode[];
|
3734
|
-
|
3997
|
+
urlByLanguage: (lang: LangCode) => string | undefined;
|
3735
3998
|
}
|
3736
3999
|
|
3737
4000
|
/**
|
@@ -3762,6 +4025,29 @@ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExt
|
|
3762
4025
|
|
3763
4026
|
declare type VideoPath = string;
|
3764
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
|
+
|
3765
4051
|
/**
|
3766
4052
|
* Video type.
|
3767
4053
|
* @public
|
@@ -3828,22 +4114,22 @@ export declare interface VirtualChannelSourcePojo extends Omit<ChannelSourcePojo
|
|
3828
4114
|
* @public
|
3829
4115
|
*/
|
3830
4116
|
export declare type VodExternalSource = {
|
3831
|
-
new (
|
4117
|
+
new (url: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
|
3832
4118
|
type: 'vod_external';
|
3833
4119
|
description: string;
|
3834
4120
|
name: string;
|
3835
|
-
|
4121
|
+
url: string;
|
3836
4122
|
};
|
3837
4123
|
|
3838
4124
|
/**
|
3839
4125
|
* @public
|
3840
4126
|
*/
|
3841
4127
|
export declare type VodTivioSource = {
|
3842
|
-
new (
|
4128
|
+
new (url: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
|
3843
4129
|
type: 'vod_tivio';
|
3844
4130
|
description: string;
|
3845
4131
|
name: string;
|
3846
|
-
|
4132
|
+
url: string;
|
3847
4133
|
};
|
3848
4134
|
|
3849
4135
|
declare interface VodTivioSourcePojo {
|
@@ -3851,7 +4137,7 @@ declare interface VodTivioSourcePojo {
|
|
3851
4137
|
description: string;
|
3852
4138
|
path: string;
|
3853
4139
|
name: string;
|
3854
|
-
|
4140
|
+
url: string;
|
3855
4141
|
poster?: string;
|
3856
4142
|
adMonetizationId?: string;
|
3857
4143
|
availability: VideoAvailability | null;
|
@@ -3967,13 +4253,6 @@ export declare type WhereFilterArray = [string, WhereFilterOp, any];
|
|
3967
4253
|
|
3968
4254
|
declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
|
3969
4255
|
|
3970
|
-
export declare interface WidevineDrmConfiguration {
|
3971
|
-
/**
|
3972
|
-
* Url to send license to.
|
3973
|
-
*/
|
3974
|
-
widevineLicenseUrl: string;
|
3975
|
-
}
|
3976
|
-
|
3977
4256
|
/**
|
3978
4257
|
* @public
|
3979
4258
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "
|
3
|
+
"version": "6.0.1",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"typings": "dist/index.d.ts",
|
6
6
|
"source": "src/index.ts",
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"@material-ui/core": "^4.11.2",
|
34
34
|
"@material-ui/icons": "^4.11.2",
|
35
35
|
"@sentry/browser": "^6.1.0",
|
36
|
-
"@tivio/common": "1.1.
|
36
|
+
"@tivio/common": "1.1.110",
|
37
37
|
"dayjs": "^1.11.0",
|
38
38
|
"es7-object-polyfill": "^1.0.1",
|
39
39
|
"firebase": "8.10.1",
|