@tivio/sdk-react 5.0.3-alpha-5 → 5.0.3-alpha-4
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 +0 -6
- package/README.md.bak +0 -6
- package/dist/index.d.ts +65 -363
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +65 -363
- 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 (uri: 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
|
+
uri: string;
|
100
100
|
durationMs: number;
|
101
101
|
skipDelayMs: number | null;
|
102
102
|
type: 'ad';
|
@@ -316,22 +316,6 @@ 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
|
-
|
335
319
|
/**
|
336
320
|
* rejects when bundle is not available
|
337
321
|
* @public
|
@@ -362,14 +346,11 @@ export declare interface Channel {
|
|
362
346
|
recentVideos: Video[];
|
363
347
|
}
|
364
348
|
|
365
|
-
/**
|
366
|
-
* @public
|
367
|
-
*/
|
368
349
|
export declare type ChannelSource = {
|
369
|
-
new (
|
350
|
+
new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
|
370
351
|
description: string;
|
371
352
|
name: string;
|
372
|
-
|
353
|
+
uri: string;
|
373
354
|
from: Date;
|
374
355
|
channelName: string;
|
375
356
|
to: Date;
|
@@ -384,7 +365,7 @@ export declare type ChannelSource = {
|
|
384
365
|
*/
|
385
366
|
export declare interface ChannelSourcePojo {
|
386
367
|
type: 'ChannelSource';
|
387
|
-
|
368
|
+
uri: string;
|
388
369
|
originalOptions: any;
|
389
370
|
channelName: string;
|
390
371
|
programName: string;
|
@@ -771,38 +752,11 @@ export declare type DocumentOptions = Partial<{
|
|
771
752
|
}>;
|
772
753
|
|
773
754
|
export declare interface Drm {
|
774
|
-
|
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 {
|
755
|
+
configuration: FairplayDrmConfiguration | PlayreadyDrmConfiguration | WidevineDrmConfiguration;
|
792
756
|
/**
|
793
|
-
*
|
794
|
-
*
|
795
|
-
* https://streamonline.pl
|
757
|
+
* License string
|
796
758
|
*/
|
797
|
-
|
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"
|
759
|
+
license: string;
|
806
760
|
}
|
807
761
|
|
808
762
|
/**
|
@@ -821,76 +775,6 @@ export declare enum DurationUnits {
|
|
821
775
|
MONTH = "month"
|
822
776
|
}
|
823
777
|
|
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
|
-
|
894
778
|
/**
|
895
779
|
* @public
|
896
780
|
*/
|
@@ -917,6 +801,17 @@ export declare type ExternalTvConfig = {
|
|
917
801
|
splashScreenBackgroundColor?: string;
|
918
802
|
};
|
919
803
|
|
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
|
+
|
920
815
|
/**
|
921
816
|
* @throws if fetch fails
|
922
817
|
* @public
|
@@ -1508,22 +1403,6 @@ export declare type NewVoucher = {
|
|
1508
1403
|
expirationDate: Date | number;
|
1509
1404
|
};
|
1510
1405
|
|
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
|
-
|
1527
1406
|
/**
|
1528
1407
|
* @public
|
1529
1408
|
*/
|
@@ -1653,9 +1532,9 @@ export declare type Player = {
|
|
1653
1532
|
* @public
|
1654
1533
|
*/
|
1655
1534
|
export declare interface PlayerCapability {
|
1656
|
-
codec:
|
1657
|
-
encryption:
|
1658
|
-
protocol:
|
1535
|
+
codec: 'h264' | 'h265';
|
1536
|
+
encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
|
1537
|
+
protocol: 'dash' | 'hls' | 'mp4';
|
1659
1538
|
}
|
1660
1539
|
|
1661
1540
|
/**
|
@@ -1717,135 +1596,6 @@ export declare type PlayerConfig = {
|
|
1717
1596
|
};
|
1718
1597
|
};
|
1719
1598
|
|
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
|
-
|
1849
1599
|
/**
|
1850
1600
|
* @public
|
1851
1601
|
*/
|
@@ -1903,10 +1653,7 @@ export declare type PlayerProviderProps = {
|
|
1903
1653
|
playerWrapperId?: string;
|
1904
1654
|
};
|
1905
1655
|
|
1906
|
-
|
1907
|
-
* @public
|
1908
|
-
*/
|
1909
|
-
export declare type PlayerState = 'idle' | 'playing' | 'paused';
|
1656
|
+
declare type PlayerState = 'playing' | 'paused' | 'idle';
|
1910
1657
|
|
1911
1658
|
/**
|
1912
1659
|
* @public
|
@@ -2002,6 +1749,13 @@ export declare enum PlayerWrapperEventType {
|
|
2002
1749
|
*/
|
2003
1750
|
export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
|
2004
1751
|
|
1752
|
+
export declare interface PlayreadyDrmConfiguration {
|
1753
|
+
/**
|
1754
|
+
* Url to send license to.
|
1755
|
+
*/
|
1756
|
+
playreadyLicenseUrl: string;
|
1757
|
+
}
|
1758
|
+
|
2005
1759
|
/**
|
2006
1760
|
* @public
|
2007
1761
|
*/
|
@@ -2053,10 +1807,6 @@ export declare interface PurchasableMonetization extends Monetization {
|
|
2053
1807
|
* If not set or set to false, users cannot buy it as a voucher.
|
2054
1808
|
*/
|
2055
1809
|
isPurchasableAsVoucher?: boolean;
|
2056
|
-
/**
|
2057
|
-
* Returns array of tag ids of monetization placements
|
2058
|
-
*/
|
2059
|
-
tagIds: string[];
|
2060
1810
|
}
|
2061
1811
|
|
2062
1812
|
/**
|
@@ -2119,11 +1869,6 @@ export declare type PurchaseEndpointPayload = {
|
|
2119
1869
|
* Two-letter upper-case country code according to ISO-3166 format (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
|
2120
1870
|
*/
|
2121
1871
|
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;
|
2127
1872
|
/**
|
2128
1873
|
* Gateway name or "voucher".
|
2129
1874
|
*/
|
@@ -2133,21 +1878,21 @@ export declare type PurchaseEndpointPayload = {
|
|
2133
1878
|
*/
|
2134
1879
|
id: string;
|
2135
1880
|
/**
|
2136
|
-
*
|
1881
|
+
* Timestamp of the last change of the purchase - in this case it is timestamp when it was paid.
|
2137
1882
|
*/
|
2138
|
-
|
1883
|
+
updated: number;
|
2139
1884
|
/**
|
2140
|
-
*
|
1885
|
+
* True if delayed payment is confirmed but not charged yet, undefined in all other cases.
|
2141
1886
|
*/
|
2142
|
-
|
1887
|
+
isDelayedPayment?: boolean;
|
2143
1888
|
/**
|
2144
1889
|
* Purchase status before change.
|
2145
1890
|
*/
|
2146
1891
|
previousStatus: PurchaseStatus;
|
2147
1892
|
/**
|
2148
|
-
*
|
1893
|
+
* Purchase status after change.
|
2149
1894
|
*/
|
2150
|
-
|
1895
|
+
newStatus: PurchaseStatus;
|
2151
1896
|
};
|
2152
1897
|
/**
|
2153
1898
|
* Information about the monetization which has been bought by this purchase. Monetization definition may change in time so information provided here
|
@@ -2975,7 +2720,6 @@ export declare type TivioComponents = {
|
|
2975
2720
|
WebTile: React_2.ComponentType<{
|
2976
2721
|
item?: ItemsInRow;
|
2977
2722
|
} & TilePropsPartial>;
|
2978
|
-
ChannelContext: React_2.Context<TvChannel | undefined>;
|
2979
2723
|
};
|
2980
2724
|
|
2981
2725
|
/**
|
@@ -3102,7 +2846,6 @@ export declare type TivioHooks = {
|
|
3102
2846
|
inviteCodeReset: () => void;
|
3103
2847
|
};
|
3104
2848
|
useChannelSource: UseChannelSource;
|
3105
|
-
useTvChannel: UseTvChannel;
|
3106
2849
|
};
|
3107
2850
|
|
3108
2851
|
/**
|
@@ -3144,7 +2887,7 @@ export declare type TivioInternalHooks = {
|
|
3144
2887
|
usePurchasesWithVideos: () => {
|
3145
2888
|
purchases: Purchase[];
|
3146
2889
|
};
|
3147
|
-
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean
|
2890
|
+
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean) => {
|
3148
2891
|
subscriptions: PurchasableMonetization[];
|
3149
2892
|
};
|
3150
2893
|
useIsMonetizationPurchased: () => {
|
@@ -3220,7 +2963,7 @@ export declare type TivioJsBundleExposedApi = {
|
|
3220
2963
|
* @param id - player wrapper id
|
3221
2964
|
* @returns {Player} player wrapper instance
|
3222
2965
|
*/
|
3223
|
-
|
2966
|
+
getPlayer: (id: string) => Player;
|
3224
2967
|
/**
|
3225
2968
|
* Get tv channel by its id.
|
3226
2969
|
* @param tvChannelId - tv channel id
|
@@ -3429,20 +3172,6 @@ export declare interface TopWatchItem {
|
|
3429
3172
|
viewCount: number;
|
3430
3173
|
}
|
3431
3174
|
|
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
|
-
|
3446
3175
|
declare type TransactionInfo = {
|
3447
3176
|
type: 'transaction';
|
3448
3177
|
name: string;
|
@@ -3459,8 +3188,6 @@ export declare type Translation = {
|
|
3459
3188
|
[key in LangCode]?: string;
|
3460
3189
|
};
|
3461
3190
|
|
3462
|
-
export declare type TriggerType = 'scheduled' | 'manual';
|
3463
|
-
|
3464
3191
|
/**
|
3465
3192
|
* @public
|
3466
3193
|
*/
|
@@ -3475,13 +3202,11 @@ export declare type TvAppProps = {
|
|
3475
3202
|
export declare interface TvChannel extends RowItem {
|
3476
3203
|
id: string;
|
3477
3204
|
itemType: ROW_ITEM_TYPES.TV_CHANNEL;
|
3478
|
-
type?: TvChannelType;
|
3479
3205
|
name: string;
|
3480
3206
|
path: string;
|
3481
3207
|
country?: string;
|
3482
3208
|
filters: string[];
|
3483
3209
|
logo?: string;
|
3484
|
-
logoPendingOverlayWidth?: string;
|
3485
3210
|
hls: string;
|
3486
3211
|
dash: string;
|
3487
3212
|
/**
|
@@ -3498,18 +3223,7 @@ export declare interface TvChannel extends RowItem {
|
|
3498
3223
|
price: number;
|
3499
3224
|
cover: string;
|
3500
3225
|
isPlayable: boolean;
|
3501
|
-
|
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"
|
3226
|
+
uri: string;
|
3513
3227
|
}
|
3514
3228
|
|
3515
3229
|
export declare interface TvProgram {
|
@@ -3517,7 +3231,7 @@ export declare interface TvProgram {
|
|
3517
3231
|
to: Date | null;
|
3518
3232
|
name: string;
|
3519
3233
|
description: string;
|
3520
|
-
|
3234
|
+
uri: string;
|
3521
3235
|
image: string;
|
3522
3236
|
video: Video | null;
|
3523
3237
|
}
|
@@ -3687,6 +3401,16 @@ export declare const useOrganizationSubscriptions: (onlyPurchasableSubscriptions
|
|
3687
3401
|
subscriptions: PurchasableMonetization[];
|
3688
3402
|
};
|
3689
3403
|
|
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
|
+
|
3690
3414
|
/**
|
3691
3415
|
* Is used to mark purchase in recovery state as PAID.
|
3692
3416
|
*
|
@@ -3759,12 +3483,6 @@ export declare type User = {
|
|
3759
3483
|
setActiveUserProfileId: (id: string) => void;
|
3760
3484
|
};
|
3761
3485
|
|
3762
|
-
export declare enum UserGroup {
|
3763
|
-
ALL = "all",
|
3764
|
-
FREE = "free",
|
3765
|
-
PREMIUM = "premium"
|
3766
|
-
}
|
3767
|
-
|
3768
3486
|
/**
|
3769
3487
|
* @public
|
3770
3488
|
*/
|
@@ -3991,6 +3709,7 @@ export declare interface Video extends RowItem {
|
|
3991
3709
|
urlName?: string;
|
3992
3710
|
price: number | null;
|
3993
3711
|
detailedPrice: DetailedPrice | null;
|
3712
|
+
uri: string;
|
3994
3713
|
url: string;
|
3995
3714
|
adMonetizationId?: string;
|
3996
3715
|
from?: Date;
|
@@ -4012,7 +3731,7 @@ export declare interface Video extends RowItem {
|
|
4012
3731
|
removeFromFavorites: () => void;
|
4013
3732
|
availability: VideoAvailability | null;
|
4014
3733
|
sourceLanguages: LangCode[];
|
4015
|
-
|
3734
|
+
uriByLanguage: (lang: LangCode) => string | undefined;
|
4016
3735
|
}
|
4017
3736
|
|
4018
3737
|
/**
|
@@ -4043,29 +3762,6 @@ export declare type VideoExternals = JojExternals | MallTvExternals | OktagonExt
|
|
4043
3762
|
|
4044
3763
|
declare type VideoPath = string;
|
4045
3764
|
|
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
|
-
|
4069
3765
|
/**
|
4070
3766
|
* Video type.
|
4071
3767
|
* @public
|
@@ -4123,9 +3819,8 @@ export declare interface ViewCountItem {
|
|
4123
3819
|
/**
|
4124
3820
|
* @public
|
4125
3821
|
*/
|
4126
|
-
export declare interface VirtualChannelSourcePojo {
|
3822
|
+
export declare interface VirtualChannelSourcePojo extends Omit<ChannelSourcePojo, 'type'> {
|
4127
3823
|
type: 'VirtualChannelSource';
|
4128
|
-
tvChannel: TvChannel;
|
4129
3824
|
epg: TvProgram[];
|
4130
3825
|
}
|
4131
3826
|
|
@@ -4133,22 +3828,22 @@ export declare interface VirtualChannelSourcePojo {
|
|
4133
3828
|
* @public
|
4134
3829
|
*/
|
4135
3830
|
export declare type VodExternalSource = {
|
4136
|
-
new (
|
3831
|
+
new (uri: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
|
4137
3832
|
type: 'vod_external';
|
4138
3833
|
description: string;
|
4139
3834
|
name: string;
|
4140
|
-
|
3835
|
+
uri: string;
|
4141
3836
|
};
|
4142
3837
|
|
4143
3838
|
/**
|
4144
3839
|
* @public
|
4145
3840
|
*/
|
4146
3841
|
export declare type VodTivioSource = {
|
4147
|
-
new (
|
3842
|
+
new (uri: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
|
4148
3843
|
type: 'vod_tivio';
|
4149
3844
|
description: string;
|
4150
3845
|
name: string;
|
4151
|
-
|
3846
|
+
uri: string;
|
4152
3847
|
};
|
4153
3848
|
|
4154
3849
|
declare interface VodTivioSourcePojo {
|
@@ -4156,7 +3851,7 @@ declare interface VodTivioSourcePojo {
|
|
4156
3851
|
description: string;
|
4157
3852
|
path: string;
|
4158
3853
|
name: string;
|
4159
|
-
|
3854
|
+
uri: string;
|
4160
3855
|
poster?: string;
|
4161
3856
|
adMonetizationId?: string;
|
4162
3857
|
availability: VideoAvailability | null;
|
@@ -4272,6 +3967,13 @@ export declare type WhereFilterArray = [string, WhereFilterOp, any];
|
|
4272
3967
|
|
4273
3968
|
declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
|
4274
3969
|
|
3970
|
+
export declare interface WidevineDrmConfiguration {
|
3971
|
+
/**
|
3972
|
+
* Url to send license to.
|
3973
|
+
*/
|
3974
|
+
widevineLicenseUrl: string;
|
3975
|
+
}
|
3976
|
+
|
4275
3977
|
/**
|
4276
3978
|
* @public
|
4277
3979
|
*/
|
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-4",
|
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.109",
|
37
37
|
"dayjs": "^1.11.0",
|
38
38
|
"es7-object-polyfill": "^1.0.1",
|
39
39
|
"firebase": "8.10.1",
|