@tivio/sdk-react 5.0.3-alpha-4 → 5.0.3-alpha-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/README.md.bak +6 -0
- package/dist/index.d.ts +363 -65
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +363 -65
- 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;
|
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 {
|
756
792
|
/**
|
757
|
-
*
|
793
|
+
* Original oktagon stream provider.
|
794
|
+
*
|
795
|
+
* https://streamonline.pl
|
758
796
|
*/
|
759
|
-
|
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
|
@@ -2720,6 +2975,7 @@ export declare type TivioComponents = {
|
|
2720
2975
|
WebTile: React_2.ComponentType<{
|
2721
2976
|
item?: ItemsInRow;
|
2722
2977
|
} & TilePropsPartial>;
|
2978
|
+
ChannelContext: React_2.Context<TvChannel | undefined>;
|
2723
2979
|
};
|
2724
2980
|
|
2725
2981
|
/**
|
@@ -2846,6 +3102,7 @@ export declare type TivioHooks = {
|
|
2846
3102
|
inviteCodeReset: () => void;
|
2847
3103
|
};
|
2848
3104
|
useChannelSource: UseChannelSource;
|
3105
|
+
useTvChannel: UseTvChannel;
|
2849
3106
|
};
|
2850
3107
|
|
2851
3108
|
/**
|
@@ -2887,7 +3144,7 @@ export declare type TivioInternalHooks = {
|
|
2887
3144
|
usePurchasesWithVideos: () => {
|
2888
3145
|
purchases: Purchase[];
|
2889
3146
|
};
|
2890
|
-
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
|
3147
|
+
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
|
2891
3148
|
subscriptions: PurchasableMonetization[];
|
2892
3149
|
};
|
2893
3150
|
useIsMonetizationPurchased: () => {
|
@@ -2963,7 +3220,7 @@ export declare type TivioJsBundleExposedApi = {
|
|
2963
3220
|
* @param id - player wrapper id
|
2964
3221
|
* @returns {Player} player wrapper instance
|
2965
3222
|
*/
|
2966
|
-
|
3223
|
+
getPlayerWrapper: (id: string) => Player;
|
2967
3224
|
/**
|
2968
3225
|
* Get tv channel by its id.
|
2969
3226
|
* @param tvChannelId - tv channel id
|
@@ -3172,6 +3429,20 @@ export declare interface TopWatchItem {
|
|
3172
3429
|
viewCount: number;
|
3173
3430
|
}
|
3174
3431
|
|
3432
|
+
/**
|
3433
|
+
* @public
|
3434
|
+
* Video track
|
3435
|
+
*/
|
3436
|
+
declare interface Track {
|
3437
|
+
id: number;
|
3438
|
+
/**
|
3439
|
+
* e.g. 480, 720, 1080
|
3440
|
+
*/
|
3441
|
+
height: number;
|
3442
|
+
active: boolean;
|
3443
|
+
language: LangCode;
|
3444
|
+
}
|
3445
|
+
|
3175
3446
|
declare type TransactionInfo = {
|
3176
3447
|
type: 'transaction';
|
3177
3448
|
name: string;
|
@@ -3188,6 +3459,8 @@ export declare type Translation = {
|
|
3188
3459
|
[key in LangCode]?: string;
|
3189
3460
|
};
|
3190
3461
|
|
3462
|
+
export declare type TriggerType = 'scheduled' | 'manual';
|
3463
|
+
|
3191
3464
|
/**
|
3192
3465
|
* @public
|
3193
3466
|
*/
|
@@ -3202,11 +3475,13 @@ export declare type TvAppProps = {
|
|
3202
3475
|
export declare interface TvChannel extends RowItem {
|
3203
3476
|
id: string;
|
3204
3477
|
itemType: ROW_ITEM_TYPES.TV_CHANNEL;
|
3478
|
+
type?: TvChannelType;
|
3205
3479
|
name: string;
|
3206
3480
|
path: string;
|
3207
3481
|
country?: string;
|
3208
3482
|
filters: string[];
|
3209
3483
|
logo?: string;
|
3484
|
+
logoPendingOverlayWidth?: string;
|
3210
3485
|
hls: string;
|
3211
3486
|
dash: string;
|
3212
3487
|
/**
|
@@ -3223,7 +3498,18 @@ export declare interface TvChannel extends RowItem {
|
|
3223
3498
|
price: number;
|
3224
3499
|
cover: string;
|
3225
3500
|
isPlayable: boolean;
|
3226
|
-
|
3501
|
+
url: string;
|
3502
|
+
}
|
3503
|
+
|
3504
|
+
export declare enum TvChannelType {
|
3505
|
+
/**
|
3506
|
+
* Classic live tv channel
|
3507
|
+
*/
|
3508
|
+
CLASSIC = "CLASSIC",
|
3509
|
+
/**
|
3510
|
+
* "Virtual" tv channel constructed from separate videos
|
3511
|
+
*/
|
3512
|
+
VIRTUAL = "VIRTUAL"
|
3227
3513
|
}
|
3228
3514
|
|
3229
3515
|
export declare interface TvProgram {
|
@@ -3231,7 +3517,7 @@ export declare interface TvProgram {
|
|
3231
3517
|
to: Date | null;
|
3232
3518
|
name: string;
|
3233
3519
|
description: string;
|
3234
|
-
|
3520
|
+
url: string;
|
3235
3521
|
image: string;
|
3236
3522
|
video: Video | null;
|
3237
3523
|
}
|
@@ -3401,16 +3687,6 @@ export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions
|
|
3401
3687
|
subscriptions: PurchasableMonetization[];
|
3402
3688
|
};
|
3403
3689
|
|
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
3690
|
/**
|
3415
3691
|
* Is used to mark purchase in recovery state as PAID.
|
3416
3692
|
*
|
@@ -3483,6 +3759,12 @@ export declare type User = {
|
|
3483
3759
|
setActiveUserProfileId: (id: string) => void;
|
3484
3760
|
};
|
3485
3761
|
|
3762
|
+
export declare enum UserGroup {
|
3763
|
+
ALL = "all",
|
3764
|
+
FREE = "free",
|
3765
|
+
PREMIUM = "premium"
|
3766
|
+
}
|
3767
|
+
|
3486
3768
|
/**
|
3487
3769
|
* @public
|
3488
3770
|
*/
|
@@ -3709,7 +3991,6 @@ export declare interface Video extends RowItem {
|
|
3709
3991
|
urlName?: string;
|
3710
3992
|
price: number | null;
|
3711
3993
|
detailedPrice: DetailedPrice | null;
|
3712
|
-
uri: string;
|
3713
3994
|
url: string;
|
3714
3995
|
adMonetizationId?: string;
|
3715
3996
|
from?: Date;
|
@@ -3731,7 +4012,7 @@ export declare interface Video extends RowItem {
|
|
3731
4012
|
removeFromFavorites: () => void;
|
3732
4013
|
availability: VideoAvailability | null;
|
3733
4014
|
sourceLanguages: LangCode[];
|
3734
|
-
|
4015
|
+
urlByLanguage: (lang: LangCode) => string | undefined;
|
3735
4016
|
}
|
3736
4017
|
|
3737
4018
|
/**
|
@@ -3762,6 +4043,29 @@ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExt
|
|
3762
4043
|
|
3763
4044
|
declare type VideoPath = string;
|
3764
4045
|
|
4046
|
+
export declare enum VideoSourceCodec {
|
4047
|
+
H264 = "h264",
|
4048
|
+
H265 = "h265"
|
4049
|
+
}
|
4050
|
+
|
4051
|
+
export declare enum VideoSourceEncryption {
|
4052
|
+
NONE = "none",
|
4053
|
+
WIDEVINE = "widevine",
|
4054
|
+
FAIRPLAY = "fairplay",
|
4055
|
+
PLAYREADY = "playready"
|
4056
|
+
}
|
4057
|
+
|
4058
|
+
/**
|
4059
|
+
* Lower number = higher priority.
|
4060
|
+
*/
|
4061
|
+
export declare type VideoSourcePriority = 1 | 2 | 3 | 4 | 5;
|
4062
|
+
|
4063
|
+
export declare enum VideoSourceProtocol {
|
4064
|
+
HLS = "hls",
|
4065
|
+
DASH = "dash",
|
4066
|
+
MP4 = "mp4"
|
4067
|
+
}
|
4068
|
+
|
3765
4069
|
/**
|
3766
4070
|
* Video type.
|
3767
4071
|
* @public
|
@@ -3819,8 +4123,9 @@ export declare interface ViewCountItem {
|
|
3819
4123
|
/**
|
3820
4124
|
* @public
|
3821
4125
|
*/
|
3822
|
-
export declare interface VirtualChannelSourcePojo
|
4126
|
+
export declare interface VirtualChannelSourcePojo {
|
3823
4127
|
type: 'VirtualChannelSource';
|
4128
|
+
tvChannel: TvChannel;
|
3824
4129
|
epg: TvProgram[];
|
3825
4130
|
}
|
3826
4131
|
|
@@ -3828,22 +4133,22 @@ export declare interface VirtualChannelSourcePojo extends Omit<ChannelSourcePojo
|
|
3828
4133
|
* @public
|
3829
4134
|
*/
|
3830
4135
|
export declare type VodExternalSource = {
|
3831
|
-
new (
|
4136
|
+
new (url: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
|
3832
4137
|
type: 'vod_external';
|
3833
4138
|
description: string;
|
3834
4139
|
name: string;
|
3835
|
-
|
4140
|
+
url: string;
|
3836
4141
|
};
|
3837
4142
|
|
3838
4143
|
/**
|
3839
4144
|
* @public
|
3840
4145
|
*/
|
3841
4146
|
export declare type VodTivioSource = {
|
3842
|
-
new (
|
4147
|
+
new (url: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
|
3843
4148
|
type: 'vod_tivio';
|
3844
4149
|
description: string;
|
3845
4150
|
name: string;
|
3846
|
-
|
4151
|
+
url: string;
|
3847
4152
|
};
|
3848
4153
|
|
3849
4154
|
declare interface VodTivioSourcePojo {
|
@@ -3851,7 +4156,7 @@ declare interface VodTivioSourcePojo {
|
|
3851
4156
|
description: string;
|
3852
4157
|
path: string;
|
3853
4158
|
name: string;
|
3854
|
-
|
4159
|
+
url: string;
|
3855
4160
|
poster?: string;
|
3856
4161
|
adMonetizationId?: string;
|
3857
4162
|
availability: VideoAvailability | null;
|
@@ -3967,13 +4272,6 @@ export declare type WhereFilterArray = [string, WhereFilterOp, any];
|
|
3967
4272
|
|
3968
4273
|
declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
|
3969
4274
|
|
3970
|
-
export declare interface WidevineDrmConfiguration {
|
3971
|
-
/**
|
3972
|
-
* Url to send license to.
|
3973
|
-
*/
|
3974
|
-
widevineLicenseUrl: string;
|
3975
|
-
}
|
3976
|
-
|
3977
4275
|
/**
|
3978
4276
|
* @public
|
3979
4277
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "5.0.3-alpha-
|
3
|
+
"version": "5.0.3-alpha-5",
|
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.111",
|
37
37
|
"dayjs": "^1.11.0",
|
38
38
|
"es7-object-polyfill": "^1.0.1",
|
39
39
|
"firebase": "8.10.1",
|