@tivio/sdk-react 9.1.4 → 9.1.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 +2 -0
- package/README.md.bak +2 -0
- package/dist/index.d.ts +220 -184
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +224 -184
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import { ComponentType } from 'react';
|
2
2
|
import type dayjs from 'dayjs';
|
3
3
|
import { DocumentReference } from '@firebase/firestore-types';
|
4
4
|
import type duration from 'dayjs/plugin/duration';
|
5
|
-
import type
|
5
|
+
import type { default as firebase_2 } from '@firebase/app-types';
|
6
|
+
import type { default as firebase_3 } from 'firebase';
|
6
7
|
import { FunctionComponentElement } from 'react';
|
7
8
|
import type { GeoPoint } from '@firebase/firestore-types';
|
8
9
|
import { OperatingSystem } from 'detect-browser';
|
@@ -11,15 +12,21 @@ import { default as React_2 } from 'react';
|
|
11
12
|
import { RecommendationsQuery } from '@algolia/recommend';
|
12
13
|
import type { TagManagerArgs } from 'react-gtm-module';
|
13
14
|
|
14
|
-
export declare interface
|
15
|
+
export declare interface ActivatedPromotion {
|
15
16
|
id: string;
|
16
17
|
isFree: boolean;
|
17
18
|
videoId?: string;
|
18
19
|
}
|
19
20
|
|
20
|
-
export declare
|
21
|
-
activatedPromotions:
|
22
|
-
}
|
21
|
+
export declare interface ActivatedPromotionsResponse {
|
22
|
+
activatedPromotions: ActivatedPromotion[];
|
23
|
+
}
|
24
|
+
|
25
|
+
export declare interface ActivatedPromotionsWithIdsResponse {
|
26
|
+
activatedPromotionsIds: string[];
|
27
|
+
}
|
28
|
+
|
29
|
+
export declare type ActivateVoucherResponse = string | ActivatedPromotionsResponse | ActivatedPromotionsWithIdsResponse;
|
23
30
|
|
24
31
|
export declare type AdBannerScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.AD_BANNER>;
|
25
32
|
|
@@ -273,10 +280,6 @@ export declare enum ALGOLIA_INDEX_NAME {
|
|
273
280
|
TV_CHANNELS = "tvChannels"
|
274
281
|
}
|
275
282
|
|
276
|
-
export declare interface AllStargazeCreatorsWithVoucherSubscriptionsResponse {
|
277
|
-
creators: CreatorsWithVoucherSubscriptions[];
|
278
|
-
}
|
279
|
-
|
280
283
|
/**
|
281
284
|
* List of conversion types that we send to analytics.
|
282
285
|
*/
|
@@ -416,6 +419,7 @@ export declare interface Article extends RowItem, MonetizableItem, ReactableCont
|
|
416
419
|
|
417
420
|
/**
|
418
421
|
* @public
|
422
|
+
* TODO this should union separated by article type, this way we don't need optional attributes
|
419
423
|
*/
|
420
424
|
export declare interface ArticleBlock {
|
421
425
|
id: string;
|
@@ -438,6 +442,45 @@ export declare interface ArticleBlockField extends Omit<ArticleBlock, 'textConte
|
|
438
442
|
*/
|
439
443
|
export declare type ArticleBlockType = 'PARAGRAPH' | 'IMAGE' | 'VIDEO' | 'HEADING' | 'PAYWALL' | 'BLOCK_QUOTE';
|
440
444
|
|
445
|
+
/**
|
446
|
+
* Serialized version of {@link ArticleDocument} from @tivio/firebase.
|
447
|
+
* TODO duplicity with mentioned type, because we can't import firebase here.
|
448
|
+
*/
|
449
|
+
declare interface ArticleDocumentSerialized {
|
450
|
+
type: 'ARTICLE';
|
451
|
+
name: Translation;
|
452
|
+
description?: Translation;
|
453
|
+
metadata?: ArticleMetadata;
|
454
|
+
assets?: AssetsField;
|
455
|
+
feedVisible?: boolean;
|
456
|
+
publishedStatus?: PublishedStatus;
|
457
|
+
reactions?: ReactionsField;
|
458
|
+
availability?: {
|
459
|
+
/**
|
460
|
+
* Unix timestamp in ms.
|
461
|
+
*/
|
462
|
+
from: number;
|
463
|
+
/**
|
464
|
+
* Unix timestamp in ms.
|
465
|
+
*/
|
466
|
+
to: number | null;
|
467
|
+
manual: boolean;
|
468
|
+
};
|
469
|
+
/**
|
470
|
+
* Unix timestamp in ms.
|
471
|
+
*/
|
472
|
+
created: number;
|
473
|
+
organizationId: string;
|
474
|
+
tagPaths?: string[];
|
475
|
+
monetizations?: TileMonetizationData[];
|
476
|
+
seriesPath?: string;
|
477
|
+
blocks: ArticleBlockField[] | undefined;
|
478
|
+
}
|
479
|
+
|
480
|
+
export declare interface ArticleMetadata {
|
481
|
+
survey?: Survey;
|
482
|
+
}
|
483
|
+
|
441
484
|
export declare interface ArticleTileSpecificData {
|
442
485
|
organizationId: string;
|
443
486
|
blocks: ArticleBlockField[];
|
@@ -691,6 +734,7 @@ export declare interface CommonSourceInterface<T extends SourceType = SourceType
|
|
691
734
|
next: CommonSource | null;
|
692
735
|
canSeek: boolean;
|
693
736
|
hasNext: boolean;
|
737
|
+
isCastable: boolean;
|
694
738
|
isFinished: boolean;
|
695
739
|
setIsFinished(isFinished: boolean): void;
|
696
740
|
isStarted: boolean;
|
@@ -709,6 +753,8 @@ export declare interface CommonSourceParams<T extends SourceType = SourceType> {
|
|
709
753
|
name?: string;
|
710
754
|
description?: string;
|
711
755
|
autoplay?: boolean;
|
756
|
+
isCastable?: boolean;
|
757
|
+
videoPath?: string;
|
712
758
|
}
|
713
759
|
|
714
760
|
/**
|
@@ -967,9 +1013,10 @@ export declare const createPubSub: () => PubSub;
|
|
967
1013
|
*/
|
968
1014
|
export declare const createRemotePackageLoader: () => (secret: string, conf: InternalConfig, checkBundleCharCount?: boolean) => Promise<TivioBundle>;
|
969
1015
|
|
970
|
-
|
971
|
-
|
972
|
-
|
1016
|
+
/**
|
1017
|
+
* @public
|
1018
|
+
*/
|
1019
|
+
export declare const createUseRemoteBundle: () => (conf: InternalConfig, checkBundleCharCount?: boolean) => RemoteBundleState;
|
973
1020
|
|
974
1021
|
export declare interface CreateUserPayload {
|
975
1022
|
displayName?: string;
|
@@ -1078,7 +1125,8 @@ export declare enum CustomerId {
|
|
1078
1125
|
DAVID_FRANK_TV = "DAVID_FRANK_TV",
|
1079
1126
|
LEPSI_UZ_TO_NEBUDE = "LEPSI_UZ_TO_NEBUDE",
|
1080
1127
|
BEAT_SEXISM = "BEAT_SEXISM",
|
1081
|
-
KAROL_A_KVIDO = "KAROL_A_KVIDO"
|
1128
|
+
KAROL_A_KVIDO = "KAROL_A_KVIDO",
|
1129
|
+
UZ_BUDU = "UZ_BUDU"
|
1082
1130
|
}
|
1083
1131
|
|
1084
1132
|
export declare interface CustomScript {
|
@@ -1321,7 +1369,7 @@ export declare interface EmailTemplateVersion {
|
|
1321
1369
|
|
1322
1370
|
export declare type EmbedScreenMessageNavigateType = {
|
1323
1371
|
type: EmbedScreenMessageType.NAVIGATE;
|
1324
|
-
to: string | 'Profile' | 'Home' | 'Search' | 'Video' | 'Series' | 'Subscription';
|
1372
|
+
to: string | 'Profile' | 'Home' | 'Search' | 'Video' | 'Series' | 'Subscription' | 'Handle';
|
1325
1373
|
value?: string;
|
1326
1374
|
};
|
1327
1375
|
|
@@ -1418,7 +1466,8 @@ export declare interface ForbiddenOnCallError extends GenericOnCallError {
|
|
1418
1466
|
|
1419
1467
|
export declare enum ForbiddenReason {
|
1420
1468
|
MONETIZATION = "MONETIZATION",
|
1421
|
-
GEO_BLOCKING = "GEO_BLOCKING"
|
1469
|
+
GEO_BLOCKING = "GEO_BLOCKING",
|
1470
|
+
UNSUPPORTED_BROWSER = "UNSUPPORTED_BROWSER"
|
1422
1471
|
}
|
1423
1472
|
|
1424
1473
|
/**
|
@@ -1452,6 +1501,15 @@ export declare type GeoBlocking = {
|
|
1452
1501
|
blacklist: Array<any>;
|
1453
1502
|
};
|
1454
1503
|
|
1504
|
+
export declare interface GetArticleRequest {
|
1505
|
+
id: string;
|
1506
|
+
}
|
1507
|
+
|
1508
|
+
export declare interface GetArticleResponse {
|
1509
|
+
article: ArticleDocumentSerialized;
|
1510
|
+
isBlockedByPurchase: boolean;
|
1511
|
+
}
|
1512
|
+
|
1455
1513
|
export declare interface GetBaseAnalyticsRequest {
|
1456
1514
|
/**
|
1457
1515
|
* Id of organization to return analytics data.
|
@@ -1469,6 +1527,10 @@ export declare interface GetBaseAnalyticsRequest {
|
|
1469
1527
|
|
1470
1528
|
export declare type GetConversionAnalyticsRequest = GetBaseAnalyticsRequest;
|
1471
1529
|
|
1530
|
+
export declare interface GetCreatorsWithVoucherResponse {
|
1531
|
+
creators: CreatorsWithVoucherSubscriptions[];
|
1532
|
+
}
|
1533
|
+
|
1472
1534
|
export declare type GetMonetizationsAnalyticsRequest = GetBaseAnalyticsRequest;
|
1473
1535
|
|
1474
1536
|
export declare interface GetMonetizationsAnalyticsResponse {
|
@@ -1584,6 +1646,10 @@ export declare interface GetSourceUrlResponse {
|
|
1584
1646
|
* Returns url to manifest with audio only chunks.
|
1585
1647
|
*/
|
1586
1648
|
audioOnly?: boolean;
|
1649
|
+
/**
|
1650
|
+
* In case of HYBRID mode, this field will contain the start date of the live stream in UNIX timestamp format.
|
1651
|
+
*/
|
1652
|
+
from?: number;
|
1587
1653
|
/**
|
1588
1654
|
* Current session id for given user and source.
|
1589
1655
|
*/
|
@@ -1592,6 +1658,10 @@ export declare interface GetSourceUrlResponse {
|
|
1592
1658
|
* Template for generating image previews for user scrubbing in player.
|
1593
1659
|
*/
|
1594
1660
|
seekingMatrix?: SeekingMatrixTemplate;
|
1661
|
+
/**
|
1662
|
+
* Determines session type generated for source. If no provided it will be considered 'ondemand' session type.
|
1663
|
+
*/
|
1664
|
+
sessionType?: VideoSourceField['sessionType'];
|
1595
1665
|
}
|
1596
1666
|
|
1597
1667
|
export declare type GetTilesInRowResponse<U extends NextPageParamType = NextPageParamType> = PaginatedResponse<TileData, U>;
|
@@ -1665,8 +1735,6 @@ export declare interface GetViewAnalyticsResponse {
|
|
1665
1735
|
|
1666
1736
|
export declare type GetViewsAnalyticsRequest = GetBaseAnalyticsRequest;
|
1667
1737
|
|
1668
|
-
export declare let globalSdkReactConfig: SdkReactConfig | undefined;
|
1669
|
-
|
1670
1738
|
/**
|
1671
1739
|
* @public
|
1672
1740
|
*/
|
@@ -1740,11 +1808,19 @@ export declare interface IndexedTvChannel extends IndexedObject {
|
|
1740
1808
|
* @public
|
1741
1809
|
*/
|
1742
1810
|
export declare interface IndexedVideo extends IndexedObject {
|
1743
|
-
assets
|
1811
|
+
assets?: AssetsField;
|
1744
1812
|
organizationPath: string;
|
1745
1813
|
sharedOrganizationPaths?: string[];
|
1746
1814
|
tagPaths?: string[];
|
1747
1815
|
created: Date | string;
|
1816
|
+
/**
|
1817
|
+
* Unix timestamp in seconds. This is standard date format for algolia records.
|
1818
|
+
*
|
1819
|
+
* @deprecated this is temporary workaround, the correct way is to migrate {@link created} to this format,
|
1820
|
+
* but before we need to adjust admin and front end applications to parse this format.
|
1821
|
+
* Do not read from this field when parsing response in front end applications, use {@link created} instead.
|
1822
|
+
*/
|
1823
|
+
createdUnixTimestamp: number;
|
1748
1824
|
/**
|
1749
1825
|
* Is evaluated on publishedStatus and transcodingStatus fields.
|
1750
1826
|
* TODO this will be true for videos with UNLISTED status, which is unintuitive for 'isDraft', we need to rename this
|
@@ -1757,6 +1833,7 @@ export declare interface IndexedVideo extends IndexedObject {
|
|
1757
1833
|
publishedStatus?: PublishedStatus;
|
1758
1834
|
type: VideoType;
|
1759
1835
|
contentType?: VideoContentType;
|
1836
|
+
defaultName: string;
|
1760
1837
|
name: string | Translation;
|
1761
1838
|
description: string | Translation;
|
1762
1839
|
hide: boolean;
|
@@ -2064,7 +2141,15 @@ export declare type LeaderboardScene = InteractiveWidgetSceneBase<InteractiveWid
|
|
2064
2141
|
*/
|
2065
2142
|
export declare interface LinkedVideo {
|
2066
2143
|
video: Video;
|
2067
|
-
type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD' | 'TEASER' | 'TASTING' | 'VIRTUAL_PROGRAM' | '
|
2144
|
+
type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD' | 'TEASER' | 'TASTING' | 'VIRTUAL_PROGRAM' | 'LANGUAGE'
|
2145
|
+
/**
|
2146
|
+
* Will render separate mini-player on top of the main one, playing given video.
|
2147
|
+
*/
|
2148
|
+
| 'PIP'
|
2149
|
+
/**
|
2150
|
+
* Will not render separate player, it will override main video source.
|
2151
|
+
*/
|
2152
|
+
| 'COMPOSED_PIP';
|
2068
2153
|
}
|
2069
2154
|
|
2070
2155
|
/**
|
@@ -2700,6 +2785,7 @@ export declare interface OrganizationSettingsField extends OrganizationResponsiv
|
|
2700
2785
|
hideTitle?: boolean;
|
2701
2786
|
};
|
2702
2787
|
};
|
2788
|
+
voucher?: VoucherPageConfiguration;
|
2703
2789
|
}
|
2704
2790
|
|
2705
2791
|
/**
|
@@ -2804,6 +2890,15 @@ export declare type PatreonUserResponse = {
|
|
2804
2890
|
errors?: PatreonError[];
|
2805
2891
|
};
|
2806
2892
|
|
2893
|
+
/**
|
2894
|
+
* @public
|
2895
|
+
*/
|
2896
|
+
export declare interface PaymentInfo {
|
2897
|
+
webPaymentGatewayLink?: string;
|
2898
|
+
gatewayUri?: string;
|
2899
|
+
paymentQRCodeUri?: string;
|
2900
|
+
}
|
2901
|
+
|
2807
2902
|
/**
|
2808
2903
|
* @public
|
2809
2904
|
*/
|
@@ -2927,7 +3022,7 @@ export declare interface PlayerEngineConfig {
|
|
2927
3022
|
/**
|
2928
3023
|
* @public
|
2929
3024
|
*/
|
2930
|
-
export declare type PlayerEngineEvent = 'bufferingchange' | 'bufferedinfochange' | 'statechange' | 'loaded' | 'loadfailed' | 'togglefullscreen' | 'durationchange' | 'busychange' | 'trackschanged' | 'abort' | 'canplay' | 'canplaythrough' | 'emptied' | 'enginedurationchange' | 'enginetimeupdate' | 'ended' | 'error' | 'loadeddata' | 'loadedmetadata' | 'loadstart' | 'pause' | 'play' | 'playing' | 'progress' | 'ratechange' | 'seeked' | 'seeking' | 'stalled' | 'suspend' | 'timeupdate' | 'volumechange' | 'waiting' | 'click' | 'fullscreenchange';
|
3025
|
+
export declare type PlayerEngineEvent = 'bufferingchange' | 'bufferedinfochange' | 'statechange' | 'loaded' | 'loadfailed' | 'togglefullscreen' | 'durationchange' | 'busychange' | 'trackschanged' | 'abort' | 'canplay' | 'canplaythrough' | 'emptied' | 'adaptation' | 'buffering' | 'enginedurationchange' | 'enginestartrange' | 'enginetimeupdate' | 'ended' | 'error' | 'loadeddata' | 'loadedmetadata' | 'loadstart' | 'pause' | 'play' | 'playing' | 'progress' | 'ratechange' | 'seeked' | 'seeking' | 'stalled' | 'suspend' | 'timeupdate' | 'variantchanged' | 'volumechange' | 'waiting' | 'click' | 'fullscreenchange' | 'iscastingchanged';
|
2931
3026
|
|
2932
3027
|
/**
|
2933
3028
|
* @public
|
@@ -3050,21 +3145,11 @@ export declare interface PlayerEngineOptions {
|
|
3050
3145
|
}
|
3051
3146
|
|
3052
3147
|
export declare interface PlayerError {
|
3148
|
+
detail?: ShakaErrorDetail;
|
3053
3149
|
message: string;
|
3150
|
+
timestamp: number;
|
3054
3151
|
}
|
3055
3152
|
|
3056
|
-
/**
|
3057
|
-
* @public
|
3058
|
-
*/
|
3059
|
-
export declare type PlayerEvent = {
|
3060
|
-
name: PlayerEventName;
|
3061
|
-
};
|
3062
|
-
|
3063
|
-
/**
|
3064
|
-
* @public
|
3065
|
-
*/
|
3066
|
-
export declare type PlayerEventName = `${PlayerWrapperEvents}`;
|
3067
|
-
|
3068
3153
|
/**
|
3069
3154
|
* @public
|
3070
3155
|
*/
|
@@ -3192,7 +3277,12 @@ export declare interface PlayerSourceInterface<T extends NonAdSourceType = NonAd
|
|
3192
3277
|
pauseReactions(): void;
|
3193
3278
|
correctStartPosition(): Promise<void | null>;
|
3194
3279
|
setCanSeek(canSeek: boolean): void;
|
3280
|
+
getOffset(): number;
|
3281
|
+
getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex?: number): SeekingMatrix | null;
|
3195
3282
|
originalOptions: Record<string, any>;
|
3283
|
+
start?: Date;
|
3284
|
+
from?: Date;
|
3285
|
+
sourceHistory?: string[];
|
3196
3286
|
}
|
3197
3287
|
|
3198
3288
|
/**
|
@@ -3205,6 +3295,10 @@ export declare interface PlayerSourceParams<T extends NonAdSourceType = NonAdSou
|
|
3205
3295
|
language?: LangCode | null;
|
3206
3296
|
availableLanguages?: LangCode[] | null;
|
3207
3297
|
sourcePlayMode: SourcePlayMode;
|
3298
|
+
start?: Date;
|
3299
|
+
from?: Date;
|
3300
|
+
sourceHistory?: string[];
|
3301
|
+
seekingMatrix?: SeekingMatrixTemplate;
|
3208
3302
|
}
|
3209
3303
|
|
3210
3304
|
export declare type PlayersScene = InteractiveWidgetSceneBase<InteractiveWidgetSceneTemplateType.PLAYERS>;
|
@@ -3250,19 +3344,11 @@ export declare interface PlayerWrapper {
|
|
3250
3344
|
* Pause video
|
3251
3345
|
*/
|
3252
3346
|
pause: () => void;
|
3253
|
-
ad: AdSourceInterface | null;
|
3254
|
-
adMetadata: AdMetadata | null;
|
3255
|
-
adSegment: AdSegment | null;
|
3256
|
-
availableLanguages: LangCode[] | null;
|
3257
|
-
canReplay: boolean;
|
3258
|
-
currentTime: number;
|
3259
3347
|
/**
|
3260
3348
|
* Currently playing source
|
3261
3349
|
*/
|
3262
3350
|
source: PlayerSource | null;
|
3263
|
-
seekInterceptor: SeekInterceptor;
|
3264
3351
|
events: EmitterInterface;
|
3265
|
-
event: PlayerEvent | null;
|
3266
3352
|
/**
|
3267
3353
|
* Register a low level player that implements player methods, like play video, change volume, etc.
|
3268
3354
|
*/
|
@@ -3270,29 +3356,14 @@ export declare interface PlayerWrapper {
|
|
3270
3356
|
/**
|
3271
3357
|
* duration of current source in ms (both setter and getter)
|
3272
3358
|
*/
|
3273
|
-
durationMs: number;
|
3274
|
-
intro: {
|
3275
|
-
marker: any;
|
3276
|
-
skip: () => void;
|
3277
|
-
} | null;
|
3278
|
-
isBuffering: boolean;
|
3279
|
-
isCurrentTimeLive: boolean;
|
3280
|
-
isLiveSeekingEnabled: boolean;
|
3281
|
-
isMuted: boolean;
|
3359
|
+
durationMs: number | null;
|
3282
3360
|
isPlaybackStarted?: boolean;
|
3283
3361
|
isPaused: boolean;
|
3284
3362
|
isPlaying: boolean;
|
3285
3363
|
isIdle: boolean;
|
3286
|
-
language: LangCode | null;
|
3287
|
-
nextRecommendedVideo: Video | null;
|
3288
|
-
prerollCheck: PrerollCheck;
|
3289
|
-
previousSource: PlayerSource | null;
|
3290
|
-
progress: number | null;
|
3291
|
-
progressMetadata: ProgressMetadata;
|
3292
|
-
requestedSource: PlayerSource | null;
|
3293
3364
|
error: PlayerError | null;
|
3294
|
-
|
3295
|
-
|
3365
|
+
playbackError: PlayerError | null;
|
3366
|
+
canPlay: boolean;
|
3296
3367
|
/**
|
3297
3368
|
* Replay the video that finished playback
|
3298
3369
|
*/
|
@@ -3307,56 +3378,14 @@ export declare interface PlayerWrapper {
|
|
3307
3378
|
* set volume to value between 0,1
|
3308
3379
|
*/
|
3309
3380
|
setVolume: (volume: number) => void;
|
3310
|
-
changeLanguage: (langCode: LangCode) => Promise<void>;
|
3311
3381
|
/**
|
3312
3382
|
* change volume by value between -1,1
|
3313
3383
|
*/
|
3314
3384
|
changeVolumeBy: (volume: number) => void;
|
3315
3385
|
setMuted: (muted: boolean) => void;
|
3386
|
+
setCanPlay: (canPlay: boolean) => void;
|
3316
3387
|
toggleMuted: () => void;
|
3317
|
-
|
3318
|
-
playNativeImaAd: (url: string) => void;
|
3319
|
-
playSourceAfterAdsRun: () => void;
|
3320
|
-
putAd: (ad: AdSourceInterface) => void;
|
3321
|
-
putAdMetadata: (ad: AdSourceInterface) => void;
|
3322
|
-
reportLoadError: (error: Error) => void;
|
3323
|
-
reportStateChanged: (state: PlayerState) => void;
|
3324
|
-
reportTimeProgress: (ms: number) => void;
|
3325
|
-
reportPlaybackCancelled: () => void;
|
3326
|
-
reportPlaybackError: (error: Error) => void;
|
3327
|
-
reportPlaybackEnded: () => void;
|
3328
|
-
seekToPercent: (percentage: number) => void;
|
3329
|
-
seekToInternal: (ms: number) => void;
|
3330
|
-
seekToLive: () => void;
|
3331
|
-
seekToLiveInternal: () => void;
|
3332
|
-
setIsBuffering: (isBuffering: boolean) => void;
|
3333
|
-
skipAd: () => void;
|
3334
|
-
skipAllAds: () => void;
|
3335
|
-
}
|
3336
|
-
|
3337
|
-
/**
|
3338
|
-
* @public
|
3339
|
-
*/
|
3340
|
-
export declare enum PlayerWrapperEvents {
|
3341
|
-
'playback_cancelled' = "playback_cancelled",
|
3342
|
-
/**
|
3343
|
-
* Triggered when content video or ad finished playing until the end
|
3344
|
-
*/
|
3345
|
-
'playback_ended' = "playback_ended",
|
3346
|
-
/**
|
3347
|
-
* Triggered when both content video and all its associated ads finished playing until the end.
|
3348
|
-
* Or in case of postroll, when content video finished playing unit the end and all postroll
|
3349
|
-
* ads either finished / failed or were skipped.
|
3350
|
-
*/
|
3351
|
-
'video_unit_ended' = "video_unit_ended",
|
3352
|
-
/**
|
3353
|
-
* Pause was triggered
|
3354
|
-
*/
|
3355
|
-
'pause_triggered' = "pause_triggered",
|
3356
|
-
/**
|
3357
|
-
* Un-pause was triggered
|
3358
|
-
*/
|
3359
|
-
'unpause_triggered' = "unpause_triggered"
|
3388
|
+
resetErrors(): void;
|
3360
3389
|
}
|
3361
3390
|
|
3362
3391
|
/**
|
@@ -3372,18 +3401,6 @@ export declare enum PlayerWrapperEventType {
|
|
3372
3401
|
*/
|
3373
3402
|
export declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
|
3374
3403
|
|
3375
|
-
/**
|
3376
|
-
* @public
|
3377
|
-
*/
|
3378
|
-
/**
|
3379
|
-
* A promise that ads will be loaded. Resolves to the first ad source,
|
3380
|
-
* other ads are linked to it via `ad.next` attribute.
|
3381
|
-
*
|
3382
|
-
* In case preroll is not configured or no ad
|
3383
|
-
* manages to load successfully, resolves to null.
|
3384
|
-
*/
|
3385
|
-
export declare type PrerollCheck = (source: PlayerSource) => Promise<AdSourceInterface | null>;
|
3386
|
-
|
3387
3404
|
/**
|
3388
3405
|
* Values that user entered in survey for given profile.
|
3389
3406
|
*/
|
@@ -3392,18 +3409,6 @@ export declare type ProfileSurvey = {
|
|
3392
3409
|
age?: AgeRange;
|
3393
3410
|
};
|
3394
3411
|
|
3395
|
-
/**
|
3396
|
-
* @public
|
3397
|
-
*/
|
3398
|
-
export declare interface ProgressMetadata {
|
3399
|
-
currentTimeMs: number;
|
3400
|
-
durationMs: number;
|
3401
|
-
percent: number;
|
3402
|
-
remainingMs: number;
|
3403
|
-
type: 'original' | 'cutout';
|
3404
|
-
cutout?: Cutout;
|
3405
|
-
}
|
3406
|
-
|
3407
3412
|
/**
|
3408
3413
|
* @public
|
3409
3414
|
*/
|
@@ -3516,6 +3521,11 @@ export declare type Purchase = {
|
|
3516
3521
|
createdBy?: string;
|
3517
3522
|
expirationDate: Date | null;
|
3518
3523
|
gateway: PurchaseDocumentGateway | null;
|
3524
|
+
/**
|
3525
|
+
* Returns how many times user has purchased a monetization in a row.
|
3526
|
+
* @returns number of purchases (loyalty points)
|
3527
|
+
*/
|
3528
|
+
getLoyaltyCount: () => Promise<number>;
|
3519
3529
|
id: string;
|
3520
3530
|
isExpired: boolean;
|
3521
3531
|
/**
|
@@ -3590,7 +3600,7 @@ export declare type PurchaseEndpointPayload = {
|
|
3590
3600
|
*/
|
3591
3601
|
expiration?: number;
|
3592
3602
|
/**
|
3593
|
-
*
|
3603
|
+
* If purchase was made outside of standard Tivio payment method (e.g PayPal), this is its ID.
|
3594
3604
|
*/
|
3595
3605
|
externalId?: string;
|
3596
3606
|
/**
|
@@ -3813,10 +3823,7 @@ export declare interface QerkoOverlayState {
|
|
3813
3823
|
* TODO more generic name, since we support stargaze payment gateway as well
|
3814
3824
|
* @public
|
3815
3825
|
*/
|
3816
|
-
export declare interface QerkoPaymentInfo {
|
3817
|
-
webPaymentGatewayLink?: string;
|
3818
|
-
gatewayUri?: string;
|
3819
|
-
paymentQRCodeUri?: string;
|
3826
|
+
export declare interface QerkoPaymentInfo extends PaymentInfo {
|
3820
3827
|
confirmationPaymentUrl?: string;
|
3821
3828
|
purchaseId: string;
|
3822
3829
|
currency: string;
|
@@ -3998,6 +4005,10 @@ export declare enum ReactionEnum {
|
|
3998
4005
|
AWW = "AWW"
|
3999
4006
|
}
|
4000
4007
|
|
4008
|
+
export declare type ReactionsField = {
|
4009
|
+
[reactionId in ReactionEnum]?: number;
|
4010
|
+
};
|
4011
|
+
|
4001
4012
|
/**
|
4002
4013
|
* @public
|
4003
4014
|
*/
|
@@ -4032,11 +4043,10 @@ declare type Relationship = {
|
|
4032
4043
|
* @public
|
4033
4044
|
*/
|
4034
4045
|
export declare type RemoteBundleState = {
|
4035
|
-
state: 'loading' | 'error' | 'ready';
|
4036
|
-
error: string | null;
|
4037
4046
|
config: InternalConfig;
|
4038
|
-
|
4039
|
-
|
4047
|
+
error: string | null;
|
4048
|
+
state: 'loading' | 'error' | 'ready';
|
4049
|
+
} & Nullable<TivioBundle>;
|
4040
4050
|
|
4041
4051
|
/**
|
4042
4052
|
* @public
|
@@ -4070,8 +4080,6 @@ export declare interface RenderConditionValue {
|
|
4070
4080
|
subscriptionRefs?: any[];
|
4071
4081
|
}
|
4072
4082
|
|
4073
|
-
export declare const renderWebPlayer: (container: HTMLElement, props: WebPlayerProps) => void;
|
4074
|
-
|
4075
4083
|
/**
|
4076
4084
|
* Make all attributes in given type required, non-nullable and defined.
|
4077
4085
|
* e.g. will make `{ attribute?: string | null }` to be `{ attribute: string }`
|
@@ -4554,26 +4562,6 @@ export declare interface SeekingMatrixTemplate {
|
|
4554
4562
|
interval: number;
|
4555
4563
|
}
|
4556
4564
|
|
4557
|
-
export declare interface SeekInterceptionResult {
|
4558
|
-
position: number | null;
|
4559
|
-
didChangePosition: boolean;
|
4560
|
-
priority: number;
|
4561
|
-
}
|
4562
|
-
|
4563
|
-
/**
|
4564
|
-
* @public
|
4565
|
-
*/
|
4566
|
-
export declare interface SeekInterceptor {
|
4567
|
-
addInterceptor(interceptor: SeekInterceptorFunction, callback?: SeekInterceptorCallback): void;
|
4568
|
-
applyInterceptors(currentPosition: number, seekPosition: number): SeekInterceptionResult;
|
4569
|
-
callCallbacksAfterInterception(): void;
|
4570
|
-
removeInterceptor(interceptor: SeekInterceptorFunction): void;
|
4571
|
-
}
|
4572
|
-
|
4573
|
-
export declare type SeekInterceptorCallback = (requestedSeekPosition: number) => void;
|
4574
|
-
|
4575
|
-
export declare type SeekInterceptorFunction = (currentPosition: number, seekPosition: number) => SeekInterceptionResult;
|
4576
|
-
|
4577
4565
|
export declare enum SemanticDate {
|
4578
4566
|
YESTERDAY = "Yesterday",
|
4579
4567
|
TODAY = "Today",
|
@@ -4643,13 +4631,6 @@ export declare interface SetCustomClaimsRequest {
|
|
4643
4631
|
organizationId: string;
|
4644
4632
|
}
|
4645
4633
|
|
4646
|
-
export declare const setSdkReactConfig: (tivioConfig: SdkReactConfig) => void;
|
4647
|
-
|
4648
|
-
declare type Settings = {
|
4649
|
-
onSetUser: (handler: (userId: string, userPayload: UserPayload) => void) => void;
|
4650
|
-
setUser: (userId: string, userPayload: UserPayload) => void;
|
4651
|
-
};
|
4652
|
-
|
4653
4634
|
/**
|
4654
4635
|
* Used for entities, that can be global (e.g. asset presets, tag types).
|
4655
4636
|
* Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
|
@@ -4670,6 +4651,21 @@ export declare interface SettingsItem {
|
|
4670
4651
|
*/
|
4671
4652
|
export declare const setUser: (userId: string | null, payload?: UserPayload) => Promise<void>;
|
4672
4653
|
|
4654
|
+
export declare interface ShakaErrorDetail {
|
4655
|
+
category: number;
|
4656
|
+
code: number;
|
4657
|
+
data: Array<string | number>;
|
4658
|
+
handled: boolean;
|
4659
|
+
message: string;
|
4660
|
+
severity: ShakaErrorSeverity;
|
4661
|
+
stack: string;
|
4662
|
+
}
|
4663
|
+
|
4664
|
+
export declare enum ShakaErrorSeverity {
|
4665
|
+
RECOVERABLE = 1,
|
4666
|
+
CRITICAL = 2
|
4667
|
+
}
|
4668
|
+
|
4673
4669
|
/**
|
4674
4670
|
* @public
|
4675
4671
|
*/
|
@@ -4854,12 +4850,13 @@ export declare type SubscribeToTaggedVideosOptions = Omit<SubscribeToItemsInRowO
|
|
4854
4850
|
orderBy?: OrderBy<TaggedVideosOrderByField>[];
|
4855
4851
|
};
|
4856
4852
|
|
4857
|
-
declare
|
4853
|
+
declare interface SubscriptionInfo {
|
4854
|
+
id: string;
|
4858
4855
|
type: 'subscription';
|
4859
4856
|
name: string;
|
4860
4857
|
benefits: string[];
|
4861
4858
|
frequency: string;
|
4862
|
-
}
|
4859
|
+
}
|
4863
4860
|
|
4864
4861
|
/**
|
4865
4862
|
* @public
|
@@ -4869,6 +4866,17 @@ export declare interface SuccessConfirmationOverlayPayload extends ConfirmationO
|
|
4869
4866
|
confirmButtonText?: string;
|
4870
4867
|
}
|
4871
4868
|
|
4869
|
+
export declare interface Survey {
|
4870
|
+
items: SurveyItem[];
|
4871
|
+
}
|
4872
|
+
|
4873
|
+
export declare interface SurveyItem {
|
4874
|
+
id: string;
|
4875
|
+
imageUrl: string;
|
4876
|
+
description: string;
|
4877
|
+
title: string;
|
4878
|
+
}
|
4879
|
+
|
4872
4880
|
export declare enum SurveyItemComponent {
|
4873
4881
|
SURVEY = "SURVEY"
|
4874
4882
|
}
|
@@ -5033,7 +5041,7 @@ export declare interface TileData<ItemSpecificData = VideoTileSpecificData | TvC
|
|
5033
5041
|
itemSpecificData: ItemSpecificData;
|
5034
5042
|
}
|
5035
5043
|
|
5036
|
-
declare interface TileMonetizationData {
|
5044
|
+
export declare interface TileMonetizationData {
|
5037
5045
|
id: string;
|
5038
5046
|
path: string;
|
5039
5047
|
placementType: 'channel' | 'tvChannel' | 'condition' | 'video' | 'section' | 'row';
|
@@ -5204,7 +5212,7 @@ export declare interface TivioConfig {
|
|
5204
5212
|
debug?: boolean;
|
5205
5213
|
verbose?: boolean;
|
5206
5214
|
firebaseApp?: any | null;
|
5207
|
-
firebaseFactory?: (config: Object, appName?: string) =>
|
5215
|
+
firebaseFactory?: (config: Object, appName?: string) => firebase_2.FirebaseApp;
|
5208
5216
|
authDomainOverride?: string;
|
5209
5217
|
firestore?: any | null;
|
5210
5218
|
currency: Currency;
|
@@ -5255,7 +5263,7 @@ export declare type TivioGetters = {
|
|
5255
5263
|
* @returns {Promise<Monetization[] | undefined>} organization subscriptions or undefined if organization does not exists
|
5256
5264
|
*/
|
5257
5265
|
getSubscriptions: () => Promise<Monetization[] | undefined>;
|
5258
|
-
}
|
5266
|
+
};
|
5259
5267
|
/**
|
5260
5268
|
* Get video by its id.
|
5261
5269
|
* @param videoId - video id
|
@@ -5453,7 +5461,7 @@ export declare type TivioJsBundleExposedApi = {
|
|
5453
5461
|
* @param id - player wrapper id
|
5454
5462
|
* @returns {Player} player wrapper instance
|
5455
5463
|
*/
|
5456
|
-
getPlayerWrapper: (id: string) =>
|
5464
|
+
getPlayerWrapper: (id: string) => Player;
|
5457
5465
|
/**
|
5458
5466
|
* Get tv channel by its id.
|
5459
5467
|
* @param tvChannelId - tv channel id
|
@@ -5475,7 +5483,7 @@ export declare type TivioJsBundleExposedApi = {
|
|
5475
5483
|
*/
|
5476
5484
|
export declare interface TivioPlayerWrapper {
|
5477
5485
|
addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
|
5478
|
-
reportError: (error: Error) => void;
|
5486
|
+
reportError: (error: Error, playerId?: string) => void;
|
5479
5487
|
reportPlaybackEnded: () => void;
|
5480
5488
|
reportTimeProgress: (ms: number) => void;
|
5481
5489
|
seekTo: (ms: number) => void;
|
@@ -5494,12 +5502,13 @@ export declare const TivioProvider: React_2.FC<TivioProviderProps>;
|
|
5494
5502
|
/**
|
5495
5503
|
* @public
|
5496
5504
|
*/
|
5497
|
-
export declare
|
5505
|
+
export declare type TivioProviderProps = {
|
5498
5506
|
/**
|
5499
5507
|
* This prop must be set only once and not change value afterwards
|
5500
5508
|
*/
|
5501
5509
|
conf: SdkReactConfig | undefined | null;
|
5502
|
-
|
5510
|
+
children: React_2.ReactNode;
|
5511
|
+
};
|
5503
5512
|
|
5504
5513
|
/**
|
5505
5514
|
* @public
|
@@ -5528,7 +5537,7 @@ export declare type TivioReactBundle = {
|
|
5528
5537
|
internal: TivioInternalBundle;
|
5529
5538
|
analytics: TivioAnalytics;
|
5530
5539
|
destroy: () => Promise<void>;
|
5531
|
-
} & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'
|
5540
|
+
} & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
|
5532
5541
|
|
5533
5542
|
/**
|
5534
5543
|
* @public
|
@@ -5678,13 +5687,16 @@ export declare interface Track {
|
|
5678
5687
|
language: LangCode;
|
5679
5688
|
}
|
5680
5689
|
|
5681
|
-
declare
|
5690
|
+
declare interface TransactionInfo {
|
5691
|
+
id: string;
|
5682
5692
|
type: 'transaction';
|
5683
5693
|
name: string;
|
5684
5694
|
videoId: string;
|
5685
5695
|
cover: string;
|
5686
5696
|
description: string;
|
5687
|
-
|
5697
|
+
promotions?: firebase_3.firestore.DocumentReference<Promotion>[];
|
5698
|
+
fullDiscount?: boolean;
|
5699
|
+
}
|
5688
5700
|
|
5689
5701
|
/**
|
5690
5702
|
* Represents one string in every supported language mutation.
|
@@ -6032,6 +6044,8 @@ export declare type UseMessagesOptions = ContentOrConversationId & {
|
|
6032
6044
|
autoInit?: boolean;
|
6033
6045
|
};
|
6034
6046
|
|
6047
|
+
export declare type UseOrganizationSettingsReturn<TKey extends keyof OrganizationSettingsField> = OrganizationSettingsField[TKey] | undefined;
|
6048
|
+
|
6035
6049
|
/**
|
6036
6050
|
* @public
|
6037
6051
|
*
|
@@ -6092,6 +6106,10 @@ export declare type User = {
|
|
6092
6106
|
* Returns "active" (non-expired) subscription purchases
|
6093
6107
|
*/
|
6094
6108
|
purchasedSubscriptions: Purchase[];
|
6109
|
+
/**
|
6110
|
+
* Returns voucher purchases
|
6111
|
+
*/
|
6112
|
+
purchasedVouchers: Purchase[];
|
6095
6113
|
/**
|
6096
6114
|
* Returns last expired subscription which user can renew or undefined
|
6097
6115
|
*/
|
@@ -6437,12 +6455,9 @@ export declare interface Video extends RowItem, MonetizableItem, ReactableConten
|
|
6437
6455
|
image: string | null;
|
6438
6456
|
isPlayable: boolean;
|
6439
6457
|
monetizations: Monetization[];
|
6440
|
-
getSourceUrl(options?: {
|
6441
|
-
language?: LangCode;
|
6442
|
-
}): Promise<GetSourceUrlResponse & {
|
6458
|
+
getSourceUrl(options?: Partial<GetSourceUrlRequest>): Promise<GetSourceUrlResponse & {
|
6443
6459
|
language?: LangCode;
|
6444
6460
|
}>;
|
6445
|
-
getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex?: number): SeekingMatrix | null;
|
6446
6461
|
purchasableMonetization: any | null;
|
6447
6462
|
transaction: PurchasableMonetization | undefined;
|
6448
6463
|
subscriptions: PurchasableMonetization[];
|
@@ -6463,7 +6478,6 @@ export declare interface Video extends RowItem, MonetizableItem, ReactableConten
|
|
6463
6478
|
organizationId?: string;
|
6464
6479
|
linkedVideosRaw: LinkedVideoRaw[] | undefined;
|
6465
6480
|
linkedVideos: LinkedVideo[] | undefined;
|
6466
|
-
pipPaths?: string[];
|
6467
6481
|
contentType: VideoContentType | null;
|
6468
6482
|
year?: number;
|
6469
6483
|
episodeNumber?: number;
|
@@ -6497,6 +6511,7 @@ export declare interface Video extends RowItem, MonetizableItem, ReactableConten
|
|
6497
6511
|
contentDescriptors?: string[];
|
6498
6512
|
publishedStatus?: PublishedStatus;
|
6499
6513
|
widgetPaths?: string[];
|
6514
|
+
forcedCapabilities: PlayerCapability[] | null;
|
6500
6515
|
}
|
6501
6516
|
|
6502
6517
|
/**
|
@@ -6793,6 +6808,7 @@ export declare interface VodTivioSourceInterface extends PlayerSourceInterface<S
|
|
6793
6808
|
canWatchOnDevice: boolean;
|
6794
6809
|
isAvailable: boolean;
|
6795
6810
|
availability: ContentAvailability | null;
|
6811
|
+
managementUrl?: string;
|
6796
6812
|
video: Video;
|
6797
6813
|
clone: (params?: Partial<VodTivioSourceParams>) => VodTivioSourceInterface;
|
6798
6814
|
}
|
@@ -6806,18 +6822,38 @@ export declare interface VodTivioSourceParams extends PlayerSourceParams<SourceT
|
|
6806
6822
|
language?: LangCode;
|
6807
6823
|
drm?: Drm;
|
6808
6824
|
ignoreWatchPosition?: boolean;
|
6825
|
+
/**
|
6826
|
+
* URL for source modification for user (e.g. add PIP window to livestream).
|
6827
|
+
* TODO mb move to PlayerSourceParams
|
6828
|
+
*/
|
6829
|
+
managementUrl?: string;
|
6809
6830
|
}
|
6810
6831
|
|
6811
6832
|
/**
|
6812
6833
|
* TODO: Should be in core-js, we can't import types from it, though.
|
6813
6834
|
*/
|
6814
|
-
declare
|
6835
|
+
declare interface Voucher {
|
6815
6836
|
activate: () => void;
|
6816
6837
|
isUsed: boolean;
|
6817
6838
|
isExpired: boolean;
|
6818
6839
|
status: 'NEW' | 'USED';
|
6819
6840
|
voucherInfo: SubscriptionInfo | TransactionInfo;
|
6820
|
-
}
|
6841
|
+
}
|
6842
|
+
|
6843
|
+
declare interface VoucherPageConfiguration {
|
6844
|
+
showVoucherButtonInHeader?: boolean;
|
6845
|
+
multiCreatorPage?: boolean;
|
6846
|
+
disableVoucherButtonInMonetizationCard?: boolean;
|
6847
|
+
voucherButtonText?: Translation;
|
6848
|
+
title: Translation;
|
6849
|
+
steps: {
|
6850
|
+
number: number;
|
6851
|
+
description: Translation;
|
6852
|
+
}[];
|
6853
|
+
customSorting?: {
|
6854
|
+
[key: string]: number;
|
6855
|
+
};
|
6856
|
+
}
|
6821
6857
|
|
6822
6858
|
/**
|
6823
6859
|
* @public
|