@tivio/sdk-react 6.0.0 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +12 -0
- package/README.md.bak +12 -0
- package/dist/index.d.ts +774 -129
- package/dist/index.js +1 -1
- package/dist/sdk-react.d.ts +793 -129
- package/package.json +2 -2
package/dist/sdk-react.d.ts
CHANGED
@@ -3,6 +3,7 @@ import { FunctionComponentElement } from 'react';
|
|
3
3
|
import { GeoPoint } from '@firebase/firestore-types';
|
4
4
|
import { OperatingSystem } from 'detect-browser';
|
5
5
|
import { default as React_2 } from 'react';
|
6
|
+
import { RecommendationsQuery } from '@algolia/recommend';
|
6
7
|
|
7
8
|
/**
|
8
9
|
* @public
|
@@ -60,13 +61,37 @@ export declare type AdMetadata = {
|
|
60
61
|
/**
|
61
62
|
* @public
|
62
63
|
*/
|
63
|
-
export declare
|
64
|
+
export declare type AdMonetization = Monetization;
|
65
|
+
|
66
|
+
export declare interface AdPackInfo {
|
67
|
+
order: number;
|
68
|
+
total: number;
|
69
|
+
}
|
70
|
+
|
71
|
+
export declare interface AdSegment {
|
72
|
+
id: string;
|
73
|
+
/**
|
74
|
+
* @deprecated alias to secondsToEnd * 1000
|
75
|
+
*/
|
76
|
+
remainingMs: number;
|
77
|
+
secondsToEnd: number;
|
78
|
+
secondsToSkippable: number | null;
|
79
|
+
canSeek: boolean;
|
80
|
+
/**
|
81
|
+
* true if is skippable and skip countdown has passed
|
82
|
+
*/
|
83
|
+
canSkip: boolean;
|
84
|
+
/**
|
85
|
+
* true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
|
86
|
+
*/
|
87
|
+
isSkippable: boolean;
|
88
|
+
skip: () => any;
|
64
89
|
}
|
65
90
|
|
66
91
|
/**
|
67
92
|
* @public
|
68
93
|
*/
|
69
|
-
declare type
|
94
|
+
declare type AdSegment_2 = {
|
70
95
|
id: string;
|
71
96
|
/**
|
72
97
|
* @deprecated alias to secondsToEnd * 1000
|
@@ -89,17 +114,27 @@ declare type AdSegment = {
|
|
89
114
|
/**
|
90
115
|
* @public
|
91
116
|
*/
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
117
|
+
declare type AdSource = SourceBase & {
|
118
|
+
type: 'ad';
|
119
|
+
};
|
120
|
+
|
121
|
+
export declare interface AdSourceActions {
|
122
|
+
click: () => void;
|
123
|
+
skip: () => void;
|
124
|
+
skipAll: () => void;
|
125
|
+
resumeAd: () => void;
|
126
|
+
pauseAd: () => void;
|
127
|
+
muteAd: () => void;
|
128
|
+
unmuteAd: () => void;
|
129
|
+
}
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @public
|
133
|
+
*/
|
134
|
+
export declare interface AdSourceInterface extends CommonSourceInterface<SourceType.ADVERTISEMENT> {
|
135
|
+
adType: AdType;
|
100
136
|
durationMs: number;
|
101
137
|
skipDelayMs: number | null;
|
102
|
-
type: 'ad';
|
103
138
|
/**
|
104
139
|
* true if is skippable and skip countdown has passed
|
105
140
|
*/
|
@@ -108,6 +143,10 @@ export declare type AdSource = {
|
|
108
143
|
* true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
|
109
144
|
*/
|
110
145
|
isSkippable: boolean;
|
146
|
+
isSkipped: boolean;
|
147
|
+
isPaused: boolean;
|
148
|
+
isMuted: boolean;
|
149
|
+
setIsPaused(isPaused: boolean): void;
|
111
150
|
/**
|
112
151
|
* Skip ad. Only works when canSkip is true
|
113
152
|
*/
|
@@ -115,21 +154,47 @@ export declare type AdSource = {
|
|
115
154
|
/**
|
116
155
|
* Order in ad break (ad break is a group of ads played right after each other)
|
117
156
|
*/
|
118
|
-
order: number;
|
157
|
+
order: number | null;
|
119
158
|
/**
|
120
159
|
* Total number of ads in ad break (ad break is a group of ads played right after each other)
|
121
160
|
*/
|
122
|
-
totalCount: number;
|
161
|
+
totalCount: number | null;
|
123
162
|
secondsToEnd: number;
|
124
163
|
secondsToSkippable: number | null;
|
125
|
-
|
164
|
+
provider?: VastProvider;
|
165
|
+
apiFramework: VastApiFramework | null;
|
166
|
+
parent: PlayerSourceInterface | null;
|
167
|
+
trackingContext: any | null;
|
168
|
+
resumeAd(): void;
|
169
|
+
pauseAd(): void;
|
170
|
+
muteAd(): void;
|
171
|
+
unmuteAd(): void;
|
172
|
+
skipAll(): void;
|
173
|
+
onRemainingTimeChanged(ms: number): void;
|
174
|
+
click(): void;
|
175
|
+
}
|
126
176
|
|
127
177
|
/**
|
128
178
|
* @public
|
129
179
|
*/
|
130
|
-
declare
|
131
|
-
|
132
|
-
|
180
|
+
export declare interface AdSourceParams extends CommonSourceParams<SourceType.ADVERTISEMENT> {
|
181
|
+
id: string;
|
182
|
+
adType?: AdType;
|
183
|
+
actions?: AdSourceActions | null;
|
184
|
+
apiFramework?: VastApiFramework | null;
|
185
|
+
skipDelayMs?: number | null;
|
186
|
+
adDurationMs: number;
|
187
|
+
trackingContext?: any;
|
188
|
+
adMarker?: any;
|
189
|
+
packInfo?: AdPackInfo;
|
190
|
+
provider?: VastProvider;
|
191
|
+
parent?: PlayerSource | null;
|
192
|
+
}
|
193
|
+
|
194
|
+
/**
|
195
|
+
* @public
|
196
|
+
*/
|
197
|
+
export declare type AdType = 'playable' | 'metadata-only';
|
133
198
|
|
134
199
|
/**
|
135
200
|
* @public
|
@@ -344,6 +409,7 @@ export declare const bundlePromise: Promise<RemoteBundleState>;
|
|
344
409
|
export declare type ButtonOptions = {
|
345
410
|
backgroundImage: string;
|
346
411
|
borderRadius: string | number;
|
412
|
+
color?: string;
|
347
413
|
};
|
348
414
|
|
349
415
|
/**
|
@@ -353,6 +419,7 @@ export declare type Callback<T = any> = (arg?: T) => void;
|
|
353
419
|
|
354
420
|
/**
|
355
421
|
* @public
|
422
|
+
* @deprecated this channel structure is not used anymore (don't confuse with tv channels, which are used).
|
356
423
|
*/
|
357
424
|
export declare interface Channel {
|
358
425
|
id: string;
|
@@ -362,36 +429,33 @@ export declare interface Channel {
|
|
362
429
|
recentVideos: Video[];
|
363
430
|
}
|
364
431
|
|
432
|
+
declare type ChannelPath = string;
|
433
|
+
|
365
434
|
/**
|
366
435
|
* @public
|
367
436
|
*/
|
368
|
-
export declare
|
369
|
-
|
370
|
-
description: string;
|
371
|
-
name: string;
|
372
|
-
url: string;
|
373
|
-
from: Date;
|
437
|
+
export declare interface ChannelSourceInterface extends PlayerSourceInterface<SourceType.CHANNEL> {
|
438
|
+
tvChannelType: TvChannelType;
|
374
439
|
channelName: string;
|
440
|
+
programName?: string;
|
441
|
+
programDescription?: string;
|
442
|
+
from: Date;
|
375
443
|
to: Date;
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
} | null;
|
380
|
-
};
|
444
|
+
poster: string | null;
|
445
|
+
tvMode: TvMode | 'live' | null;
|
446
|
+
}
|
381
447
|
|
382
448
|
/**
|
383
449
|
* @public
|
384
450
|
*/
|
385
|
-
export declare interface
|
386
|
-
|
387
|
-
url: string;
|
388
|
-
originalOptions: any;
|
451
|
+
export declare interface ChannelSourceParams extends PlayerSourceParams<SourceType.CHANNEL> {
|
452
|
+
tvChannelType: TvChannelType;
|
389
453
|
channelName: string;
|
390
|
-
programName
|
391
|
-
programDescription
|
454
|
+
programName?: string;
|
455
|
+
programDescription?: string;
|
392
456
|
from: Date;
|
393
457
|
to: Date;
|
394
|
-
|
458
|
+
tvMode?: TvMode | 'live' | null;
|
395
459
|
}
|
396
460
|
|
397
461
|
/**
|
@@ -404,6 +468,47 @@ export declare type Chapter = any;
|
|
404
468
|
*/
|
405
469
|
export declare type CmpConfig = 'default' | 'debug' | 'none';
|
406
470
|
|
471
|
+
/**
|
472
|
+
* TODO same name as core-js entity, not convenient
|
473
|
+
* @public
|
474
|
+
*/
|
475
|
+
export declare type CommonSource = PlayerSource | AdSourceInterface;
|
476
|
+
|
477
|
+
/**
|
478
|
+
* Use this interface only for inheritance. Otherwise use {@link CommonSource}
|
479
|
+
* @public
|
480
|
+
*/
|
481
|
+
export declare interface CommonSourceInterface<T extends SourceType = SourceType> {
|
482
|
+
type: T;
|
483
|
+
url: string;
|
484
|
+
name?: string;
|
485
|
+
description?: string;
|
486
|
+
currentTime: number;
|
487
|
+
event: any | null;
|
488
|
+
setEvent(event: any | null): void;
|
489
|
+
onTimeChanged(ms: number): void;
|
490
|
+
next: CommonSource | null;
|
491
|
+
canSeek: boolean;
|
492
|
+
hasNext: boolean;
|
493
|
+
isFinished: boolean;
|
494
|
+
setIsFinished(isFinished: boolean): void;
|
495
|
+
isStarted: boolean;
|
496
|
+
setIsStarted(isStarted: boolean): void;
|
497
|
+
autoplay?: boolean;
|
498
|
+
toLog(): any;
|
499
|
+
}
|
500
|
+
|
501
|
+
/**
|
502
|
+
* @public
|
503
|
+
*/
|
504
|
+
export declare interface CommonSourceParams<T extends SourceType = SourceType> {
|
505
|
+
type: T;
|
506
|
+
url: string;
|
507
|
+
name?: string;
|
508
|
+
description?: string;
|
509
|
+
autoplay?: boolean;
|
510
|
+
}
|
511
|
+
|
407
512
|
/**
|
408
513
|
* TODO it's the same as Customizations, not?
|
409
514
|
* @internal
|
@@ -457,6 +562,46 @@ export declare interface ConfirmationOverlayPayloadBase {
|
|
457
562
|
automaticConfirmDelayMs?: number;
|
458
563
|
}
|
459
564
|
|
565
|
+
/**
|
566
|
+
* @public
|
567
|
+
*/
|
568
|
+
export declare interface ConsumedAds {
|
569
|
+
chapterIds: Set<string>;
|
570
|
+
markerIds: Set<string>;
|
571
|
+
postroll: boolean;
|
572
|
+
/**
|
573
|
+
* TODO refactor
|
574
|
+
* true when preroll has been loaded (not when it was watched)
|
575
|
+
*/
|
576
|
+
preroll: boolean;
|
577
|
+
}
|
578
|
+
|
579
|
+
/**
|
580
|
+
* @public
|
581
|
+
*/
|
582
|
+
export declare enum ContentSortEnum {
|
583
|
+
LATEST = "latest",
|
584
|
+
OLDEST = "oldest",
|
585
|
+
A_TO_Z = "a_to_z",
|
586
|
+
Z_TO_A = "z_to_a",
|
587
|
+
EPISODE_ASC = "episode_asc",
|
588
|
+
EPISODE_DESC = "episode_desc"
|
589
|
+
}
|
590
|
+
|
591
|
+
/**
|
592
|
+
* @public
|
593
|
+
*/
|
594
|
+
export declare type ContentSortPickerProps = {
|
595
|
+
value: ContentSortEnum;
|
596
|
+
isSeries?: boolean;
|
597
|
+
onChange: (value: ContentSortEnum) => void;
|
598
|
+
};
|
599
|
+
|
600
|
+
/**
|
601
|
+
* @public
|
602
|
+
*/
|
603
|
+
export declare type ContinuePosition = number | null | Promise<number | null>;
|
604
|
+
|
460
605
|
/**
|
461
606
|
* Entity aggregate conversion statistics per day
|
462
607
|
* TODO in future change structure, new used like array item
|
@@ -588,7 +733,9 @@ export declare enum CustomerId {
|
|
588
733
|
GRAPE = "GRAPE",
|
589
734
|
TIVIO = "TIVIO",
|
590
735
|
STORYBOOK = "STORYBOOK",
|
591
|
-
NANGU_DEV = "NANGU_DEV"
|
736
|
+
NANGU_DEV = "NANGU_DEV",
|
737
|
+
CNC = "CNC",
|
738
|
+
VOJTA_ZIZKA = "VOJTA_ZIZKA"
|
592
739
|
}
|
593
740
|
|
594
741
|
/**
|
@@ -617,6 +764,7 @@ export declare type Customizations = {
|
|
617
764
|
*/
|
618
765
|
fontSize: number;
|
619
766
|
};
|
767
|
+
borderRadius: string | number;
|
620
768
|
};
|
621
769
|
SplitBanner: {
|
622
770
|
height: string;
|
@@ -642,6 +790,7 @@ export declare type Customizations = {
|
|
642
790
|
activeLinkUnderlineColor: string;
|
643
791
|
logoHeight: string;
|
644
792
|
borderBottom: string;
|
793
|
+
color?: string;
|
645
794
|
};
|
646
795
|
VideoDetail: {
|
647
796
|
Banner: {
|
@@ -671,6 +820,13 @@ export declare type Customizations = {
|
|
671
820
|
*/
|
672
821
|
title: string;
|
673
822
|
};
|
823
|
+
/**
|
824
|
+
* Customizations for attributes eg. contentType, year, genres, duration, tags
|
825
|
+
*/
|
826
|
+
AttributeTexts?: {
|
827
|
+
color: string;
|
828
|
+
mobileColor?: string;
|
829
|
+
};
|
674
830
|
};
|
675
831
|
Input: InputOptions;
|
676
832
|
landing: {
|
@@ -691,6 +847,14 @@ export declare type Customizations = {
|
|
691
847
|
* Background style of success icon on "/pair" site.
|
692
848
|
*/
|
693
849
|
pairSuccessBackground: string;
|
850
|
+
/**
|
851
|
+
* Main application font color.
|
852
|
+
*/
|
853
|
+
appColor: string;
|
854
|
+
};
|
855
|
+
Avatar?: {
|
856
|
+
backgroundColor: string;
|
857
|
+
color: string;
|
694
858
|
};
|
695
859
|
};
|
696
860
|
|
@@ -712,6 +876,19 @@ export declare interface CustomThemeOptions {
|
|
712
876
|
size: (size: number) => number;
|
713
877
|
}
|
714
878
|
|
879
|
+
/**
|
880
|
+
* @public
|
881
|
+
*/
|
882
|
+
export declare interface Cutout {
|
883
|
+
startMs: number;
|
884
|
+
endMs: number;
|
885
|
+
}
|
886
|
+
|
887
|
+
/**
|
888
|
+
* @public
|
889
|
+
*/
|
890
|
+
export declare const DEFAULT_LIMIT = 10;
|
891
|
+
|
715
892
|
/**
|
716
893
|
* @public
|
717
894
|
*/
|
@@ -891,6 +1068,35 @@ export declare interface EmailTemplateVersion {
|
|
891
1068
|
thumbnail_url: string;
|
892
1069
|
}
|
893
1070
|
|
1071
|
+
export declare type EmbedScreenMessageNavigateType = {
|
1072
|
+
type: EmbedScreenMessageType.NAVIGATE;
|
1073
|
+
to: string | 'Profile' | 'Home' | 'Search' | 'Video' | 'Series';
|
1074
|
+
value?: string;
|
1075
|
+
};
|
1076
|
+
|
1077
|
+
export declare type EmbedScreenMessageResizeType = {
|
1078
|
+
type: EmbedScreenMessageType.RESIZE;
|
1079
|
+
height: number;
|
1080
|
+
};
|
1081
|
+
|
1082
|
+
export declare enum EmbedScreenMessageType {
|
1083
|
+
RESIZE = "RESIZE",
|
1084
|
+
NAVIGATE = "NAVIGATE"
|
1085
|
+
}
|
1086
|
+
|
1087
|
+
export declare type EmbedScreenPostMessage = EmbedScreenMessageNavigateType | EmbedScreenMessageResizeType;
|
1088
|
+
|
1089
|
+
export declare type EmbedScreenPostMessageFn = <T extends EmbedScreenPostMessage = EmbedScreenPostMessage>(message: T, origin?: string) => void;
|
1090
|
+
|
1091
|
+
/**
|
1092
|
+
* @public
|
1093
|
+
*/
|
1094
|
+
export declare interface EmitterInterface {
|
1095
|
+
isSupported: (even: string) => boolean;
|
1096
|
+
addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
|
1097
|
+
removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
|
1098
|
+
}
|
1099
|
+
|
894
1100
|
/**
|
895
1101
|
* @public
|
896
1102
|
*/
|
@@ -973,11 +1179,9 @@ export declare interface GetBaseAnalyticsRequest {
|
|
973
1179
|
endDate: string;
|
974
1180
|
}
|
975
1181
|
|
976
|
-
export declare
|
977
|
-
}
|
1182
|
+
export declare type GetConversionAnalyticsRequest = GetBaseAnalyticsRequest;
|
978
1183
|
|
979
|
-
export declare
|
980
|
-
}
|
1184
|
+
export declare type GetMonetizationsAnalyticsRequest = GetBaseAnalyticsRequest;
|
981
1185
|
|
982
1186
|
export declare interface GetMonetizationsAnalyticsResponse {
|
983
1187
|
monetizationsAnalytics: MonetizationSummaryItem[];
|
@@ -1049,6 +1253,10 @@ export declare interface GetSourceUrlRequest {
|
|
1049
1253
|
* construct sources based on source domains right away.
|
1050
1254
|
*/
|
1051
1255
|
ignoreDocumentSources?: boolean;
|
1256
|
+
/**
|
1257
|
+
* See {@link SourcePlayMode} type. If not given, getSourceUrl will pick default based on requested document.
|
1258
|
+
*/
|
1259
|
+
sourcePlayMode?: SourcePlayMode;
|
1052
1260
|
}
|
1053
1261
|
|
1054
1262
|
export declare interface GetSourceUrlResponse {
|
@@ -1064,6 +1272,62 @@ export declare interface GetSourceUrlResponse {
|
|
1064
1272
|
* DRM configuration to {@link url} if source is encrypted.
|
1065
1273
|
*/
|
1066
1274
|
drm?: Drm;
|
1275
|
+
/**
|
1276
|
+
* See {@link SourcePlayMode} type.
|
1277
|
+
*/
|
1278
|
+
sourcePlayMode: SourcePlayMode;
|
1279
|
+
}
|
1280
|
+
|
1281
|
+
export declare interface GetVideoAnalyticsErrorItem {
|
1282
|
+
count: number;
|
1283
|
+
timestamp: number;
|
1284
|
+
errorMessage: string;
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
export declare interface GetVideoAnalyticsErrorResult {
|
1288
|
+
totalCount: number;
|
1289
|
+
errors: Array<GetVideoAnalyticsErrorItem>;
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
export declare interface GetVideoAnalyticsRequest {
|
1293
|
+
contentId: string;
|
1294
|
+
timestamp?: number;
|
1295
|
+
userId?: string;
|
1296
|
+
source?: string;
|
1297
|
+
limit?: number;
|
1298
|
+
errorLimit?: number;
|
1299
|
+
errorTimestampFrom?: number;
|
1300
|
+
}
|
1301
|
+
|
1302
|
+
export declare interface GetVideoAnalyticsResponse {
|
1303
|
+
state?: GetVideoAnalyticsResult;
|
1304
|
+
quality?: GetVideoAnalyticsResult;
|
1305
|
+
error?: GetVideoAnalyticsErrorResult;
|
1306
|
+
localities?: unknown;
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
export declare type GetVideoAnalyticsResult = {
|
1310
|
+
[timestamp: string]: {
|
1311
|
+
totalDuration: number;
|
1312
|
+
values: Array<{
|
1313
|
+
value: string;
|
1314
|
+
duration: number;
|
1315
|
+
percentage: number;
|
1316
|
+
}>;
|
1317
|
+
};
|
1318
|
+
};
|
1319
|
+
|
1320
|
+
export declare interface GetVideoAnalyticsViewsRequest {
|
1321
|
+
contentId: string;
|
1322
|
+
currentViewsIntervalMs: number;
|
1323
|
+
timestamp?: number;
|
1324
|
+
source?: string;
|
1325
|
+
}
|
1326
|
+
|
1327
|
+
export declare interface GetVideoAnalyticsViewsResponse {
|
1328
|
+
previousViews?: number;
|
1329
|
+
currentViews?: number;
|
1330
|
+
totalViews?: number;
|
1067
1331
|
}
|
1068
1332
|
|
1069
1333
|
export declare interface GetViewAnalyticsResponse {
|
@@ -1071,7 +1335,15 @@ export declare interface GetViewAnalyticsResponse {
|
|
1071
1335
|
topWatched: TopWatchItem[];
|
1072
1336
|
}
|
1073
1337
|
|
1074
|
-
export declare
|
1338
|
+
export declare type GetViewsAnalyticsRequest = GetBaseAnalyticsRequest;
|
1339
|
+
|
1340
|
+
/**
|
1341
|
+
* @public
|
1342
|
+
*/
|
1343
|
+
export declare enum GRID_TYPES {
|
1344
|
+
ROW = "ROW",
|
1345
|
+
VIDEO = "VIDEO",
|
1346
|
+
SERIES = "SERIES"
|
1075
1347
|
}
|
1076
1348
|
|
1077
1349
|
/**
|
@@ -1122,6 +1394,7 @@ export declare interface IndexedUser extends IndexedObject {
|
|
1122
1394
|
export declare interface IndexedVideo extends IndexedObject {
|
1123
1395
|
assets: any;
|
1124
1396
|
organizationPath: string;
|
1397
|
+
sharedOrganizationPaths?: string[];
|
1125
1398
|
tagPaths?: string[];
|
1126
1399
|
created: Date | string;
|
1127
1400
|
isDraft: boolean;
|
@@ -1141,11 +1414,6 @@ export declare type InputOptions = {
|
|
1141
1414
|
borderRadius: string;
|
1142
1415
|
};
|
1143
1416
|
|
1144
|
-
/**
|
1145
|
-
* @public
|
1146
|
-
*/
|
1147
|
-
export declare type InputSource = AdSource | ChannelSource | VodTivioSource | VodExternalSource;
|
1148
|
-
|
1149
1417
|
/**
|
1150
1418
|
* @public
|
1151
1419
|
*/
|
@@ -1185,6 +1453,37 @@ declare interface IntroMarker {
|
|
1185
1453
|
skip: () => void;
|
1186
1454
|
}
|
1187
1455
|
|
1456
|
+
/**
|
1457
|
+
* @public
|
1458
|
+
* @param source
|
1459
|
+
*/
|
1460
|
+
export declare function isAdSource(source?: CommonSource | null): source is AdSourceInterface;
|
1461
|
+
|
1462
|
+
/**
|
1463
|
+
* @public
|
1464
|
+
*/
|
1465
|
+
export declare function isChannelSource(source?: CommonSource | null): source is ChannelSourceInterface;
|
1466
|
+
|
1467
|
+
/**
|
1468
|
+
* @public
|
1469
|
+
*/
|
1470
|
+
export declare const isClassicChannelSource: (source?: CommonSource | null) => source is ChannelSourceInterface;
|
1471
|
+
|
1472
|
+
/**
|
1473
|
+
* @public
|
1474
|
+
*/
|
1475
|
+
export declare const isVirtualChannelSource: (source?: CommonSource | null) => source is VirtualChannelSourceInterface;
|
1476
|
+
|
1477
|
+
/**
|
1478
|
+
* @public
|
1479
|
+
*/
|
1480
|
+
export declare function isVodExternalSource(source?: CommonSource | null): source is VodExternalSourceInterface;
|
1481
|
+
|
1482
|
+
/**
|
1483
|
+
* @public
|
1484
|
+
*/
|
1485
|
+
export declare function isVodTivioSource(source?: CommonSource | null): source is VodTivioSourceInterface;
|
1486
|
+
|
1188
1487
|
/**
|
1189
1488
|
* @public
|
1190
1489
|
*/
|
@@ -1391,6 +1690,18 @@ export declare interface Monetization {
|
|
1391
1690
|
description?: string;
|
1392
1691
|
}
|
1393
1692
|
|
1693
|
+
/**
|
1694
|
+
* @public
|
1695
|
+
*/
|
1696
|
+
export declare enum MONETIZATION_DURATION {
|
1697
|
+
UNLIMITED = -1,
|
1698
|
+
DAY = 1,
|
1699
|
+
WEEK = 7,
|
1700
|
+
MONTH = 30,
|
1701
|
+
HALF_YEAR = 183,
|
1702
|
+
YEAR = 365
|
1703
|
+
}
|
1704
|
+
|
1394
1705
|
/**
|
1395
1706
|
* @public
|
1396
1707
|
*/
|
@@ -1508,6 +1819,11 @@ export declare type NewVoucher = {
|
|
1508
1819
|
expirationDate: Date | number;
|
1509
1820
|
};
|
1510
1821
|
|
1822
|
+
/**
|
1823
|
+
* @public
|
1824
|
+
*/
|
1825
|
+
export declare type NonAdSourceType = Exclude<SourceType, SourceType.ADVERTISEMENT>;
|
1826
|
+
|
1511
1827
|
declare interface Notification_2 {
|
1512
1828
|
id: string;
|
1513
1829
|
name: string;
|
@@ -1559,8 +1875,8 @@ export declare type OptionalKeys<T> = {
|
|
1559
1875
|
/**
|
1560
1876
|
* @public
|
1561
1877
|
*/
|
1562
|
-
export declare interface OrderBy {
|
1563
|
-
field: string;
|
1878
|
+
export declare interface OrderBy<T = void> {
|
1879
|
+
field: T extends void ? string : T;
|
1564
1880
|
directionStr?: OrderByDirection;
|
1565
1881
|
}
|
1566
1882
|
|
@@ -1731,12 +2047,12 @@ export declare interface PlayerEngineConfig {
|
|
1731
2047
|
/**
|
1732
2048
|
* @public
|
1733
2049
|
*/
|
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';
|
2050
|
+
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';
|
1735
2051
|
|
1736
2052
|
/**
|
1737
2053
|
* @public
|
1738
2054
|
*/
|
1739
|
-
export declare type PlayerEngineFactory = (videoElement: HTMLVideoElement) => PlayerEngineInterface
|
2055
|
+
export declare type PlayerEngineFactory = (videoElement: HTMLVideoElement) => Promise<PlayerEngineInterface>;
|
1740
2056
|
|
1741
2057
|
/**
|
1742
2058
|
* @public
|
@@ -1846,36 +2162,66 @@ export declare interface PlayerEngineOptions {
|
|
1846
2162
|
seekDebounceMs?: number;
|
1847
2163
|
}
|
1848
2164
|
|
2165
|
+
export declare interface PlayerError {
|
2166
|
+
message: string;
|
2167
|
+
}
|
2168
|
+
|
1849
2169
|
/**
|
1850
2170
|
* @public
|
1851
2171
|
*/
|
1852
2172
|
export declare interface PlayerInterface {
|
2173
|
+
/**
|
2174
|
+
* Pause playback
|
2175
|
+
*/
|
1853
2176
|
pause: () => void;
|
1854
2177
|
/**
|
1855
|
-
*
|
2178
|
+
* Unpause playback
|
1856
2179
|
*/
|
1857
|
-
play: () => void;
|
2180
|
+
play: () => Promise<void> | void;
|
1858
2181
|
/**
|
2182
|
+
* Stop and close video
|
2183
|
+
*/
|
2184
|
+
stop: () => Promise<void> | void;
|
2185
|
+
/**
|
2186
|
+
* Seek to position in ms
|
2187
|
+
*
|
1859
2188
|
* @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
|
1860
2189
|
* or in case of TV programs relative to start of the program (relative to source.from ms)
|
1861
2190
|
*/
|
1862
2191
|
seekTo: (ms: number) => void;
|
1863
2192
|
/**
|
1864
|
-
*
|
1865
|
-
*
|
1866
|
-
*
|
1867
|
-
* immediately or just be loaded by player and stay paused.
|
2193
|
+
* Send this source to player. And either start playing it immediately if `source.autoplay` is true
|
2194
|
+
* or just load it and keep it paused and ready to play if `source.autoplay` is false.
|
2195
|
+
* If source is `null`, stop and close the player (this is the same as if `this.stop()` was called.)
|
1868
2196
|
*/
|
1869
|
-
setSource: (source:
|
2197
|
+
setSource: (source: CommonSource | null) => void;
|
1870
2198
|
/**
|
1871
|
-
* volume
|
2199
|
+
* Set volume
|
2200
|
+
*
|
2201
|
+
* @param {number} volume value in [0,1]
|
1872
2202
|
*/
|
1873
2203
|
setVolume?: (volume: number) => void;
|
2204
|
+
/**
|
2205
|
+
* Mute the player volume
|
2206
|
+
*/
|
1874
2207
|
mute?: () => void;
|
1875
2208
|
/**
|
1876
|
-
*
|
2209
|
+
* Unmute the player volume and restore it to the save level that was before it has been muted
|
1877
2210
|
*/
|
1878
2211
|
unmute?: () => void;
|
2212
|
+
/**
|
2213
|
+
* Sets native IMA ad URL which is then loaded and played on RN side
|
2214
|
+
*/
|
2215
|
+
setNativeImaAdUrl?: (url: string) => void;
|
2216
|
+
/**
|
2217
|
+
* Try to load and play native IMA ad using provided URL
|
2218
|
+
*/
|
2219
|
+
playNativeImaAd?: (url: string) => Promise<void>;
|
2220
|
+
/**
|
2221
|
+
* Get URL of native IMA ad which is currently playing
|
2222
|
+
*/
|
2223
|
+
getNativeImaAdUrl?: () => string | null;
|
2224
|
+
lastQuality?: number | null;
|
1879
2225
|
}
|
1880
2226
|
|
1881
2227
|
/**
|
@@ -1903,6 +2249,57 @@ export declare type PlayerProviderProps = {
|
|
1903
2249
|
playerWrapperId?: string;
|
1904
2250
|
};
|
1905
2251
|
|
2252
|
+
/**
|
2253
|
+
* TODO same name as core-js entity, not convenient
|
2254
|
+
* @public
|
2255
|
+
*/
|
2256
|
+
export declare type PlayerSource = VodTivioSourceInterface | VodExternalSourceInterface | ChannelSourceInterface | VirtualChannelSourceInterface;
|
2257
|
+
|
2258
|
+
/**
|
2259
|
+
* Use this interface only for inheritance. Otherwise use {@link PlayerSource}
|
2260
|
+
* @public
|
2261
|
+
*/
|
2262
|
+
export declare interface PlayerSourceInterface<T extends NonAdSourceType = NonAdSourceType> extends CommonSourceInterface<T> {
|
2263
|
+
adSegment: AdSegment | null;
|
2264
|
+
consumedAds: ConsumedAds;
|
2265
|
+
currentMarker: any | null;
|
2266
|
+
markers: any[];
|
2267
|
+
setMarkers(markers: any[]): void;
|
2268
|
+
isMarkersLoaded: boolean;
|
2269
|
+
setOutroMarker(marker: any): void;
|
2270
|
+
durationMs: number;
|
2271
|
+
setDurationMs(ms: number): void;
|
2272
|
+
reset(): void;
|
2273
|
+
cutout: Cutout | null;
|
2274
|
+
destroy(): void;
|
2275
|
+
seekTo(ms: number): void;
|
2276
|
+
adMonetization: any;
|
2277
|
+
setAdMonetization(monetization: any): void;
|
2278
|
+
setInitialTime(ms: number): void;
|
2279
|
+
setContinueFromPosition(ms: ContinuePosition): void;
|
2280
|
+
isLive: boolean;
|
2281
|
+
sourcePlayMode?: SourcePlayMode;
|
2282
|
+
language?: LangCode | null;
|
2283
|
+
availableLanguages?: LangCode[] | null;
|
2284
|
+
startOrResumeReactions(): void;
|
2285
|
+
pauseReactions(): void;
|
2286
|
+
correctStartPosition(): Promise<void | null>;
|
2287
|
+
setCanSeek(canSeek: boolean): void;
|
2288
|
+
originalOptions: Record<string, any>;
|
2289
|
+
}
|
2290
|
+
|
2291
|
+
/**
|
2292
|
+
* @public
|
2293
|
+
*/
|
2294
|
+
export declare interface PlayerSourceParams<T extends NonAdSourceType = NonAdSourceType> extends CommonSourceParams<T> {
|
2295
|
+
originalOptions?: Record<string, any>;
|
2296
|
+
continuePositionMs?: ContinuePosition;
|
2297
|
+
poster?: string | null;
|
2298
|
+
language?: LangCode | null;
|
2299
|
+
availableLanguages?: LangCode[] | null;
|
2300
|
+
sourcePlayMode: SourcePlayMode;
|
2301
|
+
}
|
2302
|
+
|
1906
2303
|
/**
|
1907
2304
|
* @public
|
1908
2305
|
*/
|
@@ -1911,7 +2308,7 @@ export declare type PlayerState = 'idle' | 'playing' | 'paused';
|
|
1911
2308
|
/**
|
1912
2309
|
* @public
|
1913
2310
|
*/
|
1914
|
-
export declare
|
2311
|
+
export declare interface PlayerWrapper {
|
1915
2312
|
/**
|
1916
2313
|
* Report that playback of video has finished
|
1917
2314
|
*/
|
@@ -1927,7 +2324,7 @@ export declare type PlayerWrapper = {
|
|
1927
2324
|
/**
|
1928
2325
|
* Send source to Tivio
|
1929
2326
|
*/
|
1930
|
-
onSourceChanged: (source:
|
2327
|
+
onSourceChanged: (source: PlayerSource | null) => void;
|
1931
2328
|
/**
|
1932
2329
|
* Report that video failed to load (never started playing)
|
1933
2330
|
*/
|
@@ -1947,13 +2344,8 @@ export declare type PlayerWrapper = {
|
|
1947
2344
|
/**
|
1948
2345
|
* Currently playing source
|
1949
2346
|
*/
|
1950
|
-
source:
|
1951
|
-
events:
|
1952
|
-
isSupported: (even: string) => boolean;
|
1953
|
-
addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
|
1954
|
-
removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
|
1955
|
-
removeAllListeners: () => void;
|
1956
|
-
};
|
2347
|
+
source: PlayerSource | null;
|
2348
|
+
events: EmitterInterface;
|
1957
2349
|
/**
|
1958
2350
|
* Register a low level player that implements player methods, like play video, change volume, etc.
|
1959
2351
|
*/
|
@@ -1962,11 +2354,11 @@ export declare type PlayerWrapper = {
|
|
1962
2354
|
* duration of current source in ms (both setter and getter)
|
1963
2355
|
*/
|
1964
2356
|
durationMs: number | null;
|
1965
|
-
isPlaybackStarted
|
2357
|
+
isPlaybackStarted?: boolean;
|
1966
2358
|
isPaused: boolean;
|
1967
2359
|
isPlaying: boolean;
|
1968
2360
|
isIdle: boolean;
|
1969
|
-
error:
|
2361
|
+
error: PlayerError | null;
|
1970
2362
|
/**
|
1971
2363
|
* Replay the video that finished playback
|
1972
2364
|
*/
|
@@ -1987,7 +2379,7 @@ export declare type PlayerWrapper = {
|
|
1987
2379
|
changeVolumeBy: (volume: number) => void;
|
1988
2380
|
setMuted: (muted: boolean) => void;
|
1989
2381
|
toggleMuted: () => void;
|
1990
|
-
}
|
2382
|
+
}
|
1991
2383
|
|
1992
2384
|
/**
|
1993
2385
|
* @public
|
@@ -2067,6 +2459,10 @@ export declare type Purchase = {
|
|
2067
2459
|
* Timestamp of the purchase creation in milliseconds.
|
2068
2460
|
*/
|
2069
2461
|
created: number | null;
|
2462
|
+
/**
|
2463
|
+
* Email of the user who created the purchase manually.
|
2464
|
+
*/
|
2465
|
+
createdBy?: string;
|
2070
2466
|
expirationDate: Date | null;
|
2071
2467
|
id: string;
|
2072
2468
|
isExpired: boolean;
|
@@ -2097,7 +2493,8 @@ export declare enum PurchaseDocumentGateway {
|
|
2097
2493
|
'qerko' = "qerko",
|
2098
2494
|
'oktagon' = "oktagon",
|
2099
2495
|
'voucher' = "voucher",
|
2100
|
-
'comgate' = "comgate"
|
2496
|
+
'comgate' = "comgate",
|
2497
|
+
'tivio' = "tivio"
|
2101
2498
|
}
|
2102
2499
|
|
2103
2500
|
/**
|
@@ -2483,6 +2880,35 @@ export declare enum RowComponent {
|
|
2483
2880
|
BANNER = "BANNER"
|
2484
2881
|
}
|
2485
2882
|
|
2883
|
+
declare enum RowFilterCollection {
|
2884
|
+
VIDEOS = "videos",
|
2885
|
+
/**
|
2886
|
+
* This is not real collection path. Path always should be ${organizationId}/tags
|
2887
|
+
*/
|
2888
|
+
TAGS = "tags",
|
2889
|
+
TV_CHANNELS = "tvChannels"
|
2890
|
+
}
|
2891
|
+
|
2892
|
+
/**
|
2893
|
+
* RowFilterField that is used in @tivio/firebase needs to be retyped here.
|
2894
|
+
* @public
|
2895
|
+
*/
|
2896
|
+
export declare interface RowFilterField {
|
2897
|
+
collection: RowFilterCollection;
|
2898
|
+
limit?: number;
|
2899
|
+
orderBy: {
|
2900
|
+
fieldPath: RowOrderByFieldPath;
|
2901
|
+
directionStr: OrderByDirection;
|
2902
|
+
};
|
2903
|
+
where: RowFilterWhereField[];
|
2904
|
+
}
|
2905
|
+
|
2906
|
+
declare interface RowFilterWhereField {
|
2907
|
+
fieldPath: RowWhereFilterFieldPath;
|
2908
|
+
opStr: WhereFilterOp;
|
2909
|
+
value: any;
|
2910
|
+
}
|
2911
|
+
|
2486
2912
|
/**
|
2487
2913
|
* @public
|
2488
2914
|
*/
|
@@ -2528,6 +2954,15 @@ export declare type RowItemsSubscription = (rowId: string, cb: (error: Error | n
|
|
2528
2954
|
hasNextPage: boolean;
|
2529
2955
|
} | null, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => Disposer_2;
|
2530
2956
|
|
2957
|
+
/**
|
2958
|
+
* RowOrderByFieldPath that is used in @tivio/firebase needs to be retyped here.
|
2959
|
+
* @public
|
2960
|
+
*/
|
2961
|
+
export declare enum RowOrderByFieldPath {
|
2962
|
+
CREATED = "created",
|
2963
|
+
DEFAULT_NAME = "defaultName"
|
2964
|
+
}
|
2965
|
+
|
2531
2966
|
/**
|
2532
2967
|
* @private
|
2533
2968
|
*/
|
@@ -2536,6 +2971,15 @@ export declare interface RowStandard extends RowBase {
|
|
2536
2971
|
itemComponent: RowItemComponent;
|
2537
2972
|
}
|
2538
2973
|
|
2974
|
+
export declare enum RowWhereFilterFieldPath {
|
2975
|
+
CREATED = "created",
|
2976
|
+
TAGS = "tags",
|
2977
|
+
TAG_TYPE_REF = "tagTypeRef",
|
2978
|
+
TYPE = "type",
|
2979
|
+
CONTENT_TYPE = "contentType",
|
2980
|
+
CHANNEL_KEY = "channelKey"
|
2981
|
+
}
|
2982
|
+
|
2539
2983
|
/**
|
2540
2984
|
* @public
|
2541
2985
|
*/
|
@@ -2555,10 +2999,12 @@ export declare type Scale = '@1' | '@2' | '@3';
|
|
2555
2999
|
*/
|
2556
3000
|
declare interface Screen_2 {
|
2557
3001
|
id: string;
|
2558
|
-
name: string;
|
2559
|
-
description?: string;
|
3002
|
+
name: string | null;
|
3003
|
+
description?: string | null;
|
2560
3004
|
assets: Assets;
|
2561
3005
|
rows: Row[];
|
3006
|
+
type?: ScreenType;
|
3007
|
+
filter?: RowFilterField | null;
|
2562
3008
|
}
|
2563
3009
|
export { Screen_2 as Screen }
|
2564
3010
|
|
@@ -2597,6 +3043,12 @@ export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'f
|
|
2597
3043
|
*/
|
2598
3044
|
export declare type ScreenSubscription = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void) => Disposer_2;
|
2599
3045
|
|
3046
|
+
export declare enum ScreenType {
|
3047
|
+
DEFAULT = "default",
|
3048
|
+
GRID = "grid",
|
3049
|
+
EMBED = "embed"
|
3050
|
+
}
|
3051
|
+
|
2600
3052
|
/**
|
2601
3053
|
* Config of sdk-react. Contains all properties that can be passed via TivioProvider.
|
2602
3054
|
* Consists of TivioConfig's properties + "sdk only" properties, that are used only in sdk, not in bundle.
|
@@ -2620,6 +3072,7 @@ export declare type SdkReactConfig = Omit<TivioConfig, 'language'> & {
|
|
2620
3072
|
|
2621
3073
|
/**
|
2622
3074
|
* @public
|
3075
|
+
* @deprecated sections are no longer used.
|
2623
3076
|
*/
|
2624
3077
|
export declare interface Section {
|
2625
3078
|
id: string;
|
@@ -2662,7 +3115,7 @@ export declare const showGdprConsentPreferences: () => Promise<void>;
|
|
2662
3115
|
/**
|
2663
3116
|
* @public
|
2664
3117
|
*/
|
2665
|
-
export declare type Source = TvProgramSource | TivioVodSource |
|
3118
|
+
export declare type Source = TvProgramSource | TivioVodSource | AdSource | OtherSource | LiveTvChannelSource;
|
2666
3119
|
|
2667
3120
|
/**
|
2668
3121
|
* @public
|
@@ -2683,6 +3136,37 @@ export declare type SourceBase = {
|
|
2683
3136
|
uri: string;
|
2684
3137
|
};
|
2685
3138
|
|
3139
|
+
/**
|
3140
|
+
* Used to instantiate types of corresponding interfaces (children of {@link PlayerSourceInterface}).
|
3141
|
+
* @public
|
3142
|
+
*/
|
3143
|
+
export declare type SourceParams = VodTivioSourceParams | VodExternalSourceParams | ChannelSourceParams | VirtualChannelSourceParams;
|
3144
|
+
|
3145
|
+
/**
|
3146
|
+
* Based on this value player will change how the source is played. This, for example, affects whether source:
|
3147
|
+
* - will be seekable or not
|
3148
|
+
* - duration will be dynamically updated as time goes on
|
3149
|
+
* - live button will be shown in ui
|
3150
|
+
*/
|
3151
|
+
export declare enum SourcePlayMode {
|
3152
|
+
ON_DEMAND = "ON_DEMAND",
|
3153
|
+
LIVE = "LIVE",
|
3154
|
+
/**
|
3155
|
+
* ON_DEMAND and LIVE at the same time.
|
3156
|
+
*/
|
3157
|
+
HYBRID = "HYBRID"
|
3158
|
+
}
|
3159
|
+
|
3160
|
+
/**
|
3161
|
+
* @public
|
3162
|
+
*/
|
3163
|
+
export declare enum SourceType {
|
3164
|
+
ADVERTISEMENT = "ad",
|
3165
|
+
CHANNEL = "channel",
|
3166
|
+
VOD_TIVIO = "vod_tivio",
|
3167
|
+
VOD_EXTERNAL = "vod_external"
|
3168
|
+
}
|
3169
|
+
|
2686
3170
|
/**
|
2687
3171
|
* @public
|
2688
3172
|
*/
|
@@ -2726,6 +3210,8 @@ export declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error |
|
|
2726
3210
|
*/
|
2727
3211
|
export declare type SubscribeToItemsInRowOptions = Partial<{
|
2728
3212
|
fetchTags: boolean;
|
3213
|
+
orderBy?: OrderBy<'defaultName' | DefaultOrderByField>[];
|
3214
|
+
where?: WhereFilter[];
|
2729
3215
|
}> & PaginationOptions;
|
2730
3216
|
|
2731
3217
|
/**
|
@@ -2746,11 +3232,8 @@ export declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Err
|
|
2746
3232
|
/**
|
2747
3233
|
* @public
|
2748
3234
|
*/
|
2749
|
-
export declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOptions & {
|
2750
|
-
orderBy?:
|
2751
|
-
field: TaggedVideosOrderByField;
|
2752
|
-
})[];
|
2753
|
-
where?: WhereFilter[];
|
3235
|
+
export declare type SubscribeToTaggedVideosOptions = Omit<SubscribeToItemsInRowOptions, 'orderBy'> & {
|
3236
|
+
orderBy?: OrderBy<TaggedVideosOrderByField>[];
|
2754
3237
|
};
|
2755
3238
|
|
2756
3239
|
declare type SubscriptionInfo = {
|
@@ -2827,6 +3310,7 @@ export declare type TileOptions = {
|
|
2827
3310
|
*/
|
2828
3311
|
fontSize: number;
|
2829
3312
|
};
|
3313
|
+
color?: string;
|
2830
3314
|
};
|
2831
3315
|
|
2832
3316
|
/**
|
@@ -2960,7 +3444,7 @@ export declare type TivioComponents = {
|
|
2960
3444
|
onEnded?: () => any;
|
2961
3445
|
}>;
|
2962
3446
|
TvApp: React_2.ComponentType<TvAppProps>;
|
2963
|
-
FeatureSupportCheck: React_2.ComponentType
|
3447
|
+
FeatureSupportCheck: React_2.ComponentType;
|
2964
3448
|
CustomerScreen: React_2.ComponentType<{
|
2965
3449
|
screenId: string;
|
2966
3450
|
}>;
|
@@ -2968,6 +3452,7 @@ export declare type TivioComponents = {
|
|
2968
3452
|
tagId: string;
|
2969
3453
|
onError?: (error: Error) => void;
|
2970
3454
|
}>;
|
3455
|
+
WebGridScreen: React_2.ComponentType<WebGridScreenProps>;
|
2971
3456
|
WebSearchScreen: React_2.ComponentType<{
|
2972
3457
|
searchQuery?: string;
|
2973
3458
|
}>;
|
@@ -2975,6 +3460,8 @@ export declare type TivioComponents = {
|
|
2975
3460
|
WebTile: React_2.ComponentType<{
|
2976
3461
|
item?: ItemsInRow;
|
2977
3462
|
} & TilePropsPartial>;
|
3463
|
+
ChannelContext: React_2.Context<TvChannel | undefined>;
|
3464
|
+
ContentSortPicker: React_2.ComponentType<ContentSortPickerProps>;
|
2978
3465
|
};
|
2979
3466
|
|
2980
3467
|
/**
|
@@ -3061,9 +3548,9 @@ export declare type TivioGetters = {
|
|
3061
3548
|
*/
|
3062
3549
|
export declare type TivioHooks = {
|
3063
3550
|
useAd: () => [(AdExternal | null)];
|
3064
|
-
useAdSegment: () =>
|
3551
|
+
useAdSegment: () => AdSegment_2 | null;
|
3065
3552
|
useCancelSubscription: UseCancelSubscription;
|
3066
|
-
useItemsInRow: (rowId
|
3553
|
+
useItemsInRow: (rowId?: string, options?: PaginationOptions) => {
|
3067
3554
|
pagination: PaginationInterface<ItemsInRow> | null;
|
3068
3555
|
error: Error | null;
|
3069
3556
|
};
|
@@ -3079,20 +3566,19 @@ export declare type TivioHooks = {
|
|
3079
3566
|
pagination: PaginationInterface<Row> | null;
|
3080
3567
|
error: Error | null;
|
3081
3568
|
};
|
3082
|
-
|
3569
|
+
useTag: (tagId: string) => {
|
3570
|
+
tag: Tag | null;
|
3571
|
+
};
|
3572
|
+
useTaggedVideos: (tagIds: string[], options: SubscribeToTaggedVideosOptions) => {
|
3083
3573
|
pagination: PaginationInterface<Video> | null;
|
3084
3574
|
error: Error | null;
|
3085
3575
|
};
|
3086
3576
|
useSearch: UseSearch;
|
3087
|
-
useVideo: (videoId
|
3577
|
+
useVideo: (videoId?: string) => {
|
3088
3578
|
data: Video | null;
|
3089
3579
|
error: string | null;
|
3090
3580
|
};
|
3091
3581
|
useVoucher: (voucherId: string) => any;
|
3092
|
-
useWatchWithoutAdsOffer: () => {
|
3093
|
-
canPurchaseWatchWithoutAds: boolean;
|
3094
|
-
showPurchaseDialog: () => void;
|
3095
|
-
};
|
3096
3582
|
useApplyInviteCode: () => {
|
3097
3583
|
applyInviteCodeResult?: boolean;
|
3098
3584
|
loading: boolean;
|
@@ -3101,6 +3587,7 @@ export declare type TivioHooks = {
|
|
3101
3587
|
inviteCodeReset: () => void;
|
3102
3588
|
};
|
3103
3589
|
useChannelSource: UseChannelSource;
|
3590
|
+
useTvChannel: UseTvChannel;
|
3104
3591
|
};
|
3105
3592
|
|
3106
3593
|
/**
|
@@ -3128,6 +3615,7 @@ export declare type TivioInternalComponents = {
|
|
3128
3615
|
UserProfilesOverlay: React_2.ComponentType<{
|
3129
3616
|
onClose: (selectedProfileId: string) => void;
|
3130
3617
|
}>;
|
3618
|
+
Banner: React_2.ComponentType<BannerPropsPartial>;
|
3131
3619
|
};
|
3132
3620
|
|
3133
3621
|
/**
|
@@ -3142,6 +3630,19 @@ export declare type TivioInternalHooks = {
|
|
3142
3630
|
usePurchasesWithVideos: () => {
|
3143
3631
|
purchases: Purchase[];
|
3144
3632
|
};
|
3633
|
+
useEpisodes: (seriesTagId: string | null | undefined, seasonNumber: number | null, options: UseEpisodesQueryOptions) => UseEpisodesResult;
|
3634
|
+
useVideosInScreen: (filters: RowFilterField) => {
|
3635
|
+
pagination: PaginationInterface<Video> | null;
|
3636
|
+
error: Error | null;
|
3637
|
+
};
|
3638
|
+
useSimilars: () => {
|
3639
|
+
getSimilars: ({ videoId, similarsQuery }: {
|
3640
|
+
videoId: string;
|
3641
|
+
similarsQuery?: RecommendationsQuery | undefined;
|
3642
|
+
}) => Promise<void>;
|
3643
|
+
pagination: PaginationInterface<Video>;
|
3644
|
+
error: Error | null;
|
3645
|
+
};
|
3145
3646
|
useOrganizationSubscriptions: (onlyPurchasableSubscriptions?: boolean, videoId?: string) => {
|
3146
3647
|
subscriptions: PurchasableMonetization[];
|
3147
3648
|
};
|
@@ -3167,6 +3668,8 @@ export declare type TivioInternalHooks = {
|
|
3167
3668
|
isSignedIn: boolean;
|
3168
3669
|
};
|
3169
3670
|
useOrganization: () => Organization | null;
|
3671
|
+
useRow: UseRow;
|
3672
|
+
useScreen: (screenId: string | null) => Screen_2 | null;
|
3170
3673
|
};
|
3171
3674
|
|
3172
3675
|
/**
|
@@ -3470,6 +3973,7 @@ export declare interface TvChannel extends RowItem {
|
|
3470
3973
|
country?: string;
|
3471
3974
|
filters: string[];
|
3472
3975
|
logo?: string;
|
3976
|
+
logoPendingOverlayWidth?: string;
|
3473
3977
|
hls: string;
|
3474
3978
|
dash: string;
|
3475
3979
|
/**
|
@@ -3487,15 +3991,34 @@ export declare interface TvChannel extends RowItem {
|
|
3487
3991
|
cover: string;
|
3488
3992
|
isPlayable: boolean;
|
3489
3993
|
url: string;
|
3994
|
+
type?: TvChannelType;
|
3490
3995
|
}
|
3491
3996
|
|
3997
|
+
export declare enum TvChannelType {
|
3998
|
+
/**
|
3999
|
+
* Classic live tv channel
|
4000
|
+
*/
|
4001
|
+
CLASSIC = "CLASSIC",
|
4002
|
+
/**
|
4003
|
+
* "Virtual" tv channel constructed from separate videos
|
4004
|
+
*/
|
4005
|
+
VIRTUAL = "VIRTUAL"
|
4006
|
+
}
|
4007
|
+
|
4008
|
+
/**
|
4009
|
+
* @public
|
4010
|
+
*/
|
4011
|
+
export declare type TvMode = 'startover' | 'timeshift';
|
4012
|
+
|
3492
4013
|
export declare interface TvProgram {
|
4014
|
+
id: string;
|
3493
4015
|
from: Date | null;
|
3494
4016
|
to: Date | null;
|
3495
4017
|
name: string;
|
3496
4018
|
description: string;
|
3497
4019
|
url: string;
|
3498
4020
|
image: string;
|
4021
|
+
landscape?: string | null;
|
3499
4022
|
video: Video | null;
|
3500
4023
|
}
|
3501
4024
|
|
@@ -3528,6 +4051,13 @@ export declare type TvProgramSource = SourceBase & StartAndContinuePosition & {
|
|
3528
4051
|
streamStart: Date;
|
3529
4052
|
};
|
3530
4053
|
|
4054
|
+
export declare enum TvStreamType {
|
4055
|
+
STARTOVER = "startover",
|
4056
|
+
TIMESHIFT = "timeshift",
|
4057
|
+
LIVE = "live",
|
4058
|
+
ALL = "all"
|
4059
|
+
}
|
4060
|
+
|
3531
4061
|
/**
|
3532
4062
|
* @public
|
3533
4063
|
*/
|
@@ -3571,11 +4101,6 @@ export declare function useApplyInviteCode(): {
|
|
3571
4101
|
inviteCodeReset: () => void;
|
3572
4102
|
};
|
3573
4103
|
|
3574
|
-
/**
|
3575
|
-
* @public
|
3576
|
-
*/
|
3577
|
-
export declare const useBetOffer: () => BetOffer | null;
|
3578
|
-
|
3579
4104
|
/**
|
3580
4105
|
* @public
|
3581
4106
|
*/
|
@@ -3601,20 +4126,25 @@ export declare interface UseCancelSubscriptionsResult {
|
|
3601
4126
|
|
3602
4127
|
/**
|
3603
4128
|
* @public
|
4129
|
+
* @deprecated No longer used. Pass channel path to 'WebPlayer.source' prop instead. Path can be obtained with useTvChannel hook.
|
3604
4130
|
*/
|
3605
4131
|
export declare type UseChannelSource = (tvChannelId: string) => {
|
3606
|
-
source:
|
4132
|
+
source: string;
|
3607
4133
|
error: Error | null;
|
3608
4134
|
};
|
3609
4135
|
|
3610
4136
|
/**
|
3611
4137
|
* Use channel source
|
3612
4138
|
* @param tvChannelId
|
4139
|
+
* @deprecated No longer used. Pass channel path to 'WebPlayer.source' prop instead. Path can be obtained with useTvChannel hook.
|
3613
4140
|
* @public
|
3614
4141
|
*/
|
3615
4142
|
export declare const useChannelSource: (tvChannelId: string) => {
|
3616
|
-
source:
|
4143
|
+
source: string;
|
3617
4144
|
error: Error | null;
|
4145
|
+
} | {
|
4146
|
+
error: null;
|
4147
|
+
source: null;
|
3618
4148
|
};
|
3619
4149
|
|
3620
4150
|
/**
|
@@ -3622,6 +4152,37 @@ export declare const useChannelSource: (tvChannelId: string) => {
|
|
3622
4152
|
*/
|
3623
4153
|
export declare const useCurrentMarker: () => Marker | null;
|
3624
4154
|
|
4155
|
+
/**
|
4156
|
+
* @public
|
4157
|
+
*/
|
4158
|
+
export declare type UseEpisodesQueryOptions = {
|
4159
|
+
limit: number;
|
4160
|
+
fetchTags?: boolean;
|
4161
|
+
orderBy?: SubscribeToTaggedVideosOptions['orderBy'];
|
4162
|
+
};
|
4163
|
+
|
4164
|
+
/**
|
4165
|
+
* @public
|
4166
|
+
*/
|
4167
|
+
export declare type UseEpisodesResult = {
|
4168
|
+
/**
|
4169
|
+
* Episodes of concrete season of series defined by seriesTagId.
|
4170
|
+
*/
|
4171
|
+
episodes: Video[];
|
4172
|
+
/**
|
4173
|
+
* Function to fetch more episodes
|
4174
|
+
*/
|
4175
|
+
fetchMoreEpisodes?: () => void;
|
4176
|
+
/**
|
4177
|
+
* True when fetching data
|
4178
|
+
*/
|
4179
|
+
episodesLoading: boolean;
|
4180
|
+
/**
|
4181
|
+
* True when there are more episodes to fetch
|
4182
|
+
*/
|
4183
|
+
hasMoreEpisodes: boolean;
|
4184
|
+
};
|
4185
|
+
|
3625
4186
|
/**
|
3626
4187
|
* @public
|
3627
4188
|
*/
|
@@ -3647,7 +4208,7 @@ export declare const useIsMonetizationPurchased: () => {
|
|
3647
4208
|
* @param options - subscription options
|
3648
4209
|
* @public
|
3649
4210
|
*/
|
3650
|
-
export declare const useItemsInRow: (rowId
|
4211
|
+
export declare const useItemsInRow: (rowId?: string, options?: SubscribeToItemsInRowOptions) => {
|
3651
4212
|
pagination: PaginationInterface<ItemsInRow> | null;
|
3652
4213
|
error: Error | null;
|
3653
4214
|
};
|
@@ -3747,6 +4308,14 @@ export declare enum UserGroup {
|
|
3747
4308
|
PREMIUM = "premium"
|
3748
4309
|
}
|
3749
4310
|
|
4311
|
+
/**
|
4312
|
+
* @public
|
4313
|
+
*/
|
4314
|
+
export declare type UseRow = (rowId: string | null) => {
|
4315
|
+
row: Row | null;
|
4316
|
+
error: Error | null;
|
4317
|
+
};
|
4318
|
+
|
3750
4319
|
/**
|
3751
4320
|
* @public
|
3752
4321
|
*/
|
@@ -3821,7 +4390,7 @@ export declare const useSeekState: () => boolean | null;
|
|
3821
4390
|
* @param options - subscription options
|
3822
4391
|
* @public
|
3823
4392
|
*/
|
3824
|
-
export declare const useTaggedVideos: (tagIds: string[], options?:
|
4393
|
+
export declare const useTaggedVideos: (tagIds: string[], options?: SubscribeToTaggedVideosOptions) => {
|
3825
4394
|
pagination: PaginationInterface<Video> | null;
|
3826
4395
|
error: Error | null;
|
3827
4396
|
};
|
@@ -3890,15 +4459,15 @@ export declare const useVoucher: (voucherId: string) => {
|
|
3890
4459
|
/**
|
3891
4460
|
* @public
|
3892
4461
|
*/
|
3893
|
-
export declare const
|
3894
|
-
canPurchaseWatchWithoutAds: boolean;
|
3895
|
-
showPurchaseDialog: () => void;
|
3896
|
-
};
|
4462
|
+
export declare const VAST_PROVIDERS: VastProvidersItem[];
|
3897
4463
|
|
3898
4464
|
/**
|
3899
4465
|
* @public
|
4466
|
+
* null - classic VAST
|
4467
|
+
* VPAID - VAST with VPAID extension
|
4468
|
+
* others...
|
3900
4469
|
*/
|
3901
|
-
export declare
|
4470
|
+
export declare type VastApiFramework = string | 'VPAID' | null;
|
3902
4471
|
|
3903
4472
|
/**
|
3904
4473
|
* @public
|
@@ -3963,6 +4532,12 @@ export declare interface Video extends RowItem {
|
|
3963
4532
|
}): Promise<GetSourceUrlResponse & {
|
3964
4533
|
language?: LangCode;
|
3965
4534
|
}>;
|
4535
|
+
getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex: number): {
|
4536
|
+
url: string;
|
4537
|
+
x: number;
|
4538
|
+
y: number;
|
4539
|
+
timeMs: number;
|
4540
|
+
} | null;
|
3966
4541
|
purchasableMonetization: any | null;
|
3967
4542
|
transaction: PurchasableMonetization | undefined;
|
3968
4543
|
subscriptions: PurchasableMonetization[];
|
@@ -4105,42 +4680,76 @@ export declare interface ViewCountItem {
|
|
4105
4680
|
/**
|
4106
4681
|
* @public
|
4107
4682
|
*/
|
4108
|
-
export declare interface
|
4109
|
-
|
4110
|
-
|
4683
|
+
export declare interface VirtualChannelSourceInterface extends ChannelSourceInterface {
|
4684
|
+
tvChannelType: TvChannelType.VIRTUAL;
|
4685
|
+
program?: TvProgram | null;
|
4686
|
+
video?: Video | null;
|
4687
|
+
isPlayingBySchedule: boolean;
|
4688
|
+
clone(params?: Partial<VirtualChannelSourceParams>): VirtualChannelSourceInterface;
|
4689
|
+
initializeNext(): Promise<void>;
|
4111
4690
|
}
|
4112
4691
|
|
4113
4692
|
/**
|
4114
4693
|
* @public
|
4115
4694
|
*/
|
4116
|
-
export declare
|
4117
|
-
|
4118
|
-
|
4119
|
-
|
4120
|
-
name: string;
|
4121
|
-
url: string;
|
4122
|
-
};
|
4695
|
+
export declare interface VirtualChannelSourceParams extends ChannelSourceParams {
|
4696
|
+
tvChannelType: TvChannelType.VIRTUAL;
|
4697
|
+
currentProgram?: TvProgram | null;
|
4698
|
+
}
|
4123
4699
|
|
4124
4700
|
/**
|
4125
4701
|
* @public
|
4126
4702
|
*/
|
4127
|
-
export declare
|
4128
|
-
|
4129
|
-
|
4130
|
-
|
4131
|
-
|
4132
|
-
url: string;
|
4133
|
-
};
|
4703
|
+
export declare interface VodExternalSourceInterface extends PlayerSourceInterface<SourceType.VOD_EXTERNAL> {
|
4704
|
+
monetizationId?: string;
|
4705
|
+
originalOptions: Record<string, any>;
|
4706
|
+
poster: string | null;
|
4707
|
+
}
|
4134
4708
|
|
4135
|
-
|
4136
|
-
|
4137
|
-
|
4138
|
-
|
4139
|
-
|
4140
|
-
|
4141
|
-
|
4709
|
+
/**
|
4710
|
+
* @public
|
4711
|
+
*/
|
4712
|
+
export declare interface VodExternalSourceParams extends PlayerSourceParams<SourceType.VOD_EXTERNAL> {
|
4713
|
+
monetizationId?: string;
|
4714
|
+
}
|
4715
|
+
|
4716
|
+
/**
|
4717
|
+
* @public
|
4718
|
+
*/
|
4719
|
+
export declare interface VodTivioSourceInterface extends PlayerSourceInterface<SourceType.VOD_TIVIO> {
|
4720
|
+
/**
|
4721
|
+
* e.g. 259ud0fgdf4
|
4722
|
+
*/
|
4142
4723
|
adMonetizationId?: string;
|
4724
|
+
/**
|
4725
|
+
* e.g. videos/1532543
|
4726
|
+
*/
|
4727
|
+
videoPath: string;
|
4728
|
+
poster: string | null;
|
4729
|
+
/**
|
4730
|
+
* Position to continue playing from in milliseconds
|
4731
|
+
*/
|
4732
|
+
continuePositionMs?: ContinuePosition;
|
4733
|
+
/**
|
4734
|
+
* Drm configuration
|
4735
|
+
*/
|
4736
|
+
drm?: Drm;
|
4737
|
+
watermark: Watermark | null;
|
4738
|
+
canWatchOnDevice: boolean;
|
4739
|
+
isAvailable: boolean;
|
4143
4740
|
availability: VideoAvailability | null;
|
4741
|
+
video: Video;
|
4742
|
+
clone: (params?: Partial<VodTivioSourceParams>) => VodTivioSourceInterface;
|
4743
|
+
}
|
4744
|
+
|
4745
|
+
/**
|
4746
|
+
* @public
|
4747
|
+
*/
|
4748
|
+
export declare interface VodTivioSourceParams extends PlayerSourceParams<SourceType.VOD_TIVIO> {
|
4749
|
+
videoPath: string;
|
4750
|
+
adMonetizationId?: string;
|
4751
|
+
language?: LangCode;
|
4752
|
+
drm?: Drm;
|
4144
4753
|
}
|
4145
4754
|
|
4146
4755
|
/**
|
@@ -4163,12 +4772,31 @@ export declare interface WarningConfirmationOverlayPayload extends ConfirmationO
|
|
4163
4772
|
closeButtonText?: string;
|
4164
4773
|
}
|
4165
4774
|
|
4775
|
+
/**
|
4776
|
+
* @public
|
4777
|
+
*/
|
4778
|
+
export declare interface Watermark {
|
4779
|
+
caption: string;
|
4780
|
+
size: 'large' | 'medium';
|
4781
|
+
}
|
4782
|
+
|
4783
|
+
/**
|
4784
|
+
* @public
|
4785
|
+
*/
|
4786
|
+
export declare type WebGridScreenProps = {
|
4787
|
+
screen?: Screen_2;
|
4788
|
+
seriesId?: string;
|
4789
|
+
season?: number;
|
4790
|
+
rowId?: string;
|
4791
|
+
videoId?: string;
|
4792
|
+
};
|
4793
|
+
|
4166
4794
|
/**
|
4167
4795
|
* @public
|
4168
4796
|
*/
|
4169
4797
|
export declare interface WebPlayerProps {
|
4170
4798
|
id: string;
|
4171
|
-
source?:
|
4799
|
+
source?: SourceParams | VideoPath | ChannelPath | null;
|
4172
4800
|
onEnded?: () => any;
|
4173
4801
|
/**
|
4174
4802
|
* If this function is specified, then "Back" button is shown in top right corner.
|
@@ -4215,6 +4843,41 @@ export declare interface WebPlayerProps {
|
|
4215
4843
|
* @deprecated this callback is never called. Will be removed in @tivio/sdk-react version 4
|
4216
4844
|
*/
|
4217
4845
|
onPlayerControllerCreated?: (playerController: any) => void;
|
4846
|
+
/**
|
4847
|
+
* If true, saving of watch position won't be performed.
|
4848
|
+
*/
|
4849
|
+
doNotSaveWatchPosition?: boolean;
|
4850
|
+
/**
|
4851
|
+
* If true, then is muted by default, but still be possible to unmute
|
4852
|
+
*/
|
4853
|
+
isMutedByDefault?: boolean;
|
4854
|
+
markerColor?: string;
|
4855
|
+
showTvStreamType?: boolean;
|
4856
|
+
showCookiesSettings?: boolean;
|
4857
|
+
/**
|
4858
|
+
* If false, then OSD is never shown.
|
4859
|
+
* If true then OSD is shown based on condition resolved in HidableOsdContainer, e.g. on pause, on mouse move etc.
|
4860
|
+
*/
|
4861
|
+
showOsd?: boolean;
|
4862
|
+
/**
|
4863
|
+
* If false, then buffering spinner is never shown.
|
4864
|
+
* If true then buffering spinner is shown while buffering.
|
4865
|
+
*/
|
4866
|
+
showBufferingSpinner?: boolean;
|
4867
|
+
/**
|
4868
|
+
* If true, then check adblock and show warning if it's turned on.
|
4869
|
+
* If false, adblock warning is never shown.
|
4870
|
+
*/
|
4871
|
+
checkAdBlock?: boolean;
|
4872
|
+
/**
|
4873
|
+
* Player video can be scaled. Used in WebVideoDetailBanner to "hide" black stripes on video.
|
4874
|
+
* Should be positive number.
|
4875
|
+
*/
|
4876
|
+
scale?: number;
|
4877
|
+
/**
|
4878
|
+
* If true, it does not play the next video when the current video reaches the end.
|
4879
|
+
*/
|
4880
|
+
disablePlayNext?: boolean;
|
4218
4881
|
}
|
4219
4882
|
|
4220
4883
|
/**
|
@@ -4255,6 +4918,7 @@ declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-cont
|
|
4255
4918
|
|
4256
4919
|
/**
|
4257
4920
|
* @public
|
4921
|
+
* @deprecated this widget structure is no longer used.
|
4258
4922
|
*/
|
4259
4923
|
export declare type Widget = {
|
4260
4924
|
id: string;
|
@@ -4269,6 +4933,6 @@ export declare type Widget = {
|
|
4269
4933
|
/**
|
4270
4934
|
* @public
|
4271
4935
|
*/
|
4272
|
-
export declare function withPlayerContext(id: string): <P extends JSX.IntrinsicAttributes>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
|
4936
|
+
export declare function withPlayerContext(id: string): <P extends JSX.IntrinsicAttributes>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => React_2.JSX.Element;
|
4273
4937
|
|
4274
4938
|
export { }
|