@tivio/sdk-react 3.6.2 → 4.0.0
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 +117 -228
- package/README.md.bak +117 -228
- package/dist/index.d.ts +783 -292
- package/dist/index.js +1 -2
- package/dist/sdk-react.d.ts +2551 -0
- package/package.json +6 -5
- package/dist/index.js.LICENSE.txt +0 -347
@@ -0,0 +1,2551 @@
|
|
1
|
+
import { ComponentType } from 'react';
|
2
|
+
import { FunctionComponentElement } from 'react';
|
3
|
+
import { default as React_2 } from 'react';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @public
|
7
|
+
*/
|
8
|
+
export declare interface AdExternal {
|
9
|
+
/**
|
10
|
+
* Can user seek out of it?
|
11
|
+
*/
|
12
|
+
canSeek: boolean;
|
13
|
+
/**
|
14
|
+
* Can it be skipped right now?
|
15
|
+
*/
|
16
|
+
canSkip: boolean;
|
17
|
+
durationMs: number;
|
18
|
+
/**
|
19
|
+
* Is it skippable in general?
|
20
|
+
*/
|
21
|
+
isSkippable: boolean;
|
22
|
+
order: number | null;
|
23
|
+
secondsToSkippable: number | null;
|
24
|
+
/**
|
25
|
+
* Countdown for un-skippable ads
|
26
|
+
*/
|
27
|
+
secondsToEnd: number;
|
28
|
+
skipDelayMs: number | null;
|
29
|
+
/**
|
30
|
+
* How many ads are there in total
|
31
|
+
*/
|
32
|
+
totalCount: number | null;
|
33
|
+
click: () => void;
|
34
|
+
/**
|
35
|
+
* @private
|
36
|
+
*/
|
37
|
+
skip: () => void;
|
38
|
+
}
|
39
|
+
|
40
|
+
declare type AdSegment = {
|
41
|
+
id: string;
|
42
|
+
/**
|
43
|
+
* @deprecated alias to secondsToEnd * 1000
|
44
|
+
*/
|
45
|
+
remainingMs: number;
|
46
|
+
secondsToEnd: number;
|
47
|
+
secondsToSkippable: number | null;
|
48
|
+
canSeek: boolean;
|
49
|
+
/**
|
50
|
+
* true if is skippable and skip countdown has passed
|
51
|
+
*/
|
52
|
+
canSkip: boolean;
|
53
|
+
/**
|
54
|
+
* true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
|
55
|
+
*/
|
56
|
+
isSkippable: boolean;
|
57
|
+
skip: () => any;
|
58
|
+
};
|
59
|
+
|
60
|
+
/**
|
61
|
+
* @public
|
62
|
+
*/
|
63
|
+
export declare type AdSource = {
|
64
|
+
new (uri: string, name: string, description: string, skipDelayMs: number | null, adDurationMs: number, trackingContext?: any, // internal Tivio types
|
65
|
+
adMarker?: any, // internal Tivio types
|
66
|
+
packInfo?: any, // internal Tivio types
|
67
|
+
provider?: any): AdSource;
|
68
|
+
description: string;
|
69
|
+
name: string;
|
70
|
+
uri: string;
|
71
|
+
durationMs: number;
|
72
|
+
skipDelayMs: number | null;
|
73
|
+
type: 'ad';
|
74
|
+
/**
|
75
|
+
* true if is skippable and skip countdown has passed
|
76
|
+
*/
|
77
|
+
canSkip: boolean;
|
78
|
+
/**
|
79
|
+
* true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
|
80
|
+
*/
|
81
|
+
isSkippable: boolean;
|
82
|
+
/**
|
83
|
+
* Skip ad. Only works when canSkip is true
|
84
|
+
*/
|
85
|
+
skip: () => void;
|
86
|
+
/**
|
87
|
+
* Order in ad break (ad break is a group of ads played right after each other)
|
88
|
+
*/
|
89
|
+
order: number;
|
90
|
+
/**
|
91
|
+
* Total number of ads in ad break (ad break is a group of ads played right after each other)
|
92
|
+
*/
|
93
|
+
totalCount: number;
|
94
|
+
secondsToEnd: number;
|
95
|
+
secondsToSkippable: number | null;
|
96
|
+
};
|
97
|
+
|
98
|
+
/**
|
99
|
+
* @public
|
100
|
+
*/
|
101
|
+
export declare enum ALGOLIA_INDEX_NAME {
|
102
|
+
VIDEOS = "videos",
|
103
|
+
VIDEOSDESC = "videos_created_desc",
|
104
|
+
TAGS = "tags",
|
105
|
+
TV_CHANNELS = "tvChannels",
|
106
|
+
USERS = "users"
|
107
|
+
}
|
108
|
+
|
109
|
+
/**
|
110
|
+
* @public
|
111
|
+
*/
|
112
|
+
export declare type ArrisDeviceInfo = {
|
113
|
+
type: 'arris';
|
114
|
+
model?: 'VIP1003' | 'VIP1113' | 'VIP5305';
|
115
|
+
};
|
116
|
+
|
117
|
+
/**
|
118
|
+
* @public
|
119
|
+
*/
|
120
|
+
export declare interface Asset {
|
121
|
+
background: string;
|
122
|
+
}
|
123
|
+
|
124
|
+
/**
|
125
|
+
* @public
|
126
|
+
*/
|
127
|
+
export declare type Assets = {
|
128
|
+
[assetName: string]: ScalableAsset;
|
129
|
+
};
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @public
|
133
|
+
*/
|
134
|
+
export declare type AuthOverlayPayload = {
|
135
|
+
prefilledData?: {
|
136
|
+
email: string;
|
137
|
+
};
|
138
|
+
/**
|
139
|
+
* "Goto" function (see router.utils.ts) to run after the overlay is closed. Null if no redirect is required.
|
140
|
+
* Defaults to homepage.
|
141
|
+
*/
|
142
|
+
redirectAfterSubmit?: ((...args: any[]) => void) | null;
|
143
|
+
};
|
144
|
+
|
145
|
+
/**
|
146
|
+
* @public
|
147
|
+
*/
|
148
|
+
export declare type AuthOverlayState = {
|
149
|
+
type: AuthOverlayType;
|
150
|
+
closeAuthOverlay: () => void;
|
151
|
+
openAuthOverlay: (type: AuthOverlayType, payload?: AuthOverlayPayload) => void;
|
152
|
+
payload?: AuthOverlayPayload | null;
|
153
|
+
};
|
154
|
+
|
155
|
+
/**
|
156
|
+
* @public
|
157
|
+
*/
|
158
|
+
export declare type AuthOverlayType = 'login' | 'registration' | 'closed' | 'reset-password';
|
159
|
+
|
160
|
+
/**
|
161
|
+
* @public
|
162
|
+
*/
|
163
|
+
export declare interface AvailableSeason {
|
164
|
+
seasonNumber: number;
|
165
|
+
}
|
166
|
+
|
167
|
+
/**
|
168
|
+
* @public
|
169
|
+
*/
|
170
|
+
export declare type AvatarProps = {
|
171
|
+
cover?: string;
|
172
|
+
isLoading?: boolean;
|
173
|
+
size?: number;
|
174
|
+
};
|
175
|
+
|
176
|
+
/**
|
177
|
+
* @public
|
178
|
+
*/
|
179
|
+
export declare type BadRequestError = Error & {
|
180
|
+
details?: {
|
181
|
+
reason?: 'DOES_NOT_EXIST' | 'EXPIRED' | 'ALREADY_USED';
|
182
|
+
};
|
183
|
+
};
|
184
|
+
|
185
|
+
/**
|
186
|
+
* @public
|
187
|
+
*/
|
188
|
+
export declare type BannerProps = {
|
189
|
+
isLoading: boolean;
|
190
|
+
text: string;
|
191
|
+
focused: boolean;
|
192
|
+
onClick?: () => void;
|
193
|
+
hoverable: boolean;
|
194
|
+
broadcastInfo: string;
|
195
|
+
height: number;
|
196
|
+
coverPadding: CoverPadding;
|
197
|
+
cover: string;
|
198
|
+
fullWidth: boolean;
|
199
|
+
coverContainerPaddingTop: string;
|
200
|
+
width: number;
|
201
|
+
overlay: boolean;
|
202
|
+
price: string;
|
203
|
+
hasRoundCorners: boolean;
|
204
|
+
buttonText?: string;
|
205
|
+
onButtonClick?: () => void;
|
206
|
+
};
|
207
|
+
|
208
|
+
/**
|
209
|
+
* @public
|
210
|
+
*/
|
211
|
+
export declare type BannerPropsPartial = Partial<BannerProps>;
|
212
|
+
|
213
|
+
/**
|
214
|
+
* @public
|
215
|
+
*/
|
216
|
+
export declare type BetOffer = {
|
217
|
+
betService: string;
|
218
|
+
league: string;
|
219
|
+
odds: {
|
220
|
+
winner: string;
|
221
|
+
rate: number;
|
222
|
+
}[];
|
223
|
+
sport: string;
|
224
|
+
opponent1: string;
|
225
|
+
opponent2: string;
|
226
|
+
time: Date;
|
227
|
+
};
|
228
|
+
|
229
|
+
/**
|
230
|
+
* rejects when bundle is not available
|
231
|
+
* @public
|
232
|
+
*/
|
233
|
+
export declare const bundlePromise: Promise<RemoteBundleState>;
|
234
|
+
|
235
|
+
/**
|
236
|
+
* @internal
|
237
|
+
*/
|
238
|
+
export declare type ButtonOptions = {
|
239
|
+
backgroundImage: string;
|
240
|
+
borderRadius: string | number;
|
241
|
+
};
|
242
|
+
|
243
|
+
/**
|
244
|
+
* @public
|
245
|
+
*/
|
246
|
+
export declare type Callback<T = any> = (arg?: T) => void;
|
247
|
+
|
248
|
+
/**
|
249
|
+
* @public
|
250
|
+
*/
|
251
|
+
export declare interface Channel {
|
252
|
+
id: string;
|
253
|
+
name: string;
|
254
|
+
header: string;
|
255
|
+
headerLogo: string;
|
256
|
+
recentVideos: Video[];
|
257
|
+
}
|
258
|
+
|
259
|
+
/**
|
260
|
+
* @public
|
261
|
+
*/
|
262
|
+
export declare type ChannelSource = {
|
263
|
+
new (uri: string, originalOptions: Record<string, any>, channelName: string, programName: string, programDescription: string, from: Date, to: Date): ChannelSource;
|
264
|
+
description: string;
|
265
|
+
name: string;
|
266
|
+
uri: string;
|
267
|
+
from: Date;
|
268
|
+
channelName: string;
|
269
|
+
to: Date;
|
270
|
+
type: 'channel';
|
271
|
+
watchWithoutAdsRecommendation: {
|
272
|
+
showPurchaseDialog: () => void;
|
273
|
+
} | null;
|
274
|
+
};
|
275
|
+
|
276
|
+
/**
|
277
|
+
* @public
|
278
|
+
*/
|
279
|
+
export declare interface ChannelSourcePojo {
|
280
|
+
type: 'ChannelSource';
|
281
|
+
uri: string;
|
282
|
+
originalOptions: any;
|
283
|
+
channelName: string;
|
284
|
+
programName: string;
|
285
|
+
programDescription: string;
|
286
|
+
from: Date;
|
287
|
+
to: Date;
|
288
|
+
poster?: string;
|
289
|
+
}
|
290
|
+
|
291
|
+
/**
|
292
|
+
* @public
|
293
|
+
*/
|
294
|
+
export declare type Chapter = any;
|
295
|
+
|
296
|
+
/**
|
297
|
+
* @public
|
298
|
+
*/
|
299
|
+
export declare type CmpConfig = 'default' | 'debug' | 'none';
|
300
|
+
|
301
|
+
/**
|
302
|
+
* TODO it's the same as Customizations, not?
|
303
|
+
* @internal
|
304
|
+
*/
|
305
|
+
export declare type Components = {
|
306
|
+
menu: {
|
307
|
+
height: number;
|
308
|
+
};
|
309
|
+
row: {
|
310
|
+
paddingLeft: number;
|
311
|
+
paddingVertical: number;
|
312
|
+
};
|
313
|
+
banner: {
|
314
|
+
height: number;
|
315
|
+
};
|
316
|
+
};
|
317
|
+
|
318
|
+
/**
|
319
|
+
* Just another alias. Reexported for backward compatibility.
|
320
|
+
* @public
|
321
|
+
*/
|
322
|
+
export declare type Config = SdkReactConfig;
|
323
|
+
|
324
|
+
/**
|
325
|
+
* @public
|
326
|
+
* @TODO move somewhere else
|
327
|
+
*/
|
328
|
+
export declare type CoverPadding = {
|
329
|
+
top?: number;
|
330
|
+
bottom?: number;
|
331
|
+
left?: number;
|
332
|
+
right?: number;
|
333
|
+
};
|
334
|
+
|
335
|
+
/**
|
336
|
+
* @public
|
337
|
+
*/
|
338
|
+
export declare const createPubSub: () => PubSub;
|
339
|
+
|
340
|
+
/**
|
341
|
+
* Fetch & load CommonJS remote module.
|
342
|
+
* @public
|
343
|
+
*/
|
344
|
+
export declare const createRemotePackageLoader: () => (secret: string, conf: InternalConfig) => Promise<TivioBundle>;
|
345
|
+
|
346
|
+
/**
|
347
|
+
* @public
|
348
|
+
*/
|
349
|
+
export declare const createUseRemoteBundle: () => (conf: InternalConfig) => RemoteBundleState;
|
350
|
+
|
351
|
+
/**
|
352
|
+
* @public
|
353
|
+
*/
|
354
|
+
export declare type CreateUserWithEmailAndPassword = (email: string, password: string, username?: string, phoneNumber?: string, referralToken?: string) => Promise<string | null>;
|
355
|
+
|
356
|
+
/**
|
357
|
+
* @public
|
358
|
+
*/
|
359
|
+
export declare const CURRENCIES: string[];
|
360
|
+
|
361
|
+
/**
|
362
|
+
* @public
|
363
|
+
*/
|
364
|
+
export declare type Currency = 'CZK' | 'EUR' | 'USD';
|
365
|
+
|
366
|
+
/**
|
367
|
+
* @public
|
368
|
+
*/
|
369
|
+
export declare enum CUSTOMER_BUILD {
|
370
|
+
OKTAGON = "OKTAGON",
|
371
|
+
JOJ = "JOJ",
|
372
|
+
MALL = "MALL",
|
373
|
+
GARAZ = "GARAZ",
|
374
|
+
U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
|
375
|
+
INVESTOREES = "INVESTOREES"
|
376
|
+
}
|
377
|
+
|
378
|
+
/**
|
379
|
+
* @internal
|
380
|
+
*/
|
381
|
+
export declare type Customizations = {
|
382
|
+
Tile: TileOptions;
|
383
|
+
Button: ButtonOptions;
|
384
|
+
Banner: {
|
385
|
+
backgroundImage: string;
|
386
|
+
/**
|
387
|
+
* Height in %
|
388
|
+
*/
|
389
|
+
paddingTop: string;
|
390
|
+
/**
|
391
|
+
* Width in px
|
392
|
+
*/
|
393
|
+
coverWidth: number;
|
394
|
+
fontWeight: string | number;
|
395
|
+
};
|
396
|
+
Header: {
|
397
|
+
backgroundColor: string;
|
398
|
+
activeLinkUnderlineColor: string;
|
399
|
+
logoHeight: string;
|
400
|
+
};
|
401
|
+
Input: InputOptions;
|
402
|
+
landing: {
|
403
|
+
row: {
|
404
|
+
backgroundColor: string;
|
405
|
+
};
|
406
|
+
};
|
407
|
+
global: {
|
408
|
+
/**
|
409
|
+
* Main application background style.
|
410
|
+
*/
|
411
|
+
appBackground: string;
|
412
|
+
/**
|
413
|
+
* Application background image url - used to replace main gradient
|
414
|
+
*/
|
415
|
+
appBackgroundImageUrl?: string;
|
416
|
+
/**
|
417
|
+
* Background style of success icon on "/pair" site.
|
418
|
+
*/
|
419
|
+
pairSuccessBackground: string;
|
420
|
+
};
|
421
|
+
};
|
422
|
+
|
423
|
+
/**
|
424
|
+
* @internal
|
425
|
+
*/
|
426
|
+
export declare interface CustomTheme {
|
427
|
+
customizations?: Customizations;
|
428
|
+
components: Components;
|
429
|
+
size: (size: number) => number;
|
430
|
+
}
|
431
|
+
|
432
|
+
/**
|
433
|
+
* @internal
|
434
|
+
*/
|
435
|
+
export declare interface CustomThemeOptions {
|
436
|
+
customizations?: Customizations;
|
437
|
+
components: Components;
|
438
|
+
size: (size: number) => number;
|
439
|
+
}
|
440
|
+
|
441
|
+
/**
|
442
|
+
* @public
|
443
|
+
*/
|
444
|
+
export declare const DEFAULT_ORDER_BY: {
|
445
|
+
field: DefaultOrderByField;
|
446
|
+
directionStr: OrderByDirection;
|
447
|
+
}[];
|
448
|
+
|
449
|
+
/**
|
450
|
+
* @public
|
451
|
+
*/
|
452
|
+
export declare type DefaultOrderByField = 'created';
|
453
|
+
|
454
|
+
/**
|
455
|
+
* @public
|
456
|
+
*/
|
457
|
+
export declare type DetailedPrice = {
|
458
|
+
amount: number;
|
459
|
+
currency: Currency;
|
460
|
+
frequency?: MONETIZATION_FREQUENCY;
|
461
|
+
};
|
462
|
+
|
463
|
+
/**
|
464
|
+
* @public
|
465
|
+
*/
|
466
|
+
export declare type DeviceInfo = ArrisDeviceInfo | WebosDeviceInfo | TizenDeviceInfo;
|
467
|
+
|
468
|
+
/**
|
469
|
+
* @public
|
470
|
+
*/
|
471
|
+
export declare type Disposer = () => void;
|
472
|
+
|
473
|
+
/**
|
474
|
+
* @public
|
475
|
+
*/
|
476
|
+
declare type Disposer_2 = () => void;
|
477
|
+
|
478
|
+
/**
|
479
|
+
* @public
|
480
|
+
*/
|
481
|
+
export declare type DividerProps = {
|
482
|
+
verticalSpacing?: number;
|
483
|
+
horizontalSpacing?: number;
|
484
|
+
};
|
485
|
+
|
486
|
+
/**
|
487
|
+
* @public
|
488
|
+
*/
|
489
|
+
export declare type DocumentOptions = Partial<{
|
490
|
+
lazyLoading: boolean;
|
491
|
+
subscribeOnChanges: boolean;
|
492
|
+
}>;
|
493
|
+
|
494
|
+
/**
|
495
|
+
* @public
|
496
|
+
*/
|
497
|
+
export declare type Empty = void | Promise<void> | undefined | Promise<undefined>;
|
498
|
+
|
499
|
+
/**
|
500
|
+
* @public
|
501
|
+
*/
|
502
|
+
export declare type Events = {
|
503
|
+
'on-ready': RemoteBundleState;
|
504
|
+
'on-error': Error;
|
505
|
+
};
|
506
|
+
|
507
|
+
/**
|
508
|
+
* @public
|
509
|
+
*/
|
510
|
+
export declare type ExternalTvConfig = {
|
511
|
+
logo: string;
|
512
|
+
};
|
513
|
+
|
514
|
+
/**
|
515
|
+
* @throws if fetch fails
|
516
|
+
* @public
|
517
|
+
*/
|
518
|
+
export declare const fetchBundle: (secret: string, conf: InternalConfig) => Promise<string>;
|
519
|
+
|
520
|
+
/**
|
521
|
+
* Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
|
522
|
+
* nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
523
|
+
*/
|
524
|
+
declare type FetchPackage = (url: string) => Promise<string>;
|
525
|
+
|
526
|
+
/**
|
527
|
+
* @public
|
528
|
+
*/
|
529
|
+
export declare interface GenericOnCallError {
|
530
|
+
code: string;
|
531
|
+
message?: string;
|
532
|
+
details?: string[];
|
533
|
+
}
|
534
|
+
|
535
|
+
/**
|
536
|
+
* Share singleton instance
|
537
|
+
* @public
|
538
|
+
*/
|
539
|
+
export declare const getPubSub: () => PubSub;
|
540
|
+
|
541
|
+
/**
|
542
|
+
* @public
|
543
|
+
*/
|
544
|
+
export declare interface IndexedObject {
|
545
|
+
objectID: string;
|
546
|
+
path: string;
|
547
|
+
}
|
548
|
+
|
549
|
+
/**
|
550
|
+
* @public
|
551
|
+
*/
|
552
|
+
export declare interface IndexedTag extends IndexedObject {
|
553
|
+
tagId: string;
|
554
|
+
tagTypePath?: string;
|
555
|
+
organizationPath: string;
|
556
|
+
created: Date;
|
557
|
+
name: Translation;
|
558
|
+
description?: string;
|
559
|
+
}
|
560
|
+
|
561
|
+
/**
|
562
|
+
* @public
|
563
|
+
*/
|
564
|
+
export declare interface IndexedTvChannel extends IndexedObject {
|
565
|
+
channelKey: string;
|
566
|
+
created: Date;
|
567
|
+
filters: string[];
|
568
|
+
name: string;
|
569
|
+
organizationPath: string;
|
570
|
+
}
|
571
|
+
|
572
|
+
/**
|
573
|
+
* @public
|
574
|
+
*/
|
575
|
+
export declare interface IndexedUser extends IndexedObject {
|
576
|
+
authUserId: string;
|
577
|
+
type: string;
|
578
|
+
externalUserId?: string;
|
579
|
+
email?: string;
|
580
|
+
organizationPath?: string;
|
581
|
+
}
|
582
|
+
|
583
|
+
/**
|
584
|
+
* @public
|
585
|
+
*/
|
586
|
+
export declare interface IndexedVideo extends IndexedObject {
|
587
|
+
organizationPath?: string;
|
588
|
+
tagPaths?: string[];
|
589
|
+
created: Date;
|
590
|
+
isDraft: boolean;
|
591
|
+
type: VideoType;
|
592
|
+
contentType?: VideoContentType;
|
593
|
+
name: string;
|
594
|
+
description: string;
|
595
|
+
hide: boolean;
|
596
|
+
isDuplicate: boolean;
|
597
|
+
externals?: VideoExternals;
|
598
|
+
}
|
599
|
+
|
600
|
+
/**
|
601
|
+
* @internal
|
602
|
+
*/
|
603
|
+
export declare type InputOptions = {
|
604
|
+
borderRadius: string;
|
605
|
+
};
|
606
|
+
|
607
|
+
/**
|
608
|
+
* @public
|
609
|
+
*/
|
610
|
+
export declare type InputSource = AdSource | ChannelSource | VodTivioSource | VodExternalSource;
|
611
|
+
|
612
|
+
/**
|
613
|
+
* @public
|
614
|
+
*/
|
615
|
+
export declare type InternalConfig = SdkReactConfig & {
|
616
|
+
fetchPackage: FetchPackage;
|
617
|
+
pubSub: PubSub;
|
618
|
+
/**
|
619
|
+
* @private URL of resolver. Resolver is a script used to fetch remove code bundle
|
620
|
+
*/
|
621
|
+
resolverUrl: string;
|
622
|
+
sdkVersion: string;
|
623
|
+
/**
|
624
|
+
* @private URL of remote code bundle to be fetched directly (without using resolver)
|
625
|
+
*/
|
626
|
+
bundleUrlOverride?: string;
|
627
|
+
/**
|
628
|
+
* @private
|
629
|
+
* Run HTML, CSS and JS feature support check
|
630
|
+
*/
|
631
|
+
runFeatureSupportCheck?: boolean;
|
632
|
+
/**
|
633
|
+
* @private
|
634
|
+
*/
|
635
|
+
forceCloudFnResolver?: boolean;
|
636
|
+
};
|
637
|
+
|
638
|
+
/**
|
639
|
+
* @public
|
640
|
+
*/
|
641
|
+
export declare type InternalTvConfig = {
|
642
|
+
logo: string;
|
643
|
+
screens: ScreenConfig[];
|
644
|
+
};
|
645
|
+
|
646
|
+
declare interface IntroMarker {
|
647
|
+
marker: Marker;
|
648
|
+
skip: () => void;
|
649
|
+
}
|
650
|
+
|
651
|
+
/**
|
652
|
+
* @public
|
653
|
+
*/
|
654
|
+
export declare type ItemsInRow = Tag | Video | TvChannel;
|
655
|
+
|
656
|
+
/**
|
657
|
+
* Enum of all supported languages codes as in ISO 639-1
|
658
|
+
* @public
|
659
|
+
*/
|
660
|
+
export declare enum LangCode {
|
661
|
+
CS = "cs",
|
662
|
+
DE = "de",
|
663
|
+
EN = "en",
|
664
|
+
FR = "fr",
|
665
|
+
PL = "pl",
|
666
|
+
SK = "sk",
|
667
|
+
SP = "sp"
|
668
|
+
}
|
669
|
+
|
670
|
+
/**
|
671
|
+
* All supported languages codes as in ISO 639-1
|
672
|
+
* @public
|
673
|
+
*/
|
674
|
+
export declare const languages: LangCode[];
|
675
|
+
|
676
|
+
/**
|
677
|
+
* Possible language key of all supported language mutations.
|
678
|
+
* @public
|
679
|
+
*/
|
680
|
+
export declare type LanguageType = `${LangCode}`;
|
681
|
+
|
682
|
+
/**
|
683
|
+
* @public
|
684
|
+
*/
|
685
|
+
export declare type LinkedVideo = {
|
686
|
+
video: Video;
|
687
|
+
type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD';
|
688
|
+
};
|
689
|
+
|
690
|
+
declare interface Logger {
|
691
|
+
/** important messages */
|
692
|
+
warn(...data: LoggerArgs): void;
|
693
|
+
/** errors */
|
694
|
+
error(...data: LoggerArgs): void;
|
695
|
+
/** critical errors */
|
696
|
+
exception(...data: LoggerArgs): void;
|
697
|
+
/** metrics */
|
698
|
+
info(...data: LoggerArgs): void;
|
699
|
+
/** non-production messages */
|
700
|
+
debug(...data: LoggerArgs): void;
|
701
|
+
}
|
702
|
+
|
703
|
+
/**
|
704
|
+
* Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
|
705
|
+
* nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
706
|
+
*/
|
707
|
+
declare type LoggerArgs = any[];
|
708
|
+
|
709
|
+
/**
|
710
|
+
* @public
|
711
|
+
*/
|
712
|
+
export declare type Marker = {
|
713
|
+
id: string;
|
714
|
+
type: string;
|
715
|
+
from: Date;
|
716
|
+
to: Date;
|
717
|
+
count?: number;
|
718
|
+
fromMs?: number;
|
719
|
+
toMs?: number;
|
720
|
+
};
|
721
|
+
|
722
|
+
/**
|
723
|
+
* @public
|
724
|
+
*/
|
725
|
+
export declare interface Monetization {
|
726
|
+
id: string;
|
727
|
+
price?: string | number;
|
728
|
+
type?: MonetizationType;
|
729
|
+
frequency?: MONETIZATION_FREQUENCY;
|
730
|
+
isPurchased?: boolean;
|
731
|
+
name?: string;
|
732
|
+
description?: string;
|
733
|
+
benefits?: Translation[];
|
734
|
+
localizedBenefits?: string[];
|
735
|
+
}
|
736
|
+
|
737
|
+
/**
|
738
|
+
* @public
|
739
|
+
*/
|
740
|
+
export declare enum MONETIZATION_FREQUENCY {
|
741
|
+
ONE_TIME_PAYMENT = "ONE_TIME_PAYMENT",
|
742
|
+
DAILY = "DAILY",
|
743
|
+
WEEKLY = "WEEKLY",
|
744
|
+
MONTHLY = "MONTHLY",
|
745
|
+
ANNUALLY = "ANNUALLY"
|
746
|
+
}
|
747
|
+
|
748
|
+
/**
|
749
|
+
* @public
|
750
|
+
* @TODO change to enum
|
751
|
+
*/
|
752
|
+
export declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription';
|
753
|
+
|
754
|
+
/**
|
755
|
+
* TODO: Duplicate, because we can't import types from core-js.
|
756
|
+
*/
|
757
|
+
/**
|
758
|
+
* @public
|
759
|
+
*/
|
760
|
+
export declare type NewVoucher = {
|
761
|
+
expirationDate: Date | number;
|
762
|
+
};
|
763
|
+
|
764
|
+
/**
|
765
|
+
* @public
|
766
|
+
*/
|
767
|
+
export declare type Nullable<T> = {
|
768
|
+
[P in keyof T]: T[P] | null;
|
769
|
+
};
|
770
|
+
|
771
|
+
/**
|
772
|
+
* @public
|
773
|
+
*/
|
774
|
+
export declare type ObjectType = Record<string, any>;
|
775
|
+
|
776
|
+
/**
|
777
|
+
* @public
|
778
|
+
*/
|
779
|
+
export declare interface OrderBy {
|
780
|
+
field: string;
|
781
|
+
directionStr?: OrderByDirection;
|
782
|
+
}
|
783
|
+
|
784
|
+
declare type OrderByDirection = 'desc' | 'asc';
|
785
|
+
|
786
|
+
/**
|
787
|
+
* @public
|
788
|
+
*/
|
789
|
+
export declare interface Organization {
|
790
|
+
}
|
791
|
+
|
792
|
+
/**
|
793
|
+
* @public
|
794
|
+
*/
|
795
|
+
export declare type PaginationInterface<Entity> = {
|
796
|
+
items: Entity[];
|
797
|
+
fetchMore: () => void;
|
798
|
+
hasNextPage?: boolean;
|
799
|
+
loading?: boolean;
|
800
|
+
};
|
801
|
+
|
802
|
+
/**
|
803
|
+
* @public
|
804
|
+
*/
|
805
|
+
export declare type PaginationOptions = Partial<{
|
806
|
+
limit: number;
|
807
|
+
noLimit: boolean;
|
808
|
+
}>;
|
809
|
+
|
810
|
+
/**
|
811
|
+
* @public
|
812
|
+
*/
|
813
|
+
export declare enum PLATFORM {
|
814
|
+
MOBILE = "MOBILE",
|
815
|
+
WEB = "WEB",
|
816
|
+
TV = "TV"
|
817
|
+
}
|
818
|
+
|
819
|
+
/**
|
820
|
+
* @public
|
821
|
+
*/
|
822
|
+
export declare interface PlayerCapability {
|
823
|
+
codec: 'h264' | 'h265';
|
824
|
+
encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
|
825
|
+
protocol: 'dash' | 'hls' | 'mp4';
|
826
|
+
}
|
827
|
+
|
828
|
+
/**
|
829
|
+
* @public
|
830
|
+
*/
|
831
|
+
export declare type PlayerConfig = {
|
832
|
+
/**
|
833
|
+
* Some devices do not seek exactly
|
834
|
+
*
|
835
|
+
* e.g. on Arris if we request seek to position P, in reality it will seek to P -+5s
|
836
|
+
* e.g. on Arris if we request play from position P, in reality it will play from P -+5s
|
837
|
+
* (on Arris the error margin varies according to video format)
|
838
|
+
*/
|
839
|
+
acceptablePositionAnomalyMs?: number;
|
840
|
+
/**
|
841
|
+
* Stream delay config
|
842
|
+
*
|
843
|
+
* IP TV apps have TV program / TV channel streams delayed relative to the original
|
844
|
+
* video source. Therefore stream markers taken from the original video source
|
845
|
+
* are delayed relative to the TV stream seen by end users of the IP TV app.
|
846
|
+
*
|
847
|
+
* This delay must be corrected.
|
848
|
+
*/
|
849
|
+
streamDelayConfig?: {
|
850
|
+
/**
|
851
|
+
* ID of the delay config
|
852
|
+
*/
|
853
|
+
id: string;
|
854
|
+
};
|
855
|
+
ui?: {
|
856
|
+
/**
|
857
|
+
* ID of a DOM element inside which Tivio should display its player-related UI
|
858
|
+
* such as ad buttons. This DOM element is an anchor point for Tivio UI. Preferably
|
859
|
+
* it should be a <div/> element styled to cover the whole area of the video player
|
860
|
+
* and it should be positioned to be on top the existing player UI (e.g. via z-index).
|
861
|
+
*/
|
862
|
+
domAnchorId: string | null;
|
863
|
+
};
|
864
|
+
protocols?: {
|
865
|
+
mp4?: {
|
866
|
+
/**
|
867
|
+
* Set to false if player does not support MP4 files that require full file download
|
868
|
+
* (i.e. they do not support progressive MP4 download and therefore the whole file
|
869
|
+
* must be downloaded before playback can start)
|
870
|
+
*/
|
871
|
+
fullFileDownloadSupport?: boolean;
|
872
|
+
};
|
873
|
+
};
|
874
|
+
};
|
875
|
+
|
876
|
+
/**
|
877
|
+
* @public
|
878
|
+
*/
|
879
|
+
export declare interface PlayerInterface {
|
880
|
+
pause: () => void;
|
881
|
+
/**
|
882
|
+
* unpause
|
883
|
+
*/
|
884
|
+
play: () => void;
|
885
|
+
/**
|
886
|
+
* @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
|
887
|
+
* or in case of TV programs relative to start of the program (relative to source.from ms)
|
888
|
+
*/
|
889
|
+
seekTo: (ms: number) => void;
|
890
|
+
/**
|
891
|
+
* Source to be passed to player.
|
892
|
+
*
|
893
|
+
* Depending on autoplay settings it should either start playing
|
894
|
+
* immediately or just be loaded by player and stay paused.
|
895
|
+
*/
|
896
|
+
setSource: (source: InputSource | null) => void;
|
897
|
+
/**
|
898
|
+
* volume in [0,1]
|
899
|
+
*/
|
900
|
+
setVolume?: (volume: number) => void;
|
901
|
+
mute?: () => void;
|
902
|
+
/**
|
903
|
+
* restore volume to previous value
|
904
|
+
*/
|
905
|
+
unmute?: () => void;
|
906
|
+
}
|
907
|
+
|
908
|
+
/**
|
909
|
+
* @public
|
910
|
+
*/
|
911
|
+
export declare const PlayerProvider: ({ children, playerWrapperId, }: PlayerProviderProps) => FunctionComponentElement<PlayerProviderProps>;
|
912
|
+
|
913
|
+
/**
|
914
|
+
* @public
|
915
|
+
*/
|
916
|
+
export declare type PlayerProviderProps = {
|
917
|
+
children: React_2.ReactNode;
|
918
|
+
playerWrapperId?: string;
|
919
|
+
};
|
920
|
+
|
921
|
+
declare type PlayerState = 'playing' | 'paused' | 'idle';
|
922
|
+
|
923
|
+
/**
|
924
|
+
* @public
|
925
|
+
*/
|
926
|
+
export declare type PlayerWrapper = {
|
927
|
+
/**
|
928
|
+
* Report that playback of video has finished
|
929
|
+
*/
|
930
|
+
onPlaybackEnded: () => void;
|
931
|
+
/**
|
932
|
+
* Report video progress in milliseconds
|
933
|
+
*/
|
934
|
+
onTimeChanged: (ms: number) => void;
|
935
|
+
/**
|
936
|
+
* Report that video state changed
|
937
|
+
*/
|
938
|
+
onStateChanged: (state: PlayerState) => void;
|
939
|
+
/**
|
940
|
+
* Send source to Tivio
|
941
|
+
*/
|
942
|
+
onSourceChanged: (source: InputSource | null) => void;
|
943
|
+
/**
|
944
|
+
* Report that video failed to load (never started playing)
|
945
|
+
*/
|
946
|
+
onLoadError: (error: Error) => void;
|
947
|
+
/**
|
948
|
+
* Report that video failed during playback (successfully loaded and then failed, e.g. part of stream is invalid)
|
949
|
+
*/
|
950
|
+
onError: (error: Error) => void;
|
951
|
+
/**
|
952
|
+
* Unpause video
|
953
|
+
*/
|
954
|
+
play: () => void;
|
955
|
+
/**
|
956
|
+
* Pause video
|
957
|
+
*/
|
958
|
+
pause: () => void;
|
959
|
+
/**
|
960
|
+
* Currently playing source
|
961
|
+
*/
|
962
|
+
source: InputSource | null;
|
963
|
+
events: {
|
964
|
+
isSupported: (even: string) => boolean;
|
965
|
+
addListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
|
966
|
+
removeListener: <T = any>(event: string, cb: (value: T) => Empty) => void;
|
967
|
+
removeAllListeners: () => void;
|
968
|
+
};
|
969
|
+
/**
|
970
|
+
* Register a low level player that implements player methods, like play video, change volume, etc.
|
971
|
+
*/
|
972
|
+
register: (playerInterface: PlayerInterface) => void;
|
973
|
+
/**
|
974
|
+
* duration of current source in ms (both setter and getter)
|
975
|
+
*/
|
976
|
+
durationMs: number | null;
|
977
|
+
isPlaybackStarted: boolean;
|
978
|
+
isPaused: boolean;
|
979
|
+
isPlaying: boolean;
|
980
|
+
isIdle: boolean;
|
981
|
+
error: Error | null;
|
982
|
+
/**
|
983
|
+
* Replay the video that finished playback
|
984
|
+
*/
|
985
|
+
replay: () => void;
|
986
|
+
/**
|
987
|
+
* Retry to play a video that failed to start playing (e.g. due to a network error)
|
988
|
+
*/
|
989
|
+
retry: () => void;
|
990
|
+
togglePlayPause: () => void;
|
991
|
+
seekTo: (ms: number) => void;
|
992
|
+
/**
|
993
|
+
* set volume to value between 0,1
|
994
|
+
*/
|
995
|
+
setVolume: (volume: number) => void;
|
996
|
+
/**
|
997
|
+
* change volume by value between -1,1
|
998
|
+
*/
|
999
|
+
changeVolumeBy: (volume: number) => void;
|
1000
|
+
setMuted: (muted: boolean) => void;
|
1001
|
+
toggleMuted: () => void;
|
1002
|
+
};
|
1003
|
+
|
1004
|
+
/**
|
1005
|
+
* @public
|
1006
|
+
*/
|
1007
|
+
export declare interface PubSub {
|
1008
|
+
publish: <K extends keyof Events>(triggerName: K, payload: Events[K]) => Empty;
|
1009
|
+
subscribe: <K extends keyof Events>(triggerName: K, onMessage: (data: Events[K]) => Empty) => Disposer;
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
/**
|
1013
|
+
* @public
|
1014
|
+
*/
|
1015
|
+
export declare type Purchase = {
|
1016
|
+
/**
|
1017
|
+
* Timestamp of the purchase creation in milliseconds.
|
1018
|
+
*/
|
1019
|
+
created: number | null;
|
1020
|
+
expirationDate: Date | null;
|
1021
|
+
id: string;
|
1022
|
+
isExpired: boolean;
|
1023
|
+
isPurchased: boolean;
|
1024
|
+
monetization: PurchaseMonetization | null;
|
1025
|
+
monetizationId: string | null;
|
1026
|
+
monetizationRef: any | null;
|
1027
|
+
status: PurchaseStatus | null;
|
1028
|
+
type: MonetizationType | null;
|
1029
|
+
/**
|
1030
|
+
* Timestamp of the last purchase status update in milliseconds.
|
1031
|
+
*/
|
1032
|
+
updated: number | null;
|
1033
|
+
video: Video | null;
|
1034
|
+
videoId: string | null;
|
1035
|
+
videoRef: any | null;
|
1036
|
+
voucherId?: string;
|
1037
|
+
};
|
1038
|
+
|
1039
|
+
/**
|
1040
|
+
* @public
|
1041
|
+
*/
|
1042
|
+
export declare type PurchaseMonetization = {
|
1043
|
+
currency?: Currency;
|
1044
|
+
period?: number;
|
1045
|
+
price?: number;
|
1046
|
+
type: MonetizationType;
|
1047
|
+
title?: string;
|
1048
|
+
frequency?: MONETIZATION_FREQUENCY | null;
|
1049
|
+
/**
|
1050
|
+
* If set, purchase (subscription) activated by voucher will stay valid for this amount of seconds.
|
1051
|
+
* Otherwise, purchase will be valid for one "monetization frequency" period.
|
1052
|
+
*/
|
1053
|
+
voucherPurchaseDuration?: number;
|
1054
|
+
};
|
1055
|
+
|
1056
|
+
/**
|
1057
|
+
* @public
|
1058
|
+
*/
|
1059
|
+
export declare enum PurchaseStatus {
|
1060
|
+
NEW = "NEW",
|
1061
|
+
PAID = "PAID",
|
1062
|
+
CANCELLED = "CANCELLED",
|
1063
|
+
ERROR = "ERROR",
|
1064
|
+
/**
|
1065
|
+
* Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
|
1066
|
+
*/
|
1067
|
+
KILL = "KILL"
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
/**
|
1071
|
+
* @public
|
1072
|
+
*/
|
1073
|
+
export declare interface QerkoCancellationInfo {
|
1074
|
+
purchaseId: string;
|
1075
|
+
status: PurchaseStatus;
|
1076
|
+
}
|
1077
|
+
|
1078
|
+
/**
|
1079
|
+
* @public
|
1080
|
+
*/
|
1081
|
+
export declare interface QerkoData {
|
1082
|
+
monetization: Monetization;
|
1083
|
+
video?: Video;
|
1084
|
+
onPurchase?: () => void;
|
1085
|
+
onClose?: () => void;
|
1086
|
+
}
|
1087
|
+
|
1088
|
+
/**
|
1089
|
+
* @public
|
1090
|
+
*/
|
1091
|
+
export declare interface QerkoOverlayState {
|
1092
|
+
data: QerkoData | null;
|
1093
|
+
openQerkoOverlay: ((data: QerkoData) => void);
|
1094
|
+
closeQerkoOverlay: () => void;
|
1095
|
+
}
|
1096
|
+
|
1097
|
+
/**
|
1098
|
+
* @public
|
1099
|
+
*/
|
1100
|
+
export declare interface QerkoPaymentInfo {
|
1101
|
+
webPaymentGatewayLink: string;
|
1102
|
+
gatewayUri: string;
|
1103
|
+
paymentQRCodeUri: string;
|
1104
|
+
purchaseId: string;
|
1105
|
+
currency: string;
|
1106
|
+
amount: number;
|
1107
|
+
monetizationType: MonetizationType;
|
1108
|
+
recovery?: boolean;
|
1109
|
+
monetizationFrequency: MONETIZATION_FREQUENCY;
|
1110
|
+
}
|
1111
|
+
|
1112
|
+
/**
|
1113
|
+
* @public
|
1114
|
+
*/
|
1115
|
+
export declare interface QerkoPaymentProps {
|
1116
|
+
transaction: QerkoTransaction;
|
1117
|
+
qrCodeCaption?: string;
|
1118
|
+
renderErrorComponent: () => any;
|
1119
|
+
enablePayByCard?: boolean;
|
1120
|
+
payByCardCaption?: string;
|
1121
|
+
visaLogoUrl?: string;
|
1122
|
+
masterCardLogoUrl?: string;
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
/**
|
1126
|
+
* @public
|
1127
|
+
*/
|
1128
|
+
export declare interface QerkoTransaction {
|
1129
|
+
paymentInfo: QerkoPaymentInfo | null;
|
1130
|
+
paymentError: string | null;
|
1131
|
+
paymentStatus: string | null;
|
1132
|
+
getPaymentInfo: () => Promise<void>;
|
1133
|
+
voucherId?: string;
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
/**
|
1137
|
+
* @public
|
1138
|
+
*/
|
1139
|
+
export declare type RemoteBundleState = {
|
1140
|
+
config: InternalConfig;
|
1141
|
+
error: string | null;
|
1142
|
+
state: 'loading' | 'error' | 'ready';
|
1143
|
+
} & Nullable<TivioBundle>;
|
1144
|
+
|
1145
|
+
/**
|
1146
|
+
* @public
|
1147
|
+
*/
|
1148
|
+
export declare type RemoteProviderProps = {
|
1149
|
+
disableUnmounting?: boolean;
|
1150
|
+
language?: string;
|
1151
|
+
children: any;
|
1152
|
+
};
|
1153
|
+
|
1154
|
+
/**
|
1155
|
+
* @public
|
1156
|
+
*/
|
1157
|
+
export declare interface RouterOverrides {
|
1158
|
+
goToVideoDetailPage: (videoId: string) => void;
|
1159
|
+
goToSeriesDetailPage: (tagId: string) => void;
|
1160
|
+
goToTagPage: (tagId: string) => void;
|
1161
|
+
goToLoginScreen: () => void;
|
1162
|
+
goBack: () => void;
|
1163
|
+
goLivePlayer: (videoId: string) => void;
|
1164
|
+
goVodPlayer: (tvChannelId: string) => void;
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
/**
|
1168
|
+
* @public
|
1169
|
+
*/
|
1170
|
+
export declare interface RouterOverridesContextState {
|
1171
|
+
routerOverrides: RouterOverrides;
|
1172
|
+
}
|
1173
|
+
|
1174
|
+
/**
|
1175
|
+
* @public
|
1176
|
+
*/
|
1177
|
+
export declare interface Row {
|
1178
|
+
id: string;
|
1179
|
+
rowId: string;
|
1180
|
+
name: string;
|
1181
|
+
description?: string;
|
1182
|
+
itemComponent: RowItemComponent;
|
1183
|
+
rowComponent: RowComponent;
|
1184
|
+
assets: Assets;
|
1185
|
+
type: ScreenRowType;
|
1186
|
+
isLiveRow: boolean;
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
/**
|
1190
|
+
* @public
|
1191
|
+
*/
|
1192
|
+
export declare enum ROW_ITEM_TYPES {
|
1193
|
+
VIDEO = "VIDEO",
|
1194
|
+
TAG = "TAG",
|
1195
|
+
TV_CHANNEL = "TV_CHANNEL"
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
/**
|
1199
|
+
* @public
|
1200
|
+
*/
|
1201
|
+
export declare enum RowComponent {
|
1202
|
+
ROW = "ROW",
|
1203
|
+
BANNER = "BANNER"
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
/**
|
1207
|
+
* @public
|
1208
|
+
*/
|
1209
|
+
export declare interface RowItem extends RowItemAssets {
|
1210
|
+
itemType: ROW_ITEM_TYPES;
|
1211
|
+
name?: string;
|
1212
|
+
description?: string;
|
1213
|
+
assets: Assets | null;
|
1214
|
+
}
|
1215
|
+
|
1216
|
+
/**
|
1217
|
+
* @public
|
1218
|
+
*/
|
1219
|
+
export declare interface RowItemAssets {
|
1220
|
+
landscape?: string | null;
|
1221
|
+
portrait?: string | null;
|
1222
|
+
circled?: string | null;
|
1223
|
+
banner?: string | null;
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
/**
|
1227
|
+
* @public
|
1228
|
+
*/
|
1229
|
+
export declare enum RowItemComponent {
|
1230
|
+
ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
|
1231
|
+
ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
|
1232
|
+
ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED"
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
/**
|
1236
|
+
* Listen to items in row of a screen
|
1237
|
+
* @param rowId - row ID (user defined ID via studio.tiv.io)
|
1238
|
+
* @param cb - callback on items changes or error, with information
|
1239
|
+
* whether data is loading and a fetchMore function
|
1240
|
+
* @param limit - max item count (default 10)
|
1241
|
+
* @returns Disposer
|
1242
|
+
* @public
|
1243
|
+
*/
|
1244
|
+
export declare type RowItemsSubscription = (rowId: string, cb: (error: Error | null, data: {
|
1245
|
+
items: Video[];
|
1246
|
+
hasNextPage: boolean;
|
1247
|
+
} | null, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => Disposer_2;
|
1248
|
+
|
1249
|
+
/**
|
1250
|
+
* @public
|
1251
|
+
*/
|
1252
|
+
export declare type ScalableAsset = {
|
1253
|
+
'@1': Asset;
|
1254
|
+
'@2'?: Asset;
|
1255
|
+
'@3'?: Asset;
|
1256
|
+
};
|
1257
|
+
|
1258
|
+
/**
|
1259
|
+
* @public
|
1260
|
+
*/
|
1261
|
+
export declare type Scale = '@1' | '@2' | '@3';
|
1262
|
+
|
1263
|
+
/**
|
1264
|
+
* @public
|
1265
|
+
*/
|
1266
|
+
declare interface Screen_2 {
|
1267
|
+
id: string;
|
1268
|
+
name: string;
|
1269
|
+
description?: string;
|
1270
|
+
assets: Assets;
|
1271
|
+
rows: Row[];
|
1272
|
+
}
|
1273
|
+
export { Screen_2 as Screen }
|
1274
|
+
|
1275
|
+
/**
|
1276
|
+
* @public
|
1277
|
+
*/
|
1278
|
+
export declare type ScreenConfig = {
|
1279
|
+
id: string;
|
1280
|
+
name: string;
|
1281
|
+
};
|
1282
|
+
|
1283
|
+
/**
|
1284
|
+
* @public
|
1285
|
+
*/
|
1286
|
+
export declare type ScreenOptions = Partial<{
|
1287
|
+
language: LangCode;
|
1288
|
+
initRows: boolean;
|
1289
|
+
}> & DocumentOptions;
|
1290
|
+
|
1291
|
+
/**
|
1292
|
+
* @public
|
1293
|
+
*/
|
1294
|
+
export declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites';
|
1295
|
+
|
1296
|
+
/**
|
1297
|
+
* Listen to screen data
|
1298
|
+
* @param screenId - screen ID (user defined ID via studio.tiv.io)
|
1299
|
+
* @param cb - callback on screen data change or error
|
1300
|
+
* @returns Disposer
|
1301
|
+
* @public
|
1302
|
+
*/
|
1303
|
+
export declare type ScreenSubscription = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void) => Disposer_2;
|
1304
|
+
|
1305
|
+
/**
|
1306
|
+
* Config of sdk-react. Contains all properties that can be passed via TivioProvider.
|
1307
|
+
* Consists of TivioConfig's properties + "sdk only" properties, that are used only in sdk, not in bundle.
|
1308
|
+
*
|
1309
|
+
* @public
|
1310
|
+
*/
|
1311
|
+
export declare type SdkReactConfig = Omit<TivioConfig, 'deviceCapabilities' | 'language'> & {
|
1312
|
+
disableUnmounting?: boolean;
|
1313
|
+
enable?: boolean;
|
1314
|
+
enableSentry?: boolean;
|
1315
|
+
ErrorComponent?: ComponentType<{
|
1316
|
+
error: string | null;
|
1317
|
+
}>;
|
1318
|
+
LoaderComponent?: ComponentType;
|
1319
|
+
logger?: Logger | null;
|
1320
|
+
deviceCapabilities: PlayerCapability[] | 'auto';
|
1321
|
+
language?: LangCode;
|
1322
|
+
};
|
1323
|
+
|
1324
|
+
/**
|
1325
|
+
* @public
|
1326
|
+
*/
|
1327
|
+
export declare interface Section {
|
1328
|
+
id: string;
|
1329
|
+
name: string;
|
1330
|
+
channel: Channel;
|
1331
|
+
videos: Video[];
|
1332
|
+
}
|
1333
|
+
|
1334
|
+
/**
|
1335
|
+
* Used for entities, that can be global (e.g. asset presets, tag types).
|
1336
|
+
* Non-global is stored under organizations (in sub-collection), and shown for organization's users and super-admin.
|
1337
|
+
* Global is stored in separate collection and shown only for super-admin.
|
1338
|
+
* @public
|
1339
|
+
*/
|
1340
|
+
export declare interface SettingsItem {
|
1341
|
+
name: string;
|
1342
|
+
isGlobal?: boolean;
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
/**
|
1346
|
+
* Set user to sign in/out.
|
1347
|
+
*
|
1348
|
+
* Sign in - setUser('userID', { token: 'xxx' })
|
1349
|
+
* Sign out - setUser(null)
|
1350
|
+
* @public
|
1351
|
+
*/
|
1352
|
+
export declare const setUser: (userId: string | null, payload?: UserPayload | undefined) => Promise<void>;
|
1353
|
+
|
1354
|
+
/**
|
1355
|
+
* @public
|
1356
|
+
*/
|
1357
|
+
export declare const showGdprConsentPreferences: () => Promise<void>;
|
1358
|
+
|
1359
|
+
/**
|
1360
|
+
* @public
|
1361
|
+
*/
|
1362
|
+
export declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error | null, data: PaginationInterface<ItemsInRow> | null) => void, options?: SubscribeToItemsInRowOptions) => Disposer_2;
|
1363
|
+
|
1364
|
+
/**
|
1365
|
+
* @public
|
1366
|
+
*/
|
1367
|
+
export declare type SubscribeToItemsInRowOptions = Partial<{
|
1368
|
+
fetchTags: boolean;
|
1369
|
+
}> & PaginationOptions;
|
1370
|
+
|
1371
|
+
/**
|
1372
|
+
* @public
|
1373
|
+
*/
|
1374
|
+
export declare type SubscribeToRowsInScreen = (screenId: string, cb: (error: Error | null, data: PaginationInterface<Row> | null) => void, options?: PaginationOptions) => Disposer_2;
|
1375
|
+
|
1376
|
+
/**
|
1377
|
+
* @public
|
1378
|
+
*/
|
1379
|
+
export declare type SubscribeToScreen = (screenId: string, cb: (error: Error | null, data: Screen_2 | null) => void, options?: ScreenOptions) => Disposer_2;
|
1380
|
+
|
1381
|
+
/**
|
1382
|
+
* @public
|
1383
|
+
*/
|
1384
|
+
export declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Error | null, data: PaginationInterface<Video> | null) => void, options?: SubscribeToTaggedVideosOptions) => Disposer_2;
|
1385
|
+
|
1386
|
+
/**
|
1387
|
+
* @public
|
1388
|
+
*/
|
1389
|
+
export declare type SubscribeToTaggedVideosOptions = SubscribeToItemsInRowOptions & {
|
1390
|
+
orderBy?: (Omit<OrderBy, 'field'> & {
|
1391
|
+
field: TaggedVideosOrderByField;
|
1392
|
+
})[];
|
1393
|
+
where?: WhereFilter[];
|
1394
|
+
};
|
1395
|
+
|
1396
|
+
/**
|
1397
|
+
* @public
|
1398
|
+
*/
|
1399
|
+
export declare interface SubscriptionCardProps {
|
1400
|
+
subscription: Monetization;
|
1401
|
+
onClick: (subscription: Monetization) => void;
|
1402
|
+
buttonLabel: string;
|
1403
|
+
purchased: boolean;
|
1404
|
+
focused?: boolean;
|
1405
|
+
}
|
1406
|
+
|
1407
|
+
declare type SubscriptionInfo = {
|
1408
|
+
type: 'subscription';
|
1409
|
+
name: string;
|
1410
|
+
benefits: string[];
|
1411
|
+
frequency: string;
|
1412
|
+
};
|
1413
|
+
|
1414
|
+
/**
|
1415
|
+
* @public
|
1416
|
+
*/
|
1417
|
+
export declare interface SubscriptionOverlayData {
|
1418
|
+
subscriptions?: Monetization[];
|
1419
|
+
onPurchase?: () => void;
|
1420
|
+
onClose?: () => void;
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
/**
|
1424
|
+
* @public
|
1425
|
+
*/
|
1426
|
+
export declare type SubscriptionOverlayState = {
|
1427
|
+
data: SubscriptionOverlayData | null;
|
1428
|
+
closeSubscriptionOverlay: () => void;
|
1429
|
+
openSubscriptionOverlay: (data: SubscriptionOverlayData) => void;
|
1430
|
+
};
|
1431
|
+
|
1432
|
+
/**
|
1433
|
+
* @public
|
1434
|
+
*/
|
1435
|
+
export declare interface Tag extends RowItem {
|
1436
|
+
id: string;
|
1437
|
+
tagId: string;
|
1438
|
+
type?: string | null;
|
1439
|
+
metadata?: any[];
|
1440
|
+
color?: string;
|
1441
|
+
detailBanner?: string;
|
1442
|
+
availableSeasons?: AvailableSeason[];
|
1443
|
+
isFavorite: boolean;
|
1444
|
+
addToFavorites: () => void;
|
1445
|
+
removeFromFavorites: () => void;
|
1446
|
+
}
|
1447
|
+
|
1448
|
+
/**
|
1449
|
+
* @public
|
1450
|
+
*/
|
1451
|
+
export declare type TaggedVideosOrderByField = 'seasonNumber' | 'episodeNumber' | 'contentType' | DefaultOrderByField;
|
1452
|
+
|
1453
|
+
/**
|
1454
|
+
* @internal
|
1455
|
+
*/
|
1456
|
+
export declare type TileOptions = {
|
1457
|
+
focusedShadow: boolean;
|
1458
|
+
focusedShadowColor?: string;
|
1459
|
+
borderColor: string;
|
1460
|
+
innerLabel: {
|
1461
|
+
/**
|
1462
|
+
* Font size in px
|
1463
|
+
*/
|
1464
|
+
fontSize: number;
|
1465
|
+
};
|
1466
|
+
bottomLabel: {
|
1467
|
+
opacity: string | number;
|
1468
|
+
fontWeight: string;
|
1469
|
+
};
|
1470
|
+
};
|
1471
|
+
|
1472
|
+
/**
|
1473
|
+
* @public
|
1474
|
+
*/
|
1475
|
+
export declare type TileProps = {
|
1476
|
+
cover: string;
|
1477
|
+
isLoading: boolean;
|
1478
|
+
bottomLabel: string;
|
1479
|
+
bottomLabelAreaHeight: number;
|
1480
|
+
innerLabel: string;
|
1481
|
+
duration: string;
|
1482
|
+
price: string | null;
|
1483
|
+
focused: boolean;
|
1484
|
+
onClick?: () => void;
|
1485
|
+
hoverable: boolean;
|
1486
|
+
overlay: boolean;
|
1487
|
+
coverPadding: CoverPadding;
|
1488
|
+
variant: RowItemComponent;
|
1489
|
+
coverWidth: number;
|
1490
|
+
progress?: number;
|
1491
|
+
time?: string;
|
1492
|
+
logo?: string;
|
1493
|
+
coverHeight: number;
|
1494
|
+
/**
|
1495
|
+
* Margin of inner TileContainer.
|
1496
|
+
* Now used for backward compatibility for WebTileGrid. Consider to use it other way.
|
1497
|
+
*/
|
1498
|
+
containerMargin?: number | string;
|
1499
|
+
};
|
1500
|
+
|
1501
|
+
/**
|
1502
|
+
* @public
|
1503
|
+
*/
|
1504
|
+
export declare type TilePropsPartial = Partial<TileProps>;
|
1505
|
+
|
1506
|
+
/**
|
1507
|
+
* @public
|
1508
|
+
*/
|
1509
|
+
export declare interface TivioAuth {
|
1510
|
+
/**
|
1511
|
+
* @param email
|
1512
|
+
* @param password
|
1513
|
+
*/
|
1514
|
+
createUserWithEmailAndPassword: CreateUserWithEmailAndPassword;
|
1515
|
+
/**
|
1516
|
+
* Sign in the user and starts listening on his purchases
|
1517
|
+
* @param email
|
1518
|
+
* @param password
|
1519
|
+
*/
|
1520
|
+
signInWithEmailAndPassword: (email: string, password: string) => Promise<string | null>;
|
1521
|
+
signOut: () => Promise<void>;
|
1522
|
+
/**
|
1523
|
+
* Used for reset forgotten password by user
|
1524
|
+
*/
|
1525
|
+
resetPassword: (email: string) => Promise<void>;
|
1526
|
+
}
|
1527
|
+
|
1528
|
+
/**
|
1529
|
+
* @public
|
1530
|
+
*/
|
1531
|
+
export declare type TivioBundle = TivioReactBundle;
|
1532
|
+
|
1533
|
+
/**
|
1534
|
+
* @public
|
1535
|
+
*/
|
1536
|
+
export declare type TivioBundleFile = {
|
1537
|
+
Tivio: TivioBundle;
|
1538
|
+
};
|
1539
|
+
|
1540
|
+
/**
|
1541
|
+
* @public
|
1542
|
+
*/
|
1543
|
+
export declare type TivioComponents = {
|
1544
|
+
Markers: React_2.ReactNode;
|
1545
|
+
PlayerDataContext: React_2.ReactNode;
|
1546
|
+
Provider: React_2.ComponentType<RemoteProviderProps>;
|
1547
|
+
WebPlayer: React_2.ComponentType<WebPlayerProps>;
|
1548
|
+
Widget: React_2.ComponentType<TivioWidgetProps>;
|
1549
|
+
PlayerDataContextProvider: React_2.ComponentType<{
|
1550
|
+
id: string;
|
1551
|
+
}>;
|
1552
|
+
SkipButtonTv: React_2.ComponentType<{
|
1553
|
+
Button: React_2.ComponentType;
|
1554
|
+
Label: React_2.ComponentType;
|
1555
|
+
Container: React_2.ComponentType;
|
1556
|
+
onStarted?: () => any;
|
1557
|
+
onEnded?: () => any;
|
1558
|
+
}>;
|
1559
|
+
TvApp: React_2.ComponentType<TvAppProps>;
|
1560
|
+
FeatureSupportCheck: React_2.ComponentType<{}>;
|
1561
|
+
CustomerScreen: React_2.ComponentType<{
|
1562
|
+
screenId: string;
|
1563
|
+
}>;
|
1564
|
+
WebTagScreen: React_2.ComponentType<{
|
1565
|
+
tagId: string;
|
1566
|
+
onError?: (error: Error) => void;
|
1567
|
+
}>;
|
1568
|
+
WebSearchScreen: React_2.ComponentType<{
|
1569
|
+
searchQuery?: string;
|
1570
|
+
}>;
|
1571
|
+
WebRow: React_2.ComponentType<WebRowProps>;
|
1572
|
+
WebTile: React_2.ComponentType<{
|
1573
|
+
item?: ItemsInRow;
|
1574
|
+
} & TilePropsPartial>;
|
1575
|
+
AdIndicationButtonWeb: React_2.ReactNode;
|
1576
|
+
Recommendation: React_2.ReactNode;
|
1577
|
+
SkipButtonWeb: React_2.ReactNode;
|
1578
|
+
TvPlayer: React_2.ComponentType<WebPlayerProps>;
|
1579
|
+
};
|
1580
|
+
|
1581
|
+
/**
|
1582
|
+
* @public
|
1583
|
+
*/
|
1584
|
+
export declare interface TivioConfig {
|
1585
|
+
/**
|
1586
|
+
* Tells Tivio which technologies/protocols etc. is the device capable to play.
|
1587
|
+
* If not provided, Tivio will try to guess it (based on the browser).
|
1588
|
+
*/
|
1589
|
+
deviceCapabilities?: PlayerCapability[];
|
1590
|
+
/**
|
1591
|
+
* Additional options for deviceCapabilities
|
1592
|
+
*/
|
1593
|
+
capabilitiesOptions?: {
|
1594
|
+
/**
|
1595
|
+
* Should the player prefer HTTP sources instead HTTPs if they are available.
|
1596
|
+
* This can be used on platforms that support mixed content but do not support
|
1597
|
+
* specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
|
1598
|
+
*/
|
1599
|
+
preferHttp?: boolean;
|
1600
|
+
};
|
1601
|
+
secret: string;
|
1602
|
+
language: LangCode;
|
1603
|
+
debug?: boolean;
|
1604
|
+
verbose?: boolean;
|
1605
|
+
firebaseApp?: any;
|
1606
|
+
currency: Currency;
|
1607
|
+
/**
|
1608
|
+
* Configuration for GDPR consent collection (CMP)
|
1609
|
+
*/
|
1610
|
+
cmp?: CmpConfig;
|
1611
|
+
/**
|
1612
|
+
* Device information - model, os, version, etc. This is useful for devices
|
1613
|
+
* where this information cannot be reliably auto-detected.
|
1614
|
+
*/
|
1615
|
+
deviceInfo?: DeviceInfo;
|
1616
|
+
player?: PlayerConfig;
|
1617
|
+
}
|
1618
|
+
|
1619
|
+
/**
|
1620
|
+
* @public
|
1621
|
+
*/
|
1622
|
+
export declare const TivioContext: React_2.Context<RemoteBundleState | null>;
|
1623
|
+
|
1624
|
+
/**
|
1625
|
+
* @public
|
1626
|
+
*/
|
1627
|
+
export declare type TivioGetters = {
|
1628
|
+
isTivioLoaded: (cb: (isLoaded: boolean) => void) => void;
|
1629
|
+
isSignedIn: () => boolean;
|
1630
|
+
/**
|
1631
|
+
* Get (or create) player wrapper instance
|
1632
|
+
* @param opt - player getter options
|
1633
|
+
* @returns {PlayerWrapper} player wrapper instance
|
1634
|
+
*/
|
1635
|
+
getPlayerWrapper: (opt: {
|
1636
|
+
playerWrapperId?: string;
|
1637
|
+
}) => any;
|
1638
|
+
getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
|
1639
|
+
/**
|
1640
|
+
* Get video by its id.
|
1641
|
+
* @param videoId - video id
|
1642
|
+
* @returns {Promise<Video | null>} video or null if video does not exists
|
1643
|
+
*/
|
1644
|
+
getVideoById: (videoId: string) => Promise<Video | null>;
|
1645
|
+
/**
|
1646
|
+
* Get player capabilities based on user's browser and OS as resolved by Tivio.
|
1647
|
+
* @returns PlayerCapability[]
|
1648
|
+
*/
|
1649
|
+
getPlayerCapabilities: () => PlayerCapability[];
|
1650
|
+
};
|
1651
|
+
|
1652
|
+
/**
|
1653
|
+
* @public
|
1654
|
+
*/
|
1655
|
+
export declare type TivioHooks = {
|
1656
|
+
useAd: () => [(AdSource | null)];
|
1657
|
+
useAdSegment: () => AdSegment | null;
|
1658
|
+
useCancelSubscription: UseCancelSubscription;
|
1659
|
+
useItemsInRow: (rowId: string, options: PaginationOptions) => {
|
1660
|
+
pagination: PaginationInterface<ItemsInRow> | null;
|
1661
|
+
error: Error | null;
|
1662
|
+
};
|
1663
|
+
usePurchaseRecovery: () => {
|
1664
|
+
purchaseRecoveryResult?: string;
|
1665
|
+
loading: boolean;
|
1666
|
+
error?: GenericOnCallError;
|
1667
|
+
purchaseRecovery: (monetizationId: string) => void;
|
1668
|
+
};
|
1669
|
+
useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher) => QerkoTransaction;
|
1670
|
+
usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher) => QerkoTransaction;
|
1671
|
+
useRowsInScreen: (screenId: string, options: PaginationOptions) => {
|
1672
|
+
pagination: PaginationInterface<Row> | null;
|
1673
|
+
error: Error | null;
|
1674
|
+
};
|
1675
|
+
useTaggedVideos: (tagIds: string[], options: SubscribeToItemsInRowOptions) => {
|
1676
|
+
pagination: PaginationInterface<Video> | null;
|
1677
|
+
error: Error | null;
|
1678
|
+
};
|
1679
|
+
useSearch: UseSearch;
|
1680
|
+
useVideo: (videoId: string) => {
|
1681
|
+
data: Video | null;
|
1682
|
+
error: string | null;
|
1683
|
+
};
|
1684
|
+
useVoucher: (voucherId: string) => any;
|
1685
|
+
useWatchWithoutAdsOffer: () => {
|
1686
|
+
canPurchaseWatchWithoutAds: boolean;
|
1687
|
+
showPurchaseDialog: () => void;
|
1688
|
+
};
|
1689
|
+
useApplyInviteCode: () => {
|
1690
|
+
applyInviteCodeResult?: boolean;
|
1691
|
+
loading: boolean;
|
1692
|
+
error?: GenericOnCallError;
|
1693
|
+
applyInviteCode: (code: string) => void;
|
1694
|
+
inviteCodeReset: () => void;
|
1695
|
+
};
|
1696
|
+
};
|
1697
|
+
|
1698
|
+
/**
|
1699
|
+
* @public
|
1700
|
+
*/
|
1701
|
+
export declare type TivioInternalBundle = {
|
1702
|
+
components: TivioInternalComponents;
|
1703
|
+
hooks: TivioInternalHooks;
|
1704
|
+
providers: TivioInternalProviders;
|
1705
|
+
};
|
1706
|
+
|
1707
|
+
/**
|
1708
|
+
* @public
|
1709
|
+
*/
|
1710
|
+
export declare type TivioInternalComponents = {
|
1711
|
+
PrimaryButton: React_2.ComponentType;
|
1712
|
+
WebLandingScreen: React_2.ComponentType<{
|
1713
|
+
logo?: string;
|
1714
|
+
}>;
|
1715
|
+
WebVideoScreen: React_2.ComponentType<{
|
1716
|
+
videoId: string;
|
1717
|
+
}>;
|
1718
|
+
WebSeriesDetailScreen: React_2.ComponentType<WebSeriesDetailScreenProps>;
|
1719
|
+
};
|
1720
|
+
|
1721
|
+
/**
|
1722
|
+
* @public
|
1723
|
+
*/
|
1724
|
+
export declare type TivioInternalHooks = {
|
1725
|
+
useAuthOverlay: () => AuthOverlayState;
|
1726
|
+
useSubscriptionsOverlay: () => SubscriptionOverlayState;
|
1727
|
+
useQerkoOverlay: () => QerkoOverlayState;
|
1728
|
+
usePurchasesWithVideos: () => {
|
1729
|
+
purchases: Purchase[];
|
1730
|
+
};
|
1731
|
+
useOrganizationSubscriptions: () => {
|
1732
|
+
subscriptions: Monetization[];
|
1733
|
+
};
|
1734
|
+
useIsMonetizationPurchased: () => {
|
1735
|
+
isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
|
1736
|
+
};
|
1737
|
+
useReferralInfo: any;
|
1738
|
+
useTvChannel: UseTvChannel;
|
1739
|
+
useChannelSource: UseChannelSource;
|
1740
|
+
useUser: () => {
|
1741
|
+
user: User | null;
|
1742
|
+
error: string | null;
|
1743
|
+
isInitialized: boolean;
|
1744
|
+
};
|
1745
|
+
};
|
1746
|
+
|
1747
|
+
/**
|
1748
|
+
* @public
|
1749
|
+
*/
|
1750
|
+
export declare type TivioInternalProviders = {
|
1751
|
+
AppThemeProvider: React_2.ComponentType;
|
1752
|
+
AuthOverlayContextProvider: React_2.ComponentType;
|
1753
|
+
CustomerProvider: React_2.ComponentType<{
|
1754
|
+
customer: CUSTOMER_BUILD;
|
1755
|
+
platform: PLATFORM;
|
1756
|
+
children: any;
|
1757
|
+
}>;
|
1758
|
+
ConfigProvider: React_2.ComponentType;
|
1759
|
+
UserContextProvider: React_2.ComponentType;
|
1760
|
+
SubscriptionOverlayContextProvider: React_2.ComponentType;
|
1761
|
+
QerkoOverlayContextProvider: React_2.ComponentType;
|
1762
|
+
PurchasesWithVideosContextProvider: React_2.ComponentType;
|
1763
|
+
OrganizationSubscriptionsContextProvider: React_2.ComponentType;
|
1764
|
+
RouterOverridesContextProvider: React_2.ComponentType<RouterOverridesContextState>;
|
1765
|
+
};
|
1766
|
+
|
1767
|
+
/**
|
1768
|
+
* @public
|
1769
|
+
*/
|
1770
|
+
export declare const TivioProvider: React_2.FC<TivioProviderProps>;
|
1771
|
+
|
1772
|
+
/**
|
1773
|
+
* @public
|
1774
|
+
*/
|
1775
|
+
export declare type TivioProviderProps = {
|
1776
|
+
/**
|
1777
|
+
* This prop must be set only once and not change value afterwards
|
1778
|
+
*/
|
1779
|
+
conf: SdkReactConfig | undefined | null;
|
1780
|
+
children: React_2.ReactNode;
|
1781
|
+
};
|
1782
|
+
|
1783
|
+
/**
|
1784
|
+
* @public
|
1785
|
+
*/
|
1786
|
+
export declare type TivioReactBundle = {
|
1787
|
+
init: (config: TivioConfig) => void | Promise<void>;
|
1788
|
+
components: TivioComponents;
|
1789
|
+
getters: TivioGetters;
|
1790
|
+
auth: TivioAuth;
|
1791
|
+
hooks: TivioHooks;
|
1792
|
+
sources: TivioSources;
|
1793
|
+
subscriptions: TivioSubscriptions;
|
1794
|
+
purchaseVideoWithQerko: (videoId: string, monetizationId: string, voucher?: {
|
1795
|
+
expirationDate: Date;
|
1796
|
+
}) => Promise<QerkoPaymentInfo>;
|
1797
|
+
purchaseSubscriptionWithQerko: (monetizationId: string, voucher?: {
|
1798
|
+
expirationDate: Date;
|
1799
|
+
}) => Promise<QerkoPaymentInfo>;
|
1800
|
+
cancelSubscriptionWithQerko: (subscriptionId: string) => Promise<QerkoCancellationInfo>;
|
1801
|
+
/**
|
1802
|
+
* Set tivio language.
|
1803
|
+
* @param language
|
1804
|
+
*/
|
1805
|
+
setLanguage: (language: LangCode) => void;
|
1806
|
+
setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
|
1807
|
+
showConsentPreferences: () => void;
|
1808
|
+
/**
|
1809
|
+
* Contains hooks and providers for internal usages.
|
1810
|
+
* They used in our apps, e.g. web, or in sdk-react (e.g. some sdk hooks are just wrappers for core-react-dom hooks)
|
1811
|
+
* TODO should not be the part of public API
|
1812
|
+
*/
|
1813
|
+
internal: TivioInternalBundle;
|
1814
|
+
destroy: () => Promise<void>;
|
1815
|
+
};
|
1816
|
+
|
1817
|
+
/**
|
1818
|
+
* @public
|
1819
|
+
*/
|
1820
|
+
export declare type TivioSources = {
|
1821
|
+
AdSource: any;
|
1822
|
+
ChannelSource: any;
|
1823
|
+
VodExternalSource: any;
|
1824
|
+
VodTivioSource: any;
|
1825
|
+
};
|
1826
|
+
|
1827
|
+
/**
|
1828
|
+
* @public
|
1829
|
+
*/
|
1830
|
+
export declare type TivioSubscriptions = {
|
1831
|
+
subscribeToUser: (cb: (error: string | null, user: User | null) => void) => void;
|
1832
|
+
/**
|
1833
|
+
* Listen to video changes.
|
1834
|
+
* @param videoId - video id
|
1835
|
+
* @param cb - callback on video updates or on error
|
1836
|
+
*/
|
1837
|
+
subscribeToVideo: (videoId: string, cb: (error: Error | null, data: Video | null, disposer?: Disposer_2) => void) => void;
|
1838
|
+
subscribeToItemsInRow: SubscribeToItemsInRow;
|
1839
|
+
subscribeToRowsInScreen: SubscribeToRowsInScreen;
|
1840
|
+
subscribeToTaggedVideos: SubscribeToTaggedVideos;
|
1841
|
+
registerOverlayCallbacks: (callbacks: {
|
1842
|
+
onShow: () => void;
|
1843
|
+
onHide: () => void;
|
1844
|
+
}) => void;
|
1845
|
+
};
|
1846
|
+
|
1847
|
+
/**
|
1848
|
+
* @public
|
1849
|
+
*/
|
1850
|
+
export declare const TivioWidget: React_2.ForwardRefExoticComponent<Pick<TivioWidgetProps, "id" | "onEnabled" | "onBlur"> & React_2.RefAttributes<TivioWidgetRef>>;
|
1851
|
+
|
1852
|
+
/**
|
1853
|
+
* @public
|
1854
|
+
*/
|
1855
|
+
export declare const TivioWidgetError: React_2.FC<TivioWidgetErrorProps>;
|
1856
|
+
|
1857
|
+
declare type TivioWidgetErrorProps = {
|
1858
|
+
error: string | null;
|
1859
|
+
};
|
1860
|
+
|
1861
|
+
/**
|
1862
|
+
* @public
|
1863
|
+
*/
|
1864
|
+
export declare const TivioWidgetLoader: React_2.FC;
|
1865
|
+
|
1866
|
+
/**
|
1867
|
+
* @public
|
1868
|
+
*/
|
1869
|
+
export declare interface TivioWidgetProps {
|
1870
|
+
id: string;
|
1871
|
+
ref: React_2.MutableRefObject<TivioWidgetRef>;
|
1872
|
+
onEnabled?: (enabled: boolean) => any;
|
1873
|
+
onBlur?: (event: {
|
1874
|
+
key: string;
|
1875
|
+
width: number;
|
1876
|
+
x: number;
|
1877
|
+
}) => any;
|
1878
|
+
}
|
1879
|
+
|
1880
|
+
/**
|
1881
|
+
* @public
|
1882
|
+
*/
|
1883
|
+
export declare interface TivioWidgetRef {
|
1884
|
+
focus: (args: {
|
1885
|
+
x?: number;
|
1886
|
+
}) => void;
|
1887
|
+
handleKey: (key: string) => ({
|
1888
|
+
handled: boolean;
|
1889
|
+
x: number;
|
1890
|
+
});
|
1891
|
+
unfocus: () => ({
|
1892
|
+
x: number;
|
1893
|
+
});
|
1894
|
+
}
|
1895
|
+
|
1896
|
+
/**
|
1897
|
+
* @public
|
1898
|
+
*/
|
1899
|
+
export declare type TizenDeviceInfo = {
|
1900
|
+
type: 'tizen';
|
1901
|
+
model?: string;
|
1902
|
+
osVersion?: string;
|
1903
|
+
};
|
1904
|
+
|
1905
|
+
declare type TransactionInfo = {
|
1906
|
+
type: 'transaction';
|
1907
|
+
name: string;
|
1908
|
+
videoId: string;
|
1909
|
+
cover: string;
|
1910
|
+
description: string;
|
1911
|
+
};
|
1912
|
+
|
1913
|
+
/**
|
1914
|
+
* Represents one string in every supported language mutation.
|
1915
|
+
* @public
|
1916
|
+
*/
|
1917
|
+
export declare type Translation = {
|
1918
|
+
[key in LangCode]: string;
|
1919
|
+
};
|
1920
|
+
|
1921
|
+
/**
|
1922
|
+
* @public
|
1923
|
+
*/
|
1924
|
+
export declare type TvAppProps = {
|
1925
|
+
customer: CUSTOMER_BUILD;
|
1926
|
+
};
|
1927
|
+
|
1928
|
+
/**
|
1929
|
+
* @public
|
1930
|
+
*/
|
1931
|
+
export declare interface TvChannel extends RowItem {
|
1932
|
+
name: string;
|
1933
|
+
id: string;
|
1934
|
+
path: string;
|
1935
|
+
itemType: ROW_ITEM_TYPES;
|
1936
|
+
country?: string;
|
1937
|
+
filters: string[];
|
1938
|
+
logo?: string;
|
1939
|
+
hls: string;
|
1940
|
+
dash: string;
|
1941
|
+
purchasableMonetization: any | null;
|
1942
|
+
price: number;
|
1943
|
+
}
|
1944
|
+
|
1945
|
+
/**
|
1946
|
+
* @public
|
1947
|
+
*/
|
1948
|
+
export declare const TvTivioProvider: React_2.FC<TivioProviderProps>;
|
1949
|
+
|
1950
|
+
/**
|
1951
|
+
* @public
|
1952
|
+
*/
|
1953
|
+
export declare const useAd: () => AdSource | null;
|
1954
|
+
|
1955
|
+
/**
|
1956
|
+
* @public
|
1957
|
+
*/
|
1958
|
+
export declare const useAdSegment: () => {
|
1959
|
+
id: string;
|
1960
|
+
remainingMs: number;
|
1961
|
+
secondsToEnd: number;
|
1962
|
+
secondsToSkippable: number | null;
|
1963
|
+
canSeek: boolean;
|
1964
|
+
canSkip: boolean;
|
1965
|
+
isSkippable: boolean;
|
1966
|
+
skip: () => any;
|
1967
|
+
} | null;
|
1968
|
+
|
1969
|
+
/**
|
1970
|
+
* Is used to login user through different device in which user is already logged in.
|
1971
|
+
* (e.g. login in tv app through web app)
|
1972
|
+
*
|
1973
|
+
* @return applyInviteCodeResult - true if code was applied successfully, false otherwise.
|
1974
|
+
* loading - loading state
|
1975
|
+
* error - error in case request failure
|
1976
|
+
* applyInviteCode - function to apply invite code
|
1977
|
+
* inviteCodeReset - function to reset to initial state
|
1978
|
+
* @public
|
1979
|
+
*/
|
1980
|
+
export declare function useApplyInviteCode(): {
|
1981
|
+
applyInviteCodeResult?: boolean | undefined;
|
1982
|
+
loading: boolean;
|
1983
|
+
error?: GenericOnCallError | undefined;
|
1984
|
+
applyInviteCode: (code: string) => void;
|
1985
|
+
inviteCodeReset: () => void;
|
1986
|
+
};
|
1987
|
+
|
1988
|
+
/**
|
1989
|
+
* @public
|
1990
|
+
*/
|
1991
|
+
export declare const useBetOffer: () => BetOffer | null;
|
1992
|
+
|
1993
|
+
/**
|
1994
|
+
* @public
|
1995
|
+
*/
|
1996
|
+
export declare type UseCancelSubscription = (subscriptionId: string) => {
|
1997
|
+
cancelSubscription: () => Promise<void>;
|
1998
|
+
cancellationInfo: QerkoCancellationInfo | null;
|
1999
|
+
error?: string | null;
|
2000
|
+
};
|
2001
|
+
|
2002
|
+
/**
|
2003
|
+
* @public
|
2004
|
+
*/
|
2005
|
+
export declare const useCancelSubscription: UseCancelSubscription;
|
2006
|
+
|
2007
|
+
/**
|
2008
|
+
* @public
|
2009
|
+
*/
|
2010
|
+
export declare type UseChannelSource = (tvChannelId: string) => {
|
2011
|
+
source: ChannelSourcePojo | null;
|
2012
|
+
error: Error | null;
|
2013
|
+
};
|
2014
|
+
|
2015
|
+
/**
|
2016
|
+
* @public
|
2017
|
+
*/
|
2018
|
+
export declare const useCurrentMarker: () => Marker | null;
|
2019
|
+
|
2020
|
+
/**
|
2021
|
+
* @public
|
2022
|
+
*/
|
2023
|
+
export declare const useIntro: () => IntroMarker | null;
|
2024
|
+
|
2025
|
+
/**
|
2026
|
+
* @public
|
2027
|
+
*/
|
2028
|
+
export declare const useIsLoaded: () => {
|
2029
|
+
isTivioLoaded: boolean;
|
2030
|
+
};
|
2031
|
+
|
2032
|
+
/**
|
2033
|
+
* @public
|
2034
|
+
*/
|
2035
|
+
export declare const useIsMonetizationPurchased: () => {
|
2036
|
+
isOneOfSubscriptionPurchased: (subscriptionIds: string[]) => boolean;
|
2037
|
+
};
|
2038
|
+
|
2039
|
+
/**
|
2040
|
+
* Use row items
|
2041
|
+
* @param rowId - row ID
|
2042
|
+
* @param options - subscription options
|
2043
|
+
* @public
|
2044
|
+
*/
|
2045
|
+
export declare const useItemsInRow: (rowId: string, options?: SubscribeToItemsInRowOptions) => {
|
2046
|
+
pagination: PaginationInterface<ItemsInRow> | null;
|
2047
|
+
error: Error | null;
|
2048
|
+
};
|
2049
|
+
|
2050
|
+
/**
|
2051
|
+
* @public
|
2052
|
+
*/
|
2053
|
+
export declare const useMarkers: () => Marker[] | null;
|
2054
|
+
|
2055
|
+
/**
|
2056
|
+
* @public
|
2057
|
+
*/
|
2058
|
+
export declare const useOrganizationSubscriptions: () => {
|
2059
|
+
subscriptions: Monetization[];
|
2060
|
+
};
|
2061
|
+
|
2062
|
+
/**
|
2063
|
+
* @public
|
2064
|
+
*/
|
2065
|
+
export declare type UsePlayerEvent = <T = any>(eventName: string) => T | null;
|
2066
|
+
|
2067
|
+
/**
|
2068
|
+
* @public
|
2069
|
+
*/
|
2070
|
+
export declare const usePlayerEvent: UsePlayerEvent;
|
2071
|
+
|
2072
|
+
/**
|
2073
|
+
* Is used to mark purchase in recovery state as PAID.
|
2074
|
+
*
|
2075
|
+
* @return purchaseRecoveryResult - message describing result of the recovery
|
2076
|
+
* loading - loading state
|
2077
|
+
* error - error in case request failure
|
2078
|
+
* purchaseRecovery - functions to execute purchase recovery
|
2079
|
+
* @public
|
2080
|
+
*/
|
2081
|
+
export declare function usePurchaseRecovery(): {
|
2082
|
+
purchaseRecoveryResult?: string | undefined;
|
2083
|
+
loading: boolean;
|
2084
|
+
error?: GenericOnCallError | undefined;
|
2085
|
+
purchaseRecovery: (monetizationId: string) => void;
|
2086
|
+
};
|
2087
|
+
|
2088
|
+
/**
|
2089
|
+
* @public
|
2090
|
+
*/
|
2091
|
+
export declare const usePurchaseSubscription: (monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
|
2092
|
+
|
2093
|
+
/**
|
2094
|
+
* Return purchases with initialized video (purchases[i].video not null)
|
2095
|
+
* @public
|
2096
|
+
*/
|
2097
|
+
export declare const usePurchasesWithVideos: () => {
|
2098
|
+
purchases: Purchase[];
|
2099
|
+
};
|
2100
|
+
|
2101
|
+
/**
|
2102
|
+
* @public
|
2103
|
+
*/
|
2104
|
+
export declare type User = {
|
2105
|
+
purchases: Purchase[];
|
2106
|
+
allPurchases: Purchase[];
|
2107
|
+
purchasedVods: Purchase[];
|
2108
|
+
purchasedSubscriptions: Purchase[];
|
2109
|
+
isPurchasesInitialized: boolean;
|
2110
|
+
isSignedIn: boolean;
|
2111
|
+
email?: string;
|
2112
|
+
type?: UserType;
|
2113
|
+
photoURL: string | null;
|
2114
|
+
name?: string;
|
2115
|
+
authUserId?: string;
|
2116
|
+
favorites: any[];
|
2117
|
+
watchedPositions: any[];
|
2118
|
+
};
|
2119
|
+
|
2120
|
+
/**
|
2121
|
+
* @public
|
2122
|
+
*/
|
2123
|
+
export declare const useRowsInScreen: (screenId: string, options?: PaginationOptions) => {
|
2124
|
+
pagination: PaginationInterface<Row> | null;
|
2125
|
+
error: Error | null;
|
2126
|
+
};
|
2127
|
+
|
2128
|
+
/**
|
2129
|
+
* @public
|
2130
|
+
*/
|
2131
|
+
export declare type UserPayload = Record<string, any>;
|
2132
|
+
|
2133
|
+
/**
|
2134
|
+
* @public
|
2135
|
+
*/
|
2136
|
+
export declare enum UserType {
|
2137
|
+
ORGANIZATION_USER = "ORGANIZATION_USER",
|
2138
|
+
TIVIO_USER = "TIVIO_USER"
|
2139
|
+
}
|
2140
|
+
|
2141
|
+
/**
|
2142
|
+
* @public
|
2143
|
+
*/
|
2144
|
+
export declare type UseSearch = <T extends ALGOLIA_INDEX_NAME>(indexName: T, options?: UseSearchOptions) => {
|
2145
|
+
search: (query: string) => void;
|
2146
|
+
pagination: PaginationInterface<UseSearchResult<T>> | null;
|
2147
|
+
error: Error | null;
|
2148
|
+
isLoading: boolean;
|
2149
|
+
lastQuery: string;
|
2150
|
+
};
|
2151
|
+
|
2152
|
+
/**
|
2153
|
+
* Full text search that returns entities based on search query.
|
2154
|
+
* @param indexName - index that search would be performed on ('videos', 'tags', etc.)
|
2155
|
+
* @param options - pagination options
|
2156
|
+
* @public
|
2157
|
+
*/
|
2158
|
+
export declare const useSearch: UseSearch;
|
2159
|
+
|
2160
|
+
/**
|
2161
|
+
* @public
|
2162
|
+
*/
|
2163
|
+
export declare type UseSearchOptions = PaginationOptions & Partial<{
|
2164
|
+
minQueryLength: number;
|
2165
|
+
}>;
|
2166
|
+
|
2167
|
+
/**
|
2168
|
+
* @public
|
2169
|
+
*/
|
2170
|
+
export declare type UseSearchResult<T extends ALGOLIA_INDEX_NAME> = T extends ALGOLIA_INDEX_NAME.VIDEOS ? Video : T extends ALGOLIA_INDEX_NAME.TAGS ? Tag : T extends ALGOLIA_INDEX_NAME.TV_CHANNELS ? TvChannel : unknown;
|
2171
|
+
|
2172
|
+
/**
|
2173
|
+
* @public
|
2174
|
+
*/
|
2175
|
+
export declare const useSeekState: () => boolean | null;
|
2176
|
+
|
2177
|
+
/**
|
2178
|
+
* Returns videos with given tag ids
|
2179
|
+
* @param tagIds - tag ids
|
2180
|
+
* @param options - subscription options
|
2181
|
+
* @public
|
2182
|
+
*/
|
2183
|
+
export declare const useTaggedVideos: (tagIds: string[], options?: SubscribeToItemsInRowOptions) => {
|
2184
|
+
pagination: PaginationInterface<Video> | null;
|
2185
|
+
error: Error | null;
|
2186
|
+
};
|
2187
|
+
|
2188
|
+
/**
|
2189
|
+
* @public
|
2190
|
+
*/
|
2191
|
+
export declare const useTivioData: () => RemoteBundleState;
|
2192
|
+
|
2193
|
+
/**
|
2194
|
+
* @public
|
2195
|
+
*/
|
2196
|
+
export declare const useTivioReadyData: () => RemoteBundleState | null;
|
2197
|
+
|
2198
|
+
/**
|
2199
|
+
* @public
|
2200
|
+
*/
|
2201
|
+
export declare const useTransactionPayment: (videoId: string, monetizationId: string, voucher?: NewVoucher | undefined) => QerkoTransaction;
|
2202
|
+
|
2203
|
+
/**
|
2204
|
+
* @public
|
2205
|
+
*/
|
2206
|
+
export declare type UseTvChannel = (tvChannelId: string) => {
|
2207
|
+
tvChannel: TvChannel | null;
|
2208
|
+
error: Error | null;
|
2209
|
+
loading: boolean;
|
2210
|
+
};
|
2211
|
+
|
2212
|
+
/**
|
2213
|
+
* @public
|
2214
|
+
*/
|
2215
|
+
export declare const useUser: () => {
|
2216
|
+
user: User | null;
|
2217
|
+
error: string | null;
|
2218
|
+
isInitialized: boolean;
|
2219
|
+
};
|
2220
|
+
|
2221
|
+
/**
|
2222
|
+
* Use video
|
2223
|
+
* @param videoId - video id
|
2224
|
+
* @public
|
2225
|
+
*/
|
2226
|
+
export declare const useVideo: (videoId?: string | undefined) => {
|
2227
|
+
data: Video | null;
|
2228
|
+
error: string | null;
|
2229
|
+
};
|
2230
|
+
|
2231
|
+
/**
|
2232
|
+
* @public
|
2233
|
+
*/
|
2234
|
+
export declare const useVoucher: (voucherId: string) => {
|
2235
|
+
activate: (() => Promise<void>) | null;
|
2236
|
+
voucher: Voucher | null;
|
2237
|
+
/**
|
2238
|
+
* You can check error.details if you need to know error type when you want your own error messages
|
2239
|
+
* (can be one of "DOES_NOT_EXIST", "EXPIRED" and "ALREADY_USED").
|
2240
|
+
*/
|
2241
|
+
error: Error | BadRequestError | null;
|
2242
|
+
/**
|
2243
|
+
* True if voucher has been successfully activated in current session.
|
2244
|
+
*/
|
2245
|
+
activationSuccess: boolean;
|
2246
|
+
};
|
2247
|
+
|
2248
|
+
/**
|
2249
|
+
* @public
|
2250
|
+
*/
|
2251
|
+
export declare const useWatchWithoutAdsOffer: () => {
|
2252
|
+
canPurchaseWatchWithoutAds: boolean;
|
2253
|
+
showPurchaseDialog: () => void;
|
2254
|
+
};
|
2255
|
+
|
2256
|
+
/**
|
2257
|
+
* @public
|
2258
|
+
*/
|
2259
|
+
export declare const VAST_PROVIDERS: ({
|
2260
|
+
id: VastProvider;
|
2261
|
+
name: string;
|
2262
|
+
development?: undefined;
|
2263
|
+
} | {
|
2264
|
+
id: VastProvider;
|
2265
|
+
name: string;
|
2266
|
+
development: boolean;
|
2267
|
+
})[];
|
2268
|
+
|
2269
|
+
/**
|
2270
|
+
* @public
|
2271
|
+
*/
|
2272
|
+
export declare enum VastProvider {
|
2273
|
+
CNC_PREBID = "cnc-prebid",
|
2274
|
+
ETARGET_PREBID = "etarget-prebid",
|
2275
|
+
FALLBACK_HLS = "fallback-hls",
|
2276
|
+
FALLBACK_MP4 = "fallback",
|
2277
|
+
GARAZ_TV = "garaz.tv",
|
2278
|
+
GARAZ_TV_DEV = "garaz.tv.dev",
|
2279
|
+
IMPRESSION_MEDIA_PREBID = "impressionMedia-prebid",
|
2280
|
+
JOJ = "joj",
|
2281
|
+
MALL_TV = "malltv",
|
2282
|
+
MALL_TV_PREBID = "malltv-prebid",
|
2283
|
+
PRIMA = "prima",
|
2284
|
+
TEST = "test"
|
2285
|
+
}
|
2286
|
+
|
2287
|
+
/**
|
2288
|
+
* @public
|
2289
|
+
*/
|
2290
|
+
export declare interface Video extends RowItem {
|
2291
|
+
id: string;
|
2292
|
+
/**
|
2293
|
+
* @deprecated use assets instead
|
2294
|
+
*/
|
2295
|
+
cover: string | null;
|
2296
|
+
created: Date;
|
2297
|
+
sectionId: string | null;
|
2298
|
+
channelId: string | null;
|
2299
|
+
/**
|
2300
|
+
* seconds
|
2301
|
+
*/
|
2302
|
+
duration: number;
|
2303
|
+
path: string;
|
2304
|
+
tags: Tag[];
|
2305
|
+
image: string | null;
|
2306
|
+
isPlayable: boolean;
|
2307
|
+
monetizations: Monetization[];
|
2308
|
+
monetization: Monetization | undefined;
|
2309
|
+
transactionId?: string;
|
2310
|
+
transaction: Monetization | undefined;
|
2311
|
+
subscriptions: Monetization[];
|
2312
|
+
subscriptionIds: string[];
|
2313
|
+
isPlaylist: boolean;
|
2314
|
+
name: string;
|
2315
|
+
description?: string;
|
2316
|
+
price: number | null;
|
2317
|
+
detailedPrice: DetailedPrice | null;
|
2318
|
+
uri: string;
|
2319
|
+
url: string;
|
2320
|
+
adMonetizationId?: string;
|
2321
|
+
from?: Date;
|
2322
|
+
to?: Date;
|
2323
|
+
detailBanner?: string;
|
2324
|
+
linkedVideosRaw: any[];
|
2325
|
+
linkedVideos: LinkedVideo[];
|
2326
|
+
purchasableMonetization: any | null;
|
2327
|
+
contentType: VideoContentType | null;
|
2328
|
+
year?: number;
|
2329
|
+
episodeNumber?: number;
|
2330
|
+
seasonNumber?: number;
|
2331
|
+
getTagsOfType: (type: string) => Tag[];
|
2332
|
+
loadLinkedVideos: () => any;
|
2333
|
+
getLinkedVideos: (type: any) => any;
|
2334
|
+
trailer: Video | null;
|
2335
|
+
watchPosition: number | null;
|
2336
|
+
isFavorite: boolean;
|
2337
|
+
addToFavorites: () => void;
|
2338
|
+
removeFromFavorites: () => void;
|
2339
|
+
availability: VideoAvailability | null;
|
2340
|
+
}
|
2341
|
+
|
2342
|
+
/**
|
2343
|
+
* @public
|
2344
|
+
*/
|
2345
|
+
export declare type VideoAvailability = {
|
2346
|
+
from: Date;
|
2347
|
+
to: Date | null;
|
2348
|
+
manual: boolean;
|
2349
|
+
};
|
2350
|
+
|
2351
|
+
/**
|
2352
|
+
* @public
|
2353
|
+
*/
|
2354
|
+
export declare enum VideoContentType {
|
2355
|
+
/**
|
2356
|
+
* Default video content type
|
2357
|
+
*/
|
2358
|
+
VIDEO = "VIDEO",
|
2359
|
+
FILM = "FILM",
|
2360
|
+
SERIES = "SERIES"
|
2361
|
+
}
|
2362
|
+
|
2363
|
+
/**
|
2364
|
+
* @public
|
2365
|
+
*/
|
2366
|
+
export declare interface VideoExternals {
|
2367
|
+
tvProfiProgramId?: string;
|
2368
|
+
tvProfiContentId?: string;
|
2369
|
+
tvProfiSerialId?: string;
|
2370
|
+
contentId?: string;
|
2371
|
+
provysId?: string;
|
2372
|
+
mallTvEntityId?: string;
|
2373
|
+
/**
|
2374
|
+
* DRM content Key ID - should't be more connected with buyDRM or streamOnline? It is not general thing
|
2375
|
+
*/
|
2376
|
+
keyId?: string;
|
2377
|
+
}
|
2378
|
+
|
2379
|
+
declare type VideoPath = string;
|
2380
|
+
|
2381
|
+
/**
|
2382
|
+
* Video type.
|
2383
|
+
* @public
|
2384
|
+
*/
|
2385
|
+
export declare enum VideoType {
|
2386
|
+
/**
|
2387
|
+
* Video is composed of several other videos.
|
2388
|
+
*/
|
2389
|
+
PLAYLIST = "PLAYLIST",
|
2390
|
+
/**
|
2391
|
+
* Video is a standard single video.
|
2392
|
+
*/
|
2393
|
+
VIDEO = "VIDEO",
|
2394
|
+
TV_PROGRAM = "TV_PROGRAM"
|
2395
|
+
}
|
2396
|
+
|
2397
|
+
/**
|
2398
|
+
* @public
|
2399
|
+
*/
|
2400
|
+
export declare type VodExternalSource = {
|
2401
|
+
new (uri: string, monetizationId: string, name: string, description: string, originalOptions: Record<string, any>): VodTivioSource;
|
2402
|
+
type: 'vod_external';
|
2403
|
+
description: string;
|
2404
|
+
name: string;
|
2405
|
+
uri: string;
|
2406
|
+
};
|
2407
|
+
|
2408
|
+
/**
|
2409
|
+
* @public
|
2410
|
+
*/
|
2411
|
+
export declare type VodTivioSource = {
|
2412
|
+
new (uri: string, videoId: string, name: string, description: string, adMonetizationId?: string): VodTivioSource;
|
2413
|
+
type: 'vod_tivio';
|
2414
|
+
description: string;
|
2415
|
+
name: string;
|
2416
|
+
uri: string;
|
2417
|
+
};
|
2418
|
+
|
2419
|
+
declare interface VodTivioSourcePojo {
|
2420
|
+
type: 'VodTivioSource';
|
2421
|
+
description: string;
|
2422
|
+
path: string;
|
2423
|
+
name: string;
|
2424
|
+
uri: string;
|
2425
|
+
poster?: string;
|
2426
|
+
adMonetizationId?: string;
|
2427
|
+
availability: VideoAvailability | null;
|
2428
|
+
}
|
2429
|
+
|
2430
|
+
/**
|
2431
|
+
* TODO: Should be in core-js, we can't import types from it, though.
|
2432
|
+
*/
|
2433
|
+
declare type Voucher = {
|
2434
|
+
activate: () => void;
|
2435
|
+
isUsed: boolean;
|
2436
|
+
isExpired: boolean;
|
2437
|
+
status: 'NEW' | 'USED';
|
2438
|
+
voucherInfo: SubscriptionInfo | TransactionInfo;
|
2439
|
+
};
|
2440
|
+
|
2441
|
+
/**
|
2442
|
+
* @public
|
2443
|
+
*/
|
2444
|
+
export declare type WebosDeviceInfo = {
|
2445
|
+
type: 'webos';
|
2446
|
+
model?: string;
|
2447
|
+
osVersion?: string;
|
2448
|
+
};
|
2449
|
+
|
2450
|
+
/**
|
2451
|
+
* @public
|
2452
|
+
*/
|
2453
|
+
export declare interface WebPlayerProps {
|
2454
|
+
id: string;
|
2455
|
+
source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
|
2456
|
+
onEnded?: () => any;
|
2457
|
+
/**
|
2458
|
+
* If this function is specified, then "Back" button is shown in top right corner.
|
2459
|
+
*/
|
2460
|
+
onBack?: () => void;
|
2461
|
+
className?: string;
|
2462
|
+
/**
|
2463
|
+
* default false
|
2464
|
+
*
|
2465
|
+
* If you choose `autoplay` make sure that autoplay is allowed in the specific situation.
|
2466
|
+
* In some cases it may not be allowed, e.g. before the user interacted with the site, and the video
|
2467
|
+
* will stay paused.
|
2468
|
+
*
|
2469
|
+
* Source: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide
|
2470
|
+
*/
|
2471
|
+
autoplay?: boolean;
|
2472
|
+
/**
|
2473
|
+
* default false
|
2474
|
+
*/
|
2475
|
+
canReplay?: boolean;
|
2476
|
+
/**
|
2477
|
+
* default false
|
2478
|
+
*/
|
2479
|
+
showMarkers?: boolean;
|
2480
|
+
/**
|
2481
|
+
* number[] is array of keyboard event.which numeric codes
|
2482
|
+
* (see https://keycode.info/)
|
2483
|
+
*/
|
2484
|
+
customShortcuts?: Partial<{
|
2485
|
+
toggleFullscreen: number[];
|
2486
|
+
togglePause: number[];
|
2487
|
+
toggleMute: number[];
|
2488
|
+
jumpForward: number[];
|
2489
|
+
jumpBack: number[];
|
2490
|
+
volumeUp: number[];
|
2491
|
+
volumeDown: number[];
|
2492
|
+
}>;
|
2493
|
+
/**
|
2494
|
+
* default true
|
2495
|
+
*/
|
2496
|
+
enableKeyboardShortcuts?: boolean;
|
2497
|
+
onProgress?: (event: React_2.ChangeEvent<HTMLVideoElement>) => void;
|
2498
|
+
/**
|
2499
|
+
* @deprecated this callback is never called. Will be removed in @tivio/sdk-react version 4
|
2500
|
+
*/
|
2501
|
+
onPlayerControllerCreated?: (playerController: any) => void;
|
2502
|
+
}
|
2503
|
+
|
2504
|
+
/**
|
2505
|
+
* @public
|
2506
|
+
*/
|
2507
|
+
export declare type WebRowProps = {
|
2508
|
+
items?: ItemsInRow[];
|
2509
|
+
variant?: RowItemComponent;
|
2510
|
+
rowName?: string | any;
|
2511
|
+
fetchMore?: () => void;
|
2512
|
+
onTileClick?: (item: ItemsInRow) => void;
|
2513
|
+
};
|
2514
|
+
|
2515
|
+
/**
|
2516
|
+
* @public
|
2517
|
+
*/
|
2518
|
+
export declare type WebSeriesDetailScreenProps = {
|
2519
|
+
tagId: string;
|
2520
|
+
};
|
2521
|
+
|
2522
|
+
/**
|
2523
|
+
* @public
|
2524
|
+
*/
|
2525
|
+
export declare interface WhereFilter {
|
2526
|
+
field: string;
|
2527
|
+
operator: WhereFilterOp;
|
2528
|
+
value: any;
|
2529
|
+
}
|
2530
|
+
|
2531
|
+
declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
|
2532
|
+
|
2533
|
+
/**
|
2534
|
+
* @public
|
2535
|
+
*/
|
2536
|
+
export declare type Widget = {
|
2537
|
+
id: string;
|
2538
|
+
channels: Channel[];
|
2539
|
+
isEnabled: boolean | null;
|
2540
|
+
name: string | null;
|
2541
|
+
recentVideos: Video[] | null;
|
2542
|
+
widgetId: string | null;
|
2543
|
+
lastVideo: Video | null;
|
2544
|
+
};
|
2545
|
+
|
2546
|
+
/**
|
2547
|
+
* @public
|
2548
|
+
*/
|
2549
|
+
export declare function withPlayerContext(id: string): <P>(WrappedComponent: React_2.ComponentType<P>) => (props: P) => JSX.Element;
|
2550
|
+
|
2551
|
+
export { }
|