@tivio/sdk-js 2.3.2 → 2.4.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.
@@ -0,0 +1,2784 @@
1
+ import { DocumentReference } from '@firebase/firestore-types';
2
+ import firebase from '@firebase/app-types';
3
+
4
+ /**
5
+ * @public
6
+ */
7
+ declare type AdMetadata = {
8
+ type: 'ad';
9
+ subType: 'inserted' | 'original';
10
+ secondsToEnd: number;
11
+ /**
12
+ * null when ad is not skippable
13
+ */
14
+ secondsToSkippable: number | null;
15
+ canTriggerSkip: boolean;
16
+ isSkippable: boolean;
17
+ order: number | null;
18
+ totalCount: number | null;
19
+ skip: () => void;
20
+ } | null;
21
+
22
+ declare interface AdSegment {
23
+ id: string;
24
+ /**
25
+ * @deprecated alias to secondsToEnd * 1000
26
+ */
27
+ remainingMs: number;
28
+ secondsToEnd: number;
29
+ secondsToSkippable: number | null;
30
+ canSeek: boolean;
31
+ /**
32
+ * true if is skippable and skip countdown has passed
33
+ */
34
+ canSkip: boolean;
35
+ /**
36
+ * true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
37
+ */
38
+ isSkippable: boolean;
39
+ skip: () => any;
40
+ }
41
+
42
+ /**
43
+ * @public
44
+ */
45
+ declare type AdSource = SourceBase & {
46
+ type: 'ad';
47
+ };
48
+
49
+ /**
50
+ * @public
51
+ */
52
+ declare interface AdSourceInterface extends CommonSourceInterface<SourceType.ADVERTISEMENT> {
53
+ adType: AdType;
54
+ durationMs: number;
55
+ skipDelayMs: number | null;
56
+ /**
57
+ * true if is skippable and skip countdown has passed
58
+ */
59
+ canSkip: boolean;
60
+ /**
61
+ * true ad if is skippable after some skipDelayMs (if it is skippable, skipDelayMs is defined)
62
+ */
63
+ isSkippable: boolean;
64
+ isSkipped: boolean;
65
+ isPaused: boolean;
66
+ isMuted: boolean;
67
+ setIsPaused(isPaused: boolean): void;
68
+ /**
69
+ * Skip ad. Only works when canSkip is true
70
+ */
71
+ skip: () => void;
72
+ /**
73
+ * Order in ad break (ad break is a group of ads played right after each other)
74
+ */
75
+ order: number | null;
76
+ /**
77
+ * Total number of ads in ad break (ad break is a group of ads played right after each other)
78
+ */
79
+ totalCount: number | null;
80
+ secondsToEnd: number;
81
+ secondsToSkippable: number | null;
82
+ provider?: VastProvider;
83
+ apiFramework: VastApiFramework | null;
84
+ parent: PlayerSourceInterface | null;
85
+ trackingContext: any | null;
86
+ resumeAd(): void;
87
+ pauseAd(): void;
88
+ muteAd(): void;
89
+ unmuteAd(): void;
90
+ skipAll(): void;
91
+ onRemainingTimeChanged(ms: number): void;
92
+ click(): void;
93
+ }
94
+
95
+ /**
96
+ * @public
97
+ */
98
+ declare type AdType = 'playable' | 'metadata-only';
99
+
100
+ /**
101
+ * @public
102
+ */
103
+ declare interface Advertisement extends RowItem {
104
+ id: string;
105
+ itemType: ROW_ITEM_TYPES.ADVERTISEMENT;
106
+ type?: string | null;
107
+ }
108
+
109
+ export declare type Api = RemoteBundleState;
110
+
111
+ /**
112
+ * @public
113
+ */
114
+ declare interface Application extends RowItem {
115
+ id: string;
116
+ organizationId?: string;
117
+ itemType: ROW_ITEM_TYPES.APPLICATION;
118
+ name: string;
119
+ type: ApplicationType;
120
+ urlHandle: string;
121
+ applicationScreens: ApplicationScreenConfig[] | null;
122
+ screenConfigs: ScreenConfig[] | null;
123
+ logo: string | null;
124
+ cover: string | null;
125
+ videosCount: number | null;
126
+ organization?: Organization;
127
+ isEnabled: boolean;
128
+ }
129
+
130
+ /**
131
+ * @public
132
+ */
133
+ declare interface ApplicationScreenConfig {
134
+ name: Translation;
135
+ order: number;
136
+ path: string;
137
+ screenConfig: ScreenConfig | null;
138
+ }
139
+
140
+ declare enum ApplicationType {
141
+ TIVIO_PRO = "TIVIO_PRO",
142
+ ORGANIZATION = "ORGANIZATION"
143
+ }
144
+
145
+ /**
146
+ * @public
147
+ */
148
+ declare interface ApplyScreenConditionPayload {
149
+ embedUrl?: string;
150
+ userPurchases?: Purchase[];
151
+ isSignedIn?: boolean;
152
+ condition: RenderCondition;
153
+ }
154
+
155
+ /**
156
+ * @public
157
+ */
158
+ declare type ArrisDeviceInfo = {
159
+ type: 'arris';
160
+ model?: 'VIP1003' | 'VIP1113' | 'VIP5305';
161
+ };
162
+
163
+ /**
164
+ * @public
165
+ */
166
+ declare interface Article extends RowItem, MonetizableItem, ReactableContent {
167
+ id: string;
168
+ itemType: ROW_ITEM_TYPES.ARTICLE;
169
+ blocks: ArticleBlock[];
170
+ cover: string;
171
+ organizationId?: string;
172
+ detailBanner?: string;
173
+ episodeNumber?: number;
174
+ seasonNumber?: number;
175
+ }
176
+
177
+ /**
178
+ * @public
179
+ */
180
+ declare interface ArticleBlock {
181
+ id: string;
182
+ type: ArticleBlockType;
183
+ htmlContent?: string;
184
+ imageUrl?: string;
185
+ textContent?: string;
186
+ videoId?: string;
187
+ isOverflowImage?: boolean;
188
+ imageDescription?: string;
189
+ }
190
+
191
+ /**
192
+ * @public
193
+ */
194
+ declare type ArticleBlockType = 'PARAGRAPH' | 'IMAGE' | 'VIDEO' | 'HEADING' | 'PAYWALL' | 'BLOCK_QUOTE';
195
+
196
+ /**
197
+ * @public
198
+ */
199
+ declare interface Asset {
200
+ background: string;
201
+ }
202
+
203
+ /**
204
+ * @public
205
+ */
206
+ declare interface AssetsField<TAsset extends ScalableAsset = ScalableAsset> {
207
+ [assetName: string]: TAsset;
208
+ }
209
+
210
+ /**
211
+ * @public
212
+ */
213
+ declare interface AvailableSeason {
214
+ seasonNumber: number;
215
+ seasonName?: string;
216
+ }
217
+
218
+ declare interface AvailableSeasonField {
219
+ seasonNumber: number;
220
+ seasonName?: Translation;
221
+ }
222
+
223
+ declare enum BannerItemComponent {
224
+ CLASSIC = "CLASSIC",
225
+ SPLIT = "SPLIT",
226
+ BACKGROUND = "BACKGROUND",
227
+ BACKGROUND_BLUR = "BACKGROUND_BLUR",
228
+ ORGANIZATION_BANNER = "ORGANIZATION_BANNER",
229
+ CAROUSEL = "CAROUSEL"
230
+ }
231
+
232
+ /**
233
+ * @public
234
+ */
235
+ declare type BottomComponent = 'dateOfPublication' | 'description' | undefined;
236
+
237
+ /**
238
+ * @public
239
+ */
240
+ declare interface ChannelSourceInterface extends PlayerSourceInterface<SourceType.CHANNEL> {
241
+ tvChannelType: TvChannelType;
242
+ channelName: string;
243
+ programName?: string;
244
+ programDescription?: string;
245
+ from: Date;
246
+ to: Date;
247
+ poster: string | null;
248
+ tvMode: TvMode | 'live' | null;
249
+ }
250
+
251
+ /**
252
+ * @public
253
+ */
254
+ declare interface ChannelSourceParams extends PlayerSourceParams<SourceType.CHANNEL> {
255
+ tvChannelType: TvChannelType;
256
+ channelName: string;
257
+ programName?: string;
258
+ programDescription?: string;
259
+ from: Date;
260
+ to: Date;
261
+ tvMode?: TvMode | 'live' | null;
262
+ }
263
+
264
+ /**
265
+ * @public
266
+ */
267
+ declare type CmpConfig = 'default' | 'debug' | 'none';
268
+
269
+ /**
270
+ * TODO same name as core-js entity, not convenient
271
+ * @public
272
+ */
273
+ declare type CommonSource = PlayerSource | AdSourceInterface;
274
+
275
+ /**
276
+ * Use this interface only for inheritance. Otherwise use {@link CommonSource}
277
+ * @public
278
+ */
279
+ declare interface CommonSourceInterface<T extends SourceType = SourceType> {
280
+ type: T;
281
+ url: string;
282
+ name?: string;
283
+ description?: string;
284
+ currentTime: number;
285
+ event: any | null;
286
+ setEvent(event: any | null): void;
287
+ onTimeChanged(ms: number): void;
288
+ next: CommonSource | null;
289
+ canSeek: boolean;
290
+ hasNext: boolean;
291
+ isFinished: boolean;
292
+ setIsFinished(isFinished: boolean): void;
293
+ isStarted: boolean;
294
+ setIsStarted(isStarted: boolean): void;
295
+ autoplay?: boolean;
296
+ autoplayMuteFallback: boolean;
297
+ toLog(): any;
298
+ }
299
+
300
+ /**
301
+ * @public
302
+ */
303
+ declare interface CommonSourceParams<T extends SourceType = SourceType> {
304
+ type: T;
305
+ url: string;
306
+ name?: string;
307
+ description?: string;
308
+ autoplay?: boolean;
309
+ }
310
+
311
+ export declare type Conf = Pick<InternalConf, 'bundleUrlOverride' | 'capabilitiesOptions' | 'deviceCapabilities' | 'enableSentry' | 'forceCloudFnResolver' | 'language' | 'logger' | 'secret' | 'verbose'>;
312
+
313
+ /**
314
+ * @public
315
+ */
316
+ declare interface ConsumedAds {
317
+ chapterIds: Set<string>;
318
+ markerIds: Set<string>;
319
+ postroll: boolean;
320
+ /**
321
+ * TODO refactor
322
+ * true when preroll has been loaded (not when it was watched)
323
+ */
324
+ preroll: boolean;
325
+ }
326
+
327
+ /**
328
+ * @public
329
+ */
330
+ declare interface ContentAvailability {
331
+ from: Date;
332
+ to: Date | null;
333
+ manual: boolean;
334
+ }
335
+
336
+ declare type ContentType = 'ARTICLE' | 'VIDEO' | 'SERIES' | 'EPISODE';
337
+
338
+ /**
339
+ * @public
340
+ */
341
+ declare type ContinuePosition = number | null | Promise<number | null>;
342
+
343
+ /**
344
+ * @public
345
+ */
346
+ declare interface Conversation {
347
+ id: string;
348
+ createdAt: Date | null;
349
+ updatedAt: Date | null;
350
+ createdBy: MessageParticipant | null;
351
+ isSending: boolean;
352
+ lastMessage: ConversationMessage | null;
353
+ lastSeen: {
354
+ [key: string]: ConversationLastSeen | undefined;
355
+ };
356
+ participants: MessageParticipant[];
357
+ title: string;
358
+ messages: ConversationMessage[];
359
+ notSeenCount: number;
360
+ isLoading: boolean;
361
+ subscribeToMessages(): void;
362
+ sendMessage(text: string): Promise<SendMessageResponse>;
363
+ markAsRead(messageId: string): Promise<void>;
364
+ destroy(): void;
365
+ }
366
+
367
+ /**
368
+ * @public
369
+ */
370
+ declare interface ConversationLastSeen {
371
+ message: Message;
372
+ date?: Date;
373
+ }
374
+
375
+ /**
376
+ * @public
377
+ */
378
+ declare interface ConversationMessage {
379
+ id: string;
380
+ participant: MessageParticipant;
381
+ text: string;
382
+ createdAt: Date;
383
+ editedAt: Date | null;
384
+ }
385
+
386
+ /**
387
+ * @public
388
+ */
389
+ declare interface ConversationStore {
390
+ conversations: Map<string, Conversation>;
391
+ isLoading: boolean;
392
+ setParticipantPath(participantPath: string | null): void;
393
+ setConversations(callback: (conversations: Conversation[]) => Conversation[]): void;
394
+ subscribeConversations(participantPath: string): Promise<void>;
395
+ createConversation(participantPaths: string[]): Promise<{
396
+ id: string;
397
+ } | undefined>;
398
+ clearConversations(): void;
399
+ getConversationById(id: string): Conversation | undefined;
400
+ readonly allConversations: Conversation[];
401
+ readonly notSeenCount: number;
402
+ setDisposer(key: 'conversations', disposer: Disposer_2): void;
403
+ unsubscribeConversations(): void;
404
+ }
405
+
406
+ /**
407
+ * @param {PlayerInterfaceForPlayerWrapper} playerImplementation - player implementation
408
+ * @returns player wrapper instance
409
+ */
410
+ export declare const createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => PlayerWrapper;
411
+
412
+ declare type CreatePlayerWrapperType = (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
413
+
414
+ /**
415
+ * Fetch & load CommonJS remote module.
416
+ */
417
+ export declare const createRemotePackageLoader: () => (conf: InternalConf) => Promise<any>;
418
+
419
+ export declare const createTivio: () => (conf: Conf) => Promise<RemoteBundleState>;
420
+
421
+ /**
422
+ * @public
423
+ */
424
+ declare type CreateUserWithEmailAndPassword = (email: string, password: string, username?: string, phoneNumber?: string, referralToken?: string) => Promise<string | null>;
425
+
426
+ /**
427
+ * Three upper-case letters according to ISO-4217.
428
+ * @public
429
+ */
430
+ declare type Currency = 'CZK' | 'EUR' | 'USD';
431
+
432
+ /**
433
+ * @public
434
+ */
435
+ declare enum CustomerId {
436
+ CESTMIR_STRAKATY = "CESTMIR_STRAKATY",
437
+ CNC = "CNC",
438
+ DVTV = "DVTV",
439
+ DVTV_DEV = "DVTV_DEV",
440
+ DVTV_SK = "DVTV_SK",
441
+ GARAZ = "GARAZ",
442
+ GRAPE = "GRAPE",
443
+ HODINA_DEJEPICHU = "HODINA_DEJEPICHU",
444
+ INVESTICNI_PRUVODCE = "INVESTICNI_PRUVODCE",
445
+ INVESTOREES = "INVESTOREES",
446
+ JOJ = "JOJ",
447
+ KLUCI_Z_PRAHY = "KLUCI_Z_PRAHY",
448
+ MALL = "MALL",
449
+ MEDIAR = "MEDIAR",
450
+ NANGU_DEV = "NANGU_DEV",
451
+ O2 = "O2",
452
+ OKTAGON = "OKTAGON",
453
+ ONDREJ_AUST = "ONDREJ_AUST",
454
+ ONDREJ_KOBERSKY = "ONDREJ_KOBERSKY",
455
+ REALTALK = "REALTALK",
456
+ STARMAX = "STARMAX",
457
+ STARGAZE = "STARGAZE",
458
+ STORYBOOK = "STORYBOOK",// dev
459
+ TIVIO = "TIVIO",
460
+ TIVIO_PRO = "TIVIO_PRO",
461
+ U_KULATEHO_STOLU = "U_KULATEHO_STOLU",
462
+ VIRTUAL_CHANNEL_VIDEOS = "VIRTUAL_CHANNEL_VIDEOS",
463
+ VOJTA_ZIZKA = "VOJTA_ZIZKA",
464
+ LIGA_NARUBY = "LIGA_NARUBY",
465
+ VIC_NEZ_SI_MYSLITE = "VIC_NEZ_SI_MYSLITE",
466
+ ZIMAK = "ZIMAK",
467
+ TYDENIK_HOROSKOPU = "TYDENIK_HOROSKOPU",
468
+ THE_MAG = "THE_MAG",
469
+ FNO = "FNO",
470
+ HARTMANNRICO = "HARTMANNRICO",
471
+ DRASLOVKA = "DRASLOVKA",
472
+ CSOB = "CSOB",
473
+ MAGNA = "MAGNA",
474
+ REPORTERKY = "REPORTERKY",
475
+ TV_LUX = "TV_LUX",
476
+ KVIFF = "KVIFF",
477
+ KVIFF_WEB = "KVIFF_WEB",
478
+ SPORTY_TV = "SPORTY_TV",
479
+ PALATINUM = "PALATINUM",
480
+ MIRA_BOSAK = "MIRA_BOSAK",
481
+ KOVACIC_360 = "KOVACIC_360",
482
+ SIFRA_TV = "SIFRA_TV",
483
+ BLESK = "BLESK",
484
+ NERUDA_TV = "NERUDA_TV",
485
+ DAVID_FRANK_TV = "DAVID_FRANK_TV",
486
+ LEPSI_UZ_TO_NEBUDE = "LEPSI_UZ_TO_NEBUDE",
487
+ BEAT_SEXISM = "BEAT_SEXISM"
488
+ }
489
+
490
+ /**
491
+ * @public
492
+ */
493
+ declare interface Cutout {
494
+ startMs: number;
495
+ endMs: number;
496
+ }
497
+
498
+ /**
499
+ * @public
500
+ */
501
+ declare type DefaultOrderByField = 'created';
502
+
503
+ /**
504
+ * @public
505
+ */
506
+ declare interface DetailedPrice {
507
+ amount: number;
508
+ currency: Currency;
509
+ frequency?: MONETIZATION_FREQUENCY;
510
+ durationDays?: number;
511
+ }
512
+
513
+ /**
514
+ * @public
515
+ */
516
+ declare type DeviceInfo = ArrisDeviceInfo | ReactNativeDeviceInfo;
517
+
518
+ export declare type Disposer = () => void;
519
+
520
+ /**
521
+ * @public
522
+ */
523
+ declare type Disposer_2 = () => void;
524
+
525
+ declare interface Drm {
526
+ encryption: VideoSourceEncryption;
527
+ /**
528
+ * Url to retrieve fairplay from.
529
+ */
530
+ certificateUrl?: string;
531
+ /**
532
+ * Url to send license to.
533
+ */
534
+ licenseUrl: string;
535
+ /**
536
+ * Headers with corresponding values to send to license server.
537
+ */
538
+ licenseRequestHeaders: {
539
+ [key: string]: string;
540
+ };
541
+ }
542
+
543
+ /**
544
+ * @public
545
+ */
546
+ declare interface Duration {
547
+ units: DurationUnits;
548
+ value: number;
549
+ }
550
+
551
+ /**
552
+ * @public
553
+ */
554
+ declare enum DurationUnits {
555
+ DAY = "day",
556
+ MONTH = "month"
557
+ }
558
+
559
+ /**
560
+ * @public
561
+ */
562
+ declare interface EmitterInterface {
563
+ isSupported: (even: string) => boolean;
564
+ addListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
565
+ removeListener: <T = any>(event: string, cb: (value: T) => Empty_2) => void;
566
+ }
567
+
568
+ export declare type Empty = Promise<void> | void;
569
+
570
+ /**
571
+ * @public
572
+ */
573
+ declare type Empty_2 = void | Promise<void> | undefined | Promise<undefined>;
574
+
575
+ export declare const fetchBundleViaResolver: (conf: InternalConf) => Promise<string>;
576
+
577
+ /**
578
+ * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
579
+ * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
580
+ */
581
+ declare type FetchPackage = (url: string) => Promise<string>;
582
+
583
+ /**
584
+ * @public
585
+ */
586
+ declare type FollowedOrganizationData = {
587
+ id: string;
588
+ name: string;
589
+ application: {
590
+ id: string;
591
+ urlHandle: string;
592
+ logo?: string;
593
+ logoLandscape?: string;
594
+ profilePhoto?: string;
595
+ };
596
+ };
597
+
598
+ /**
599
+ * @public
600
+ */
601
+ declare type FrequencyInfo = {
602
+ title: Translation;
603
+ unit: string;
604
+ value: number;
605
+ };
606
+
607
+ /**
608
+ * @public
609
+ */
610
+ declare type GeoBlocking = {
611
+ whitelist: Array<any>;
612
+ } | {
613
+ blacklist: Array<any>;
614
+ };
615
+
616
+ /**
617
+ * @public
618
+ */
619
+ declare interface GetPurchasableMonetizationsOptions {
620
+ includeMonetizationsWithPurchaseDisabled: boolean;
621
+ }
622
+
623
+ declare interface GetSourceUrlResponse {
624
+ /**
625
+ * The resulting source url.
626
+ */
627
+ url: string;
628
+ /**
629
+ * Which sources did client (or cloud function) has already tried out.
630
+ */
631
+ sourceHistory: string[];
632
+ /**
633
+ * DRM configuration to {@link url} if source is encrypted.
634
+ */
635
+ drm?: Drm;
636
+ /**
637
+ * See {@link SourcePlayMode} type.
638
+ */
639
+ sourcePlayMode: SourcePlayMode;
640
+ /**
641
+ * Returns url to manifest with audio only chunks.
642
+ */
643
+ audioOnly?: boolean;
644
+ /**
645
+ * Current session id for given user and source.
646
+ */
647
+ sessionId?: string;
648
+ /**
649
+ * Template for generating image previews for user scrubbing in player.
650
+ */
651
+ seekingMatrix?: SeekingMatrixTemplate;
652
+ }
653
+
654
+ declare interface GetUserRssUrlResponse {
655
+ rssUrl: string;
656
+ createdAt?: number;
657
+ expiresAt?: number;
658
+ }
659
+
660
+ declare type InternalConf = {
661
+ /**
662
+ * @private URL of remote code bundle to be fetched directly (without using resolver)
663
+ */
664
+ bundleUrlOverride?: string;
665
+ /**
666
+ * Tells Tivio which technologies/protocols etc. is the device capable to play.
667
+ * If not provided, Tivio will try to guess it (based on the browser).
668
+ */
669
+ deviceCapabilities?: PlayerCapability[];
670
+ /**
671
+ * Additional options for deviceCapabilities
672
+ */
673
+ capabilitiesOptions?: {
674
+ /**
675
+ * Should the player prefer HTTP sources instead HTTPs if they are available.
676
+ * This can be used on platforms that support mixed content but do not support
677
+ * specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
678
+ */
679
+ preferHttp?: boolean;
680
+ };
681
+ secret: string;
682
+ resolverUrl: string;
683
+ logger?: Logger | null;
684
+ fetchPackage: FetchPackage;
685
+ language?: string;
686
+ sdkVersion: string;
687
+ /**
688
+ * Can force using bundle resolver method which doesn't depend on indexedDB (useful when some polyfill
689
+ * for indexedDB is used but indexedDB is not fully supported - it leads to situation where check for indexedDB
690
+ * presence passes but resolver fails anyway).
691
+ */
692
+ forceCloudFnResolver?: boolean;
693
+ /**
694
+ * Can turn off Tivio's Sentry logging, defaults to true.
695
+ */
696
+ enableSentry?: boolean;
697
+ /**
698
+ * Can turn on Tivio's console logging, defaults to false.
699
+ */
700
+ verbose?: boolean;
701
+ };
702
+
703
+ /**
704
+ * Responsible for handling of all player wrapper methods (it's called through PlayerWrapper).
705
+ * Also handles state when player wrapper from core-js is not ready yet and situation when it becomes ready.
706
+ */
707
+ declare class InternalPlayerWrapper implements TivioPlayerWrapper {
708
+ private playerImplementation;
709
+ private id;
710
+ corePlayerWrapperInstance: TivioPlayerWrapper | null;
711
+ listenersWaitingToRegister: {
712
+ eventType: PlayerWrapperEventTypeType;
713
+ listener: Listener;
714
+ }[];
715
+ constructor(playerImplementation: PlayerInterfaceForPlayerWrapper, id: string);
716
+ addEventListener(eventType: PlayerWrapperEventTypeType, listener: Listener): void;
717
+ reportError(error: Error): void;
718
+ reportPlaybackEnded(): void;
719
+ reportTimeProgress(ms: number): void;
720
+ seekTo(ms: number): void;
721
+ setSource(source: Source | null, calibrationId?: string): void;
722
+ /**
723
+ * Set instance of the real player wrapper (from core-js).
724
+ *
725
+ * @param createPlayerWrapper - create player wrapper method from core-js
726
+ */
727
+ onPlayerWrapperReady(createPlayerWrapper: CreatePlayerWrapperType): void;
728
+ }
729
+
730
+ /**
731
+ * @public
732
+ */
733
+ declare type ItemInRow = Tag | Video | TvChannel | Advertisement | Application | Article | Series;
734
+
735
+ /**
736
+ * Enum of all supported languages codes as in ISO 639-1
737
+ * @public
738
+ */
739
+ declare enum LangCode {
740
+ CS = "cs",
741
+ DE = "de",
742
+ EN = "en",
743
+ FR = "fr",
744
+ IT = "it",
745
+ PL = "pl",
746
+ PT = "pt",
747
+ SK = "sk",
748
+ ES = "es",
749
+ HU = "hu"
750
+ }
751
+
752
+ /**
753
+ * @public
754
+ */
755
+ declare interface LinkedVideo {
756
+ video: Video;
757
+ type: 'CUT' | 'TRAILER' | 'BONUS' | 'CHILD' | 'TEASER' | 'TASTING' | 'VIRTUAL_PROGRAM' | 'PIP';
758
+ }
759
+
760
+ /**
761
+ * @public
762
+ */
763
+ declare interface LinkedVideoRaw {
764
+ videoRef: any;
765
+ type: LinkedVideo['type'];
766
+ }
767
+
768
+ /**
769
+ * @public
770
+ */
771
+ declare type Listener = ListenerAdMetadata | ListenerMarkers;
772
+
773
+ /**
774
+ * @public
775
+ */
776
+ declare type ListenerAdMetadata = (metadata: AdMetadata) => void;
777
+
778
+ /**
779
+ * @public
780
+ */
781
+ declare type ListenerMarkers = (marker: Marker[] | null) => void;
782
+
783
+ /**
784
+ * Not supported yet, now it does pass-through only.
785
+ *
786
+ * @public
787
+ */
788
+ declare type LiveTvChannelSource = SourceBase & {
789
+ type: 'live_tv_channel';
790
+ /**
791
+ * Tivio needs channel name in order to load markers.
792
+ */
793
+ channelName: string;
794
+ };
795
+
796
+ declare interface Logger {
797
+ /** important messages */
798
+ warn(...data: LoggerArgs): void;
799
+ /** errors */
800
+ error(...data: LoggerArgs): void;
801
+ /** critical errors */
802
+ exception(...data: LoggerArgs): void;
803
+ /** metrics */
804
+ info(...data: LoggerArgs): void;
805
+ /** non-production messages */
806
+ debug(...data: LoggerArgs): void;
807
+ }
808
+
809
+ /**
810
+ * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
811
+ * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
812
+ */
813
+ declare type LoggerArgs = any[];
814
+
815
+ /**
816
+ * @public
817
+ */
818
+ declare interface Marker {
819
+ id: string;
820
+ from: Date;
821
+ to: Date;
822
+ count?: number;
823
+ fromMs?: number;
824
+ toMs?: number;
825
+ relativeFromMs: number;
826
+ relativeToMs: number;
827
+ type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
828
+ }
829
+
830
+ /**
831
+ * @public
832
+ */
833
+ declare interface Message {
834
+ id: string;
835
+ text: string;
836
+ videoTime: number | null;
837
+ createdAt: Date;
838
+ editedAt: Date | null;
839
+ user: MessageUser | null;
840
+ reactions: Record<string, number> | null;
841
+ repliesCount: number | null;
842
+ isReady: boolean;
843
+ updateRepliesCount: (increment: boolean) => void;
844
+ }
845
+
846
+ /**
847
+ * @public
848
+ */
849
+ declare interface MessageParticipant {
850
+ path: string;
851
+ name: string;
852
+ avatarUrl: string;
853
+ email: string;
854
+ }
855
+
856
+ /**
857
+ * @public
858
+ */
859
+ declare interface MessageUser {
860
+ name: string;
861
+ avatarUrl: string | null;
862
+ email: string;
863
+ }
864
+
865
+ declare interface MonetizableItem {
866
+ /**
867
+ * Returns true if content is purchased (via transaction or subscription) or free.
868
+ */
869
+ isPaid: boolean;
870
+ /**
871
+ * Gets the most relevant monetization for this content.
872
+ */
873
+ purchasableMonetization: PurchasableMonetization | null;
874
+ /**
875
+ * Returns all transactions and subscriptions applied to this video.
876
+ * Transactions before subscriptions, sorted by price ascending.
877
+ */
878
+ getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
879
+ }
880
+
881
+ /**
882
+ * @public
883
+ */
884
+ declare interface Monetization {
885
+ id: string;
886
+ type?: MonetizationType;
887
+ name?: string;
888
+ description?: string;
889
+ organizationId?: string;
890
+ order?: number;
891
+ }
892
+
893
+ /**
894
+ * @public
895
+ */
896
+ declare enum MONETIZATION_DURATION {
897
+ UNLIMITED = -1,
898
+ DAY = 1,
899
+ WEEK = 7,
900
+ MONTH = 30,
901
+ HALF_YEAR = 183,
902
+ YEAR = 365
903
+ }
904
+
905
+ /**
906
+ * @public
907
+ */
908
+ declare enum MONETIZATION_FREQUENCY {
909
+ ONE_TIME_PAYMENT = "ONE_TIME_PAYMENT",
910
+ DAILY = "DAILY",
911
+ WEEKLY = "WEEKLY",
912
+ MONTHLY = "MONTHLY",
913
+ HALF_ANNUALLY = "HALF_ANNUALLY",
914
+ ANNUALLY = "ANNUALLY"
915
+ }
916
+
917
+ /**
918
+ * @public
919
+ * @TODO change to enum
920
+ */
921
+ declare type MonetizationType = 'advertisement' | 'transaction' | 'subscription' | 'display';
922
+
923
+ declare type NextPageParamType = 'screenId' | 'rowId' | 'filter';
924
+
925
+ /**
926
+ * @public
927
+ */
928
+ declare type NonAdSourceType = Exclude<SourceType, SourceType.ADVERTISEMENT>;
929
+
930
+ /**
931
+ * @public
932
+ */
933
+ declare interface OrderBy<T = void> {
934
+ field: T extends void ? string : T;
935
+ directionStr?: OrderByDirection;
936
+ }
937
+
938
+ declare type OrderByDirection = 'desc' | 'asc';
939
+
940
+ /**
941
+ * @public
942
+ */
943
+ declare interface Organization {
944
+ id: string;
945
+ userProfileConfiguration: any;
946
+ screenConfigs: ScreenConfig[];
947
+ logo: string | null;
948
+ logoLandscape: string | null;
949
+ organizationBanner: string | null;
950
+ profilePhoto: string | null;
951
+ defaultLanguage?: string;
952
+ }
953
+
954
+ /**
955
+ * If Tivio PlayerWrapper is an interception layer, it should allow the pass-through
956
+ * of not just Tivio source types but any other source types that the 3rd party app may be using.
957
+ *
958
+ * @public
959
+ */
960
+ declare type OtherSource = SourceBase & StartAndContinuePosition & {
961
+ type: 'other';
962
+ };
963
+
964
+ declare interface PaginatedResponse<T = unknown, U extends NextPageParamType = NextPageParamType> {
965
+ items: T[];
966
+ nextPageParams: {
967
+ offset: number;
968
+ limit: number;
969
+ } & (U extends 'screenId' ? {
970
+ organizationId: string;
971
+ screenId: string;
972
+ initialTilesCount: number;
973
+ } : U extends 'rowId' ? {
974
+ organizationId: string;
975
+ rowId: string;
976
+ } : U extends 'filter' ? {
977
+ filter: Omit<RowFilterField, 'limit'>;
978
+ } : {}) | null;
979
+ }
980
+
981
+ /**
982
+ * @public
983
+ */
984
+ declare type PaginationInterface<Entity> = {
985
+ items: Entity[];
986
+ fetchMore: () => void;
987
+ hasNextPage?: boolean;
988
+ loading?: boolean;
989
+ initialLoading?: boolean;
990
+ };
991
+
992
+ /**
993
+ * @public
994
+ */
995
+ declare type PaginationOptions = Partial<{
996
+ limit: number;
997
+ noLimit: boolean;
998
+ noAutoFetch: boolean;
999
+ }>;
1000
+
1001
+ declare type PatreonUserAuth = {
1002
+ access_token: string;
1003
+ refresh_token: string;
1004
+ expires_in: number;
1005
+ token_type?: string;
1006
+ scope?: string;
1007
+ version?: string;
1008
+ };
1009
+
1010
+ /**
1011
+ * @public
1012
+ */
1013
+ declare enum PLATFORM {
1014
+ /**
1015
+ * Includes tablets.
1016
+ */
1017
+ MOBILE = "MOBILE",
1018
+ WEB = "WEB",
1019
+ TV = "TV",
1020
+ /**
1021
+ * @deprecated Used only in big query. In the future we'll migrate to undefined value and delete this.
1022
+ */
1023
+ UNKNOWN = "unknown"
1024
+ }
1025
+
1026
+ /**
1027
+ * @public
1028
+ */
1029
+ declare type Player = {
1030
+ ad: any;
1031
+ currentTime: any;
1032
+ adSegment: any;
1033
+ event: any;
1034
+ events: any;
1035
+ source: any;
1036
+ state: any;
1037
+ onPlaybackEnded: any;
1038
+ onSourceChanged: any;
1039
+ onStateChanged: any;
1040
+ onTimeChanged: any;
1041
+ pause: any;
1042
+ play: any;
1043
+ togglePlayPause: any;
1044
+ register: any;
1045
+ seekTo: any;
1046
+ setVolume: any;
1047
+ triggerEvent: any;
1048
+ };
1049
+
1050
+ export declare interface PlayerCapability {
1051
+ codec: 'h264' | 'h265';
1052
+ encryption: 'fairplay' | 'none' | 'playready' | 'widevine';
1053
+ protocol: 'dash' | 'hls';
1054
+ }
1055
+
1056
+ /**
1057
+ * @public
1058
+ */
1059
+ declare interface PlayerCapability_2 {
1060
+ codec: VideoSourceCodec;
1061
+ encryption: VideoSourceEncryption;
1062
+ protocol: VideoSourceProtocol;
1063
+ }
1064
+
1065
+ /**
1066
+ * @public
1067
+ */
1068
+ declare type PlayerConfig = {
1069
+ enabled?: boolean;
1070
+ /**
1071
+ * Some devices do not seek exactly
1072
+ *
1073
+ * e.g. on Arris if we request seek to position P, in reality it will seek to P -+5s
1074
+ * e.g. on Arris if we request play from position P, in reality it will play from P -+5s
1075
+ * (on Arris the error margin varies according to video format)
1076
+ */
1077
+ acceptablePositionAnomalyMs?: number;
1078
+ /**
1079
+ * Stream delay config
1080
+ *
1081
+ * IP TV apps have TV program / TV channel streams delayed relative to the original
1082
+ * video source. Therefore stream markers taken from the original video source
1083
+ * are delayed relative to the TV stream seen by end users of the IP TV app.
1084
+ *
1085
+ * This delay must be corrected.
1086
+ */
1087
+ streamDelayConfig?: {
1088
+ /**
1089
+ * ID of the delay config
1090
+ */
1091
+ id: string;
1092
+ };
1093
+ ui?: {
1094
+ /**
1095
+ * ID of a DOM element inside which Tivio should display its player-related UI
1096
+ * such as ad buttons. This DOM element is an anchor point for Tivio UI. Preferably
1097
+ * it should be a <div/> element styled to cover the whole area of the video player
1098
+ * and it should be positioned to be on top the existing player UI (e.g. via z-index).
1099
+ */
1100
+ domAnchorId: string | null;
1101
+ };
1102
+ protocols?: {
1103
+ mp4?: {
1104
+ /**
1105
+ * Set to false if player does not support MP4 files that require full file download
1106
+ * (i.e. they do not support progressive MP4 download and therefore the whole file
1107
+ * must be downloaded before playback can start)
1108
+ */
1109
+ fullFileDownloadSupport?: boolean;
1110
+ };
1111
+ };
1112
+ /**
1113
+ * Ad service settings
1114
+ */
1115
+ adService?: {
1116
+ /**
1117
+ * TIVIO AD SERVICE - can be used in websites and TV apps. Does not support VPAID
1118
+ * IMA - can be used only in websites. Supports VAST 2, partially VAST 3, VAST 4, SIMID 1.0, OM SDK 1.3,
1119
+ * VPAID 2 (HTML5) https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/compatibility
1120
+ */
1121
+ name: 'IMA SDK' | 'TIVIO AD SERVICE';
1122
+ };
1123
+ };
1124
+
1125
+ declare interface PlayerError {
1126
+ message: string;
1127
+ }
1128
+
1129
+ /**
1130
+ * @public
1131
+ */
1132
+ declare interface PlayerInterface {
1133
+ /**
1134
+ * Pause playback
1135
+ */
1136
+ pause: () => void;
1137
+ /**
1138
+ * Unpause playback
1139
+ */
1140
+ play: () => Promise<void> | void;
1141
+ /**
1142
+ * Stop and close video
1143
+ */
1144
+ stop: () => Promise<void> | void;
1145
+ /**
1146
+ * Seek to position in ms
1147
+ *
1148
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
1149
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
1150
+ */
1151
+ seekTo: (ms: number) => void;
1152
+ /**
1153
+ * Send this source to player. And either start playing it immediately if `source.autoplay` is true
1154
+ * or just load it and keep it paused and ready to play if `source.autoplay` is false.
1155
+ * If source is `null`, stop and close the player (this is the same as if `this.stop()` was called.)
1156
+ */
1157
+ setSource: (source: CommonSource | null) => Promise<void> | void;
1158
+ /**
1159
+ * Set volume
1160
+ *
1161
+ * @param {number} volume value in [0,1]
1162
+ */
1163
+ setVolume?: (volume: number) => void;
1164
+ /**
1165
+ * Mute the player volume
1166
+ */
1167
+ mute?: () => void;
1168
+ /**
1169
+ * Unmute the player volume and restore it to the save level that was before it has been muted
1170
+ */
1171
+ unmute?: () => void;
1172
+ /**
1173
+ * Sets native IMA ad URL which is then loaded and played on RN side
1174
+ */
1175
+ setNativeImaAdUrl?: (url: string) => void;
1176
+ /**
1177
+ * Try to load and play native IMA ad using provided URL
1178
+ */
1179
+ playNativeImaAd?: (url: string) => Promise<void>;
1180
+ /**
1181
+ * Get URL of native IMA ad which is currently playing
1182
+ */
1183
+ getNativeImaAdUrl?: () => string | null;
1184
+ lastQuality?: number | null;
1185
+ getQualities?: () => Track[];
1186
+ /**
1187
+ * Attribute indicating that the video is to be played "inline"
1188
+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#playsinline
1189
+ */
1190
+ setPlaysInline?: (value: boolean) => void;
1191
+ setControlsList?: (value: string[]) => void;
1192
+ }
1193
+
1194
+ /**
1195
+ * @public
1196
+ */
1197
+ declare interface PlayerInterfaceForPlayerWrapper {
1198
+ /**
1199
+ * @param {number} ms - milliseconds relative to start of video (relative to 0 ms)
1200
+ * or in case of TV programs relative to start of the program (relative to source.from ms)
1201
+ */
1202
+ seekTo: (ms: number) => void;
1203
+ setSource: (source: Source | null) => void;
1204
+ }
1205
+
1206
+ /**
1207
+ * TODO same name as core-js entity, not convenient
1208
+ * @public
1209
+ */
1210
+ declare type PlayerSource = VodTivioSourceInterface | VodExternalSourceInterface | ChannelSourceInterface | VirtualChannelSourceInterface;
1211
+
1212
+ /**
1213
+ * Use this interface only for inheritance. Otherwise use {@link PlayerSource}
1214
+ * @public
1215
+ */
1216
+ declare interface PlayerSourceInterface<T extends NonAdSourceType = NonAdSourceType> extends CommonSourceInterface<T> {
1217
+ adSegment: AdSegment | null;
1218
+ consumedAds: ConsumedAds;
1219
+ currentMarker: any | null;
1220
+ drm?: Drm;
1221
+ markers: any[];
1222
+ setMarkers(markers: any[]): void;
1223
+ isMarkersLoaded: boolean;
1224
+ setOutroMarker(marker: any): void;
1225
+ durationMs: number;
1226
+ setDurationMs(ms: number): void;
1227
+ reset(): void;
1228
+ cutout: Cutout | null;
1229
+ destroy(): void;
1230
+ seekTo(ms: number): void;
1231
+ adMonetization: any;
1232
+ setAdMonetization(monetization: any): void;
1233
+ setInitialTime(ms: number): void;
1234
+ setContinueFromPosition(ms: ContinuePosition): void;
1235
+ isLive: boolean;
1236
+ sourcePlayMode?: SourcePlayMode;
1237
+ language?: LangCode | null;
1238
+ availableLanguages?: LangCode[] | null;
1239
+ startOrResumeReactions(): void;
1240
+ pauseReactions(): void;
1241
+ correctStartPosition(): Promise<void | null>;
1242
+ setCanSeek(canSeek: boolean): void;
1243
+ originalOptions: Record<string, any>;
1244
+ }
1245
+
1246
+ /**
1247
+ * @public
1248
+ */
1249
+ declare interface PlayerSourceParams<T extends NonAdSourceType = NonAdSourceType> extends CommonSourceParams<T> {
1250
+ originalOptions?: Record<string, any>;
1251
+ continuePositionMs?: ContinuePosition;
1252
+ poster?: string | null;
1253
+ language?: LangCode | null;
1254
+ availableLanguages?: LangCode[] | null;
1255
+ sourcePlayMode: SourcePlayMode;
1256
+ }
1257
+
1258
+ /**
1259
+ * @public
1260
+ */
1261
+ declare type PlayerState = 'idle' | 'playing' | 'paused';
1262
+
1263
+ /**
1264
+ * Player wrapper which instances are exposed to SDK user.
1265
+ */
1266
+ declare class PlayerWrapper implements TivioPlayerWrapper {
1267
+ private internalPlayerWrapper;
1268
+ constructor(internalPlayerWrapper: InternalPlayerWrapper);
1269
+ addEventListener(eventType: 'adMetadata', listener: ListenerAdMetadata): void;
1270
+ addEventListener(eventType: 'markers', listener: ListenerMarkers): void;
1271
+ reportError: (error: Error) => void;
1272
+ reportPlaybackEnded: () => void;
1273
+ reportTimeProgress: (ms: number) => void;
1274
+ seekTo: (ms: number) => void;
1275
+ setSource: (source: Source | null, calibrationId?: string) => void;
1276
+ }
1277
+
1278
+ /**
1279
+ * @public
1280
+ */
1281
+ declare interface PlayerWrapper_2 {
1282
+ /**
1283
+ * Report that playback of video has finished
1284
+ */
1285
+ onPlaybackEnded: () => void;
1286
+ /**
1287
+ * Report video progress in milliseconds
1288
+ */
1289
+ onTimeChanged: (ms: number) => void;
1290
+ /**
1291
+ * Report that video state changed
1292
+ */
1293
+ onStateChanged: (state: PlayerState) => void;
1294
+ /**
1295
+ * Send source to Tivio
1296
+ */
1297
+ onSourceChanged: (source: PlayerSource | null) => void;
1298
+ /**
1299
+ * Report that video failed to load (never started playing)
1300
+ */
1301
+ onLoadError: (error: Error) => void;
1302
+ /**
1303
+ * Report that video failed during playback (successfully loaded and then failed, e.g. part of stream is invalid)
1304
+ */
1305
+ onError: (error: Error) => void;
1306
+ /**
1307
+ * Unpause video
1308
+ */
1309
+ play: () => void;
1310
+ /**
1311
+ * Pause video
1312
+ */
1313
+ pause: () => void;
1314
+ /**
1315
+ * Currently playing source
1316
+ */
1317
+ source: PlayerSource | null;
1318
+ events: EmitterInterface;
1319
+ /**
1320
+ * Register a low level player that implements player methods, like play video, change volume, etc.
1321
+ */
1322
+ register: (playerInterface: PlayerInterface) => void;
1323
+ /**
1324
+ * duration of current source in ms (both setter and getter)
1325
+ */
1326
+ durationMs: number | null;
1327
+ isPlaybackStarted?: boolean;
1328
+ isPaused: boolean;
1329
+ isPlaying: boolean;
1330
+ isIdle: boolean;
1331
+ error: PlayerError | null;
1332
+ /**
1333
+ * Replay the video that finished playback
1334
+ */
1335
+ replay: () => void;
1336
+ /**
1337
+ * Retry to play a video that failed to start playing (e.g. due to a network error)
1338
+ */
1339
+ retry: () => void;
1340
+ togglePlayPause: () => void;
1341
+ seekTo: (ms: number) => void;
1342
+ /**
1343
+ * set volume to value between 0,1
1344
+ */
1345
+ setVolume: (volume: number) => void;
1346
+ /**
1347
+ * change volume by value between -1,1
1348
+ */
1349
+ changeVolumeBy: (volume: number) => void;
1350
+ setMuted: (muted: boolean) => void;
1351
+ toggleMuted: () => void;
1352
+ getQualities: () => Track[];
1353
+ }
1354
+
1355
+ /**
1356
+ * @public
1357
+ */
1358
+ declare enum PlayerWrapperEventType {
1359
+ adMetadata = "adMetadata",
1360
+ markers = "markers"
1361
+ }
1362
+
1363
+ /**
1364
+ * @public
1365
+ */
1366
+ declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
1367
+
1368
+ /**
1369
+ * @public
1370
+ */
1371
+ declare interface Promotion {
1372
+ duration?: Duration;
1373
+ price?: number;
1374
+ requiresPaymentAuthorization?: boolean;
1375
+ hideOtherSubscriptions?: boolean;
1376
+ }
1377
+
1378
+ /**
1379
+ * @public
1380
+ */
1381
+ declare enum PublishedStatus {
1382
+ /**
1383
+ * Content is not published, is not shown in any application and cannot be played,
1384
+ * even if user enters url directly into browser.
1385
+ */
1386
+ DRAFT = "DRAFT",
1387
+ /**
1388
+ * Content is published and can be accessed and played freely in any application.
1389
+ */
1390
+ PUBLISHED = "PUBLISHED",
1391
+ /**
1392
+ * Content is not visible in the application (e.g. rows, search), but if user has direct url to it, they can play it.
1393
+ */
1394
+ UNLISTED = "UNLISTED"
1395
+ }
1396
+
1397
+ /**
1398
+ * @public
1399
+ */
1400
+ declare interface PurchasableMonetization extends Monetization {
1401
+ /**
1402
+ * Price before any discounts (e.g. promotions).
1403
+ */
1404
+ originalPrice: number;
1405
+ /**
1406
+ * Final price (after discounts).
1407
+ */
1408
+ price?: string | number;
1409
+ promotion: Promotion | null;
1410
+ frequency?: MONETIZATION_FREQUENCY;
1411
+ frequencyInfo?: FrequencyInfo;
1412
+ durationDays?: number;
1413
+ /**
1414
+ * Returns TRUE if subscription is purchased (and not expired) by user.
1415
+ * Returns TRUE if transaction is purchased (and not expired) for transactionItemId.
1416
+ * Returns FALSE otherwise.
1417
+ *
1418
+ * @param transactionItemId id of item for which transaction purchase is checked
1419
+ * @param transactionField type of item (video or tvChannel)
1420
+ */
1421
+ isPurchased(transactionItemId?: string, transactionField?: 'videoId' | 'tvChannelId'): boolean;
1422
+ benefits?: Translation[];
1423
+ localizedBenefits?: string[];
1424
+ /**
1425
+ * Set to true for subscriptions which is not possible to buy - typically for historical subscriptions which users
1426
+ * still have bought but can't be purchased anymore.
1427
+ */
1428
+ purchaseDisabled?: boolean;
1429
+ /**
1430
+ * When set to true, users can buy this monetization as a voucher (e.g. to send it as a gift to a friend).
1431
+ * If not set or set to false, users cannot buy it as a voucher.
1432
+ */
1433
+ isPurchasableAsVoucher?: boolean;
1434
+ /**
1435
+ * Returns array of tag ids of monetization placements
1436
+ */
1437
+ tagIds: string[];
1438
+ /**
1439
+ * When set to true, subscription is hidden in UI (e.g. in MonetizationSelectOverlay).
1440
+ */
1441
+ subscriptionIsHidden?: boolean;
1442
+ /**
1443
+ * Price that is used for marketing purposes (strike-through price).
1444
+ */
1445
+ regularPrice?: DetailedPrice;
1446
+ /**
1447
+ * Number of seats left for the subscription.
1448
+ */
1449
+ seatsLeft?: number;
1450
+ maxQuantity?: number;
1451
+ }
1452
+
1453
+ /**
1454
+ * @public
1455
+ */
1456
+ declare type Purchase = {
1457
+ /**
1458
+ * Timestamp of the purchase creation in milliseconds.
1459
+ */
1460
+ created: number | null;
1461
+ /**
1462
+ * Email of the user who created the purchase manually.
1463
+ */
1464
+ createdBy?: string;
1465
+ expirationDate: Date | null;
1466
+ gateway: PurchaseDocumentGateway | null;
1467
+ id: string;
1468
+ isExpired: boolean;
1469
+ /**
1470
+ * @deprecated isPurchased is ambiguous name. Now it means that purchase.status is "PAID".
1471
+ * So use purchase.status === PurchaseStatus.PAID instead.
1472
+ */
1473
+ isPurchased: boolean;
1474
+ monetization: PurchaseMonetization | null;
1475
+ monetizationId: string | null;
1476
+ monetizationRef: any | null;
1477
+ status: PurchaseStatus | null;
1478
+ type: PurchaseType | null;
1479
+ /**
1480
+ * Timestamp of the last purchase status update in milliseconds.
1481
+ */
1482
+ updated: number | null;
1483
+ videoId: string | null;
1484
+ videoRef: any | null;
1485
+ voucherId: string | null;
1486
+ isVoucherActivation?: boolean;
1487
+ rebalancingVideoRef?: any;
1488
+ };
1489
+
1490
+ /**
1491
+ * @public
1492
+ */
1493
+ declare enum PurchaseDocumentGateway {
1494
+ 'qerko' = "qerko",
1495
+ 'oktagon' = "oktagon",
1496
+ 'voucher' = "voucher",
1497
+ 'comgate' = "comgate",
1498
+ 'tivio' = "tivio",
1499
+ 'patreon' = "patreon",
1500
+ 'paypal' = "paypal",
1501
+ 'unknown' = "unknown",
1502
+ 'stargaze' = "stargaze"
1503
+ }
1504
+
1505
+ /**
1506
+ * @public
1507
+ */
1508
+ declare type PurchaseMonetization = {
1509
+ durationDays?: MONETIZATION_DURATION | number;
1510
+ currency?: Currency;
1511
+ price?: number;
1512
+ /**
1513
+ * Here are only transaction and subscription because purchasing of advertisement monetization doesn't make sense.
1514
+ */
1515
+ type: 'transaction' | 'subscription';
1516
+ title?: string;
1517
+ frequency?: MONETIZATION_FREQUENCY | null;
1518
+ /**
1519
+ * If set purchase (subscription) activated by voucher will stay valid for this amount of seconds.
1520
+ * Otherwise purchase will be valid for one "monetization frequency" period.
1521
+ */
1522
+ voucherPurchaseDuration?: number;
1523
+ };
1524
+
1525
+ /**
1526
+ * @public
1527
+ */
1528
+ declare enum PurchaseStatus {
1529
+ NEW = "NEW",
1530
+ PAID = "PAID",
1531
+ CANCELLED = "CANCELLED",
1532
+ ERROR = "ERROR",
1533
+ /**
1534
+ * Used when purchase is terminated due to terms and conditions violation (e.g. restreaming).
1535
+ */
1536
+ BLOCKED = "BLOCKED",
1537
+ /**
1538
+ * Used in subscription purchases when subscription is renewed.
1539
+ */
1540
+ RENEWED = "RENEWED",
1541
+ /**
1542
+ * From NEW to ABORTED when user cancels purchase before payment or when payment fails.
1543
+ */
1544
+ ABORTED = "ABORTED",
1545
+ /**
1546
+ * When user manually cancels purchase but still has access to content until expiration date.
1547
+ */
1548
+ CANCELLING = "CANCELLING",
1549
+ /**
1550
+ * From PAID to EXPIRED when payment fails to renew subscription.
1551
+ */
1552
+ EXPIRED = "EXPIRED",
1553
+ /**
1554
+ * From PAID to EXPIRING when a Stargaze purchase has passed its expire date but hasn't been fully expired yet.
1555
+ * Stargaze will try to renew the purchase even after it has expired.
1556
+ */
1557
+ EXPIRING = "EXPIRING"
1558
+ }
1559
+
1560
+ /**
1561
+ * Purchase is a purchase of one video (transaction type) purchase of subscription or voucher.
1562
+ *
1563
+ * @public
1564
+ */
1565
+ declare type PurchaseType = 'transaction' | 'subscription' | 'voucher';
1566
+
1567
+ /**
1568
+ * @public
1569
+ */
1570
+ declare interface ReactableContent {
1571
+ path: string;
1572
+ reactions: {
1573
+ [key in ReactionEnum]?: number;
1574
+ } | null;
1575
+ updateReactionCount: (reaction: ReactionEnum, newCount: number) => void;
1576
+ isFavorite?: boolean;
1577
+ removeFromFavorites?: () => void;
1578
+ addToFavorites?: () => void;
1579
+ }
1580
+
1581
+ /**
1582
+ * @public
1583
+ */
1584
+ declare enum ReactionEnum {
1585
+ LIKE = "LIKE",
1586
+ DISLIKE = "DISLIKE",
1587
+ LOVE = "LOVE",
1588
+ HAHA = "HAHA",
1589
+ WOW = "WOW",
1590
+ SAD = "SAD",
1591
+ ANGRY = "ANGRY",
1592
+ CARE = "CARE",
1593
+ SUPPORT = "SUPPORT",
1594
+ PRAY = "PRAY",
1595
+ THINK = "THINK",
1596
+ CELEBRATE = "CELEBRATE",
1597
+ THANKFUL = "THANKFUL",
1598
+ LAUGH = "LAUGH",
1599
+ INSPIRED = "INSPIRED",
1600
+ AWW = "AWW"
1601
+ }
1602
+
1603
+ /**
1604
+ * @public
1605
+ */
1606
+ declare type ReactNativeDeviceInfo = {
1607
+ type: 'react-native';
1608
+ /**
1609
+ * Type values defined according to {@link OperatingSystem} from `detect-browser` package for convenience.
1610
+ */
1611
+ os?: 'iOS' | 'Android OS';
1612
+ osVersion: string;
1613
+ platform: PLATFORM;
1614
+ isTablet?: boolean;
1615
+ };
1616
+
1617
+ export declare type RemoteBundleState = {
1618
+ state: 'loading' | 'error' | 'ready';
1619
+ error: string | null;
1620
+ conf: InternalConf;
1621
+ settings: Settings;
1622
+ } & Omit<Partial<TivioJsBundleExposedApi>, 'createPlayerWrapper'>;
1623
+
1624
+ export declare type RemoteProviderProps = {
1625
+ language?: string;
1626
+ };
1627
+
1628
+ /**
1629
+ * Conditions that are dynamically applied to screens before they are rendered.
1630
+ * eg. when we want to render an embed only if certain conditions are met.
1631
+ * 'type' indicates type of the condition, eg. 'subscribed'.
1632
+ * 'else' indicates what should happen if the conditions are not met.
1633
+ * 'elseValue' is a payload.
1634
+ */
1635
+ declare interface RenderCondition {
1636
+ type: ScreenConditionType;
1637
+ value?: RenderConditionValue[];
1638
+ else: ScreenConditionElse;
1639
+ elseValue: RenderConditionElseValue[];
1640
+ }
1641
+
1642
+ declare interface RenderConditionElseValue {
1643
+ key: string;
1644
+ value: string;
1645
+ }
1646
+
1647
+ declare interface RenderConditionValue {
1648
+ subscriptionRefs?: any[];
1649
+ }
1650
+
1651
+ /**
1652
+ * @public
1653
+ */
1654
+ declare interface Row {
1655
+ id: string;
1656
+ rowId: string;
1657
+ name: string;
1658
+ description?: string;
1659
+ assets: AssetsField;
1660
+ type: ScreenRowType;
1661
+ isLiveRow: boolean;
1662
+ tiles: PaginationInterface<ItemInRow>;
1663
+ numberOfLines?: number;
1664
+ monetizations?: {
1665
+ monetizationRef: any;
1666
+ }[];
1667
+ rowComponent: RowComponent.ROW | RowComponent.BANNER;
1668
+ itemComponent: RowItemComponent | BannerItemComponent;
1669
+ organizationId?: string;
1670
+ bottomComponent?: BottomComponent;
1671
+ showDescriptionAsTitle?: boolean;
1672
+ }
1673
+
1674
+ /**
1675
+ * @public
1676
+ */
1677
+ declare enum ROW_ITEM_TYPES {
1678
+ APPLICATION = "APPLICATION",
1679
+ VIDEO = "VIDEO",
1680
+ TAG = "TAG",
1681
+ TV_CHANNEL = "TV_CHANNEL",
1682
+ ADVERTISEMENT = "ADVERTISEMENT",
1683
+ ARTICLE = "ARTICLE",
1684
+ SERIES = "SERIES"
1685
+ }
1686
+
1687
+ /**
1688
+ * @public
1689
+ */
1690
+ declare enum RowComponent {
1691
+ ROW = "ROW",
1692
+ BANNER = "BANNER"
1693
+ }
1694
+
1695
+ declare enum RowFilterCollection {
1696
+ VIDEOS = "videos",
1697
+ /**
1698
+ * This is not real collection path. Path always should be ${organizationId}/tags
1699
+ */
1700
+ TAGS = "tags",
1701
+ TV_CHANNELS = "tvChannels",
1702
+ CONTENTS = "contents",
1703
+ APPLICATIONS = "applications"
1704
+ }
1705
+
1706
+ /**
1707
+ * RowFilterField that is used in @tivio/firebase needs to be retyped here.
1708
+ * @public
1709
+ */
1710
+ declare interface RowFilterField {
1711
+ collection: RowFilterCollection;
1712
+ limit?: number;
1713
+ orderBy?: {
1714
+ fieldPath: RowOrderByFieldPath;
1715
+ directionStr?: OrderByDirection;
1716
+ };
1717
+ where?: RowFilterWhereField[];
1718
+ }
1719
+
1720
+ declare interface RowFilterWhereField {
1721
+ fieldPath: RowWhereFilterFieldPath;
1722
+ opStr: WhereFilterOp;
1723
+ value: any;
1724
+ }
1725
+
1726
+ /**
1727
+ * @public
1728
+ */
1729
+ declare interface RowItem extends RowItemAssets {
1730
+ created?: Date;
1731
+ itemType: ROW_ITEM_TYPES;
1732
+ name?: string;
1733
+ description?: string;
1734
+ assets: AssetsField | null;
1735
+ application: RowItemApplicationData | null;
1736
+ feedVisible?: boolean;
1737
+ }
1738
+
1739
+ /**
1740
+ * @public
1741
+ */
1742
+ declare interface RowItemApplicationData {
1743
+ name: string;
1744
+ logo?: string | null;
1745
+ logoLandscape?: string | null;
1746
+ profilePhoto?: string | null;
1747
+ urlHandle: string;
1748
+ organizationId?: string | null;
1749
+ }
1750
+
1751
+ /**
1752
+ * @public
1753
+ */
1754
+ declare interface RowItemAssets {
1755
+ landscape?: string | null;
1756
+ portrait?: string | null;
1757
+ circled?: string | null;
1758
+ square?: string | null;
1759
+ banner?: string | null;
1760
+ bannerMobile?: string | null;
1761
+ }
1762
+
1763
+ /**
1764
+ * @public
1765
+ */
1766
+ declare enum RowItemComponent {
1767
+ ROW_ITEM_PORTRAIT = "ROW_ITEM_PORTRAIT",
1768
+ ROW_ITEM_LANDSCAPE = "ROW_ITEM_LANDSCAPE",
1769
+ ROW_ITEM_SQUARE = "ROW_ITEM_SQUARE",
1770
+ ROW_ITEM_CREATORS_SQUARE = "ROW_ITEM_CREATORS_SQUARE",
1771
+ ROW_ITEM_CREATORS_LANDSCAPE = "ROW_ITEM_CREATORS_LANDSCAPE",
1772
+ ROW_ITEM_CIRCLED = "ROW_ITEM_CIRCLED",
1773
+ ROW_ITEM_HIGHLIGHTED = "ROW_ITEM_HIGHLIGHTED",
1774
+ ROW_ITEM_PLAIN = "ROW_ITEM_PLAIN"
1775
+ }
1776
+
1777
+ /**
1778
+ * RowOrderByFieldPath that is used in @tivio/firebase needs to be retyped here.
1779
+ * @public
1780
+ */
1781
+ declare enum RowOrderByFieldPath {
1782
+ CREATED = "created",
1783
+ DEFAULT_NAME = "defaultName"
1784
+ }
1785
+
1786
+ declare enum RowWhereFilterFieldPath {
1787
+ CREATED = "created",
1788
+ TAGS = "tags",
1789
+ TAG_TYPE_REF = "tagTypeRef",
1790
+ TYPE = "type",
1791
+ CONTENT_TYPE = "contentType",
1792
+ CHANNEL_KEY = "channelKey",
1793
+ PUBLISHED_STATUS = "publishedStatus",
1794
+ ORGANIZATION_REF = "organizationRef",
1795
+ TRANSCODING_STATUS = "transcodingStatus"
1796
+ }
1797
+
1798
+ /**
1799
+ * @public
1800
+ */
1801
+ declare type ScalableAsset = {
1802
+ '@1': Asset;
1803
+ '@2'?: Asset;
1804
+ '@3'?: Asset;
1805
+ };
1806
+
1807
+ /**
1808
+ * @public
1809
+ */
1810
+ declare interface Screen_2 {
1811
+ id: string;
1812
+ name: string | null;
1813
+ description?: string | null;
1814
+ assets: AssetsField;
1815
+ rows: PaginatedResponse<Row>;
1816
+ type?: ScreenType;
1817
+ filter?: RowFilterField | null;
1818
+ embedUrl?: string;
1819
+ screenId: string;
1820
+ renderConditions: RenderCondition[];
1821
+ getRenderCondition: (context: {
1822
+ purchasedSubscriptions: Purchase[];
1823
+ }) => RenderCondition | undefined;
1824
+ applyRenderCondition: (payload: ApplyScreenConditionPayload) => {
1825
+ isSignInRequired?: boolean;
1826
+ isPurchaseRequired?: boolean;
1827
+ embedUrl?: string;
1828
+ };
1829
+ fetchMoreRows: () => Promise<void>;
1830
+ hasNextPage: boolean;
1831
+ refetchIfNeeded: () => Promise<void>;
1832
+ }
1833
+
1834
+ declare enum ScreenConditionElse {
1835
+ SET_QUERY_PARAMS = "setQueryParams",
1836
+ SHOW_PURCHASE_MODAL = "showPurchaseModal"
1837
+ }
1838
+
1839
+ declare enum ScreenConditionType {
1840
+ SUBSCRIBED = "subscribed",
1841
+ SIGNED_IN = "signedIn"
1842
+ }
1843
+
1844
+ /**
1845
+ * @public
1846
+ */
1847
+ declare type ScreenConfig = {
1848
+ id: string;
1849
+ name: string;
1850
+ route?: string;
1851
+ isHiddenFromMenu?: boolean;
1852
+ showForUserProfileType?: {
1853
+ kids: boolean;
1854
+ adults: boolean;
1855
+ };
1856
+ monetizationAccessIds?: string[];
1857
+ };
1858
+
1859
+ /**
1860
+ * @public
1861
+ */
1862
+ declare type ScreenRowType = 'filter' | 'custom' | 'continueToWatch' | 'favourites' | 'topWatched' | 'applications';
1863
+
1864
+ declare enum ScreenType {
1865
+ DEFAULT = "default",
1866
+ GRID = "grid",
1867
+ EMBED = "embed",
1868
+ RECOMMENDATION = "recommendation",
1869
+ FEED = "feed",
1870
+ EPG = "epg"
1871
+ }
1872
+
1873
+ /**
1874
+ * @public
1875
+ */
1876
+ declare interface SeekingMatrix {
1877
+ url: string;
1878
+ x: number;
1879
+ y: number;
1880
+ width: number;
1881
+ height: number;
1882
+ interval: number;
1883
+ timeMs: number;
1884
+ }
1885
+
1886
+ /**
1887
+ * @public
1888
+ */
1889
+ declare interface SeekingMatrixTemplate {
1890
+ pattern: string;
1891
+ width: number;
1892
+ height: number;
1893
+ columns: number;
1894
+ rows: number;
1895
+ interval: number;
1896
+ }
1897
+
1898
+ /**
1899
+ * @public
1900
+ */
1901
+ declare interface SendMessageResponse {
1902
+ conversationId: string;
1903
+ messageId?: string;
1904
+ }
1905
+
1906
+ /**
1907
+ * @public
1908
+ */
1909
+ declare interface Series extends RowItem, MonetizableItem, ReactableContent {
1910
+ id: string;
1911
+ itemType: ROW_ITEM_TYPES.SERIES;
1912
+ cover: string;
1913
+ organizationId?: string;
1914
+ /**
1915
+ * Only used for non migrated series
1916
+ */
1917
+ originalSeriesTagRef?: any;
1918
+ ref: DocumentReference<any>;
1919
+ availableSeasons: AvailableSeason[];
1920
+ actors?: DocumentReference<any>[];
1921
+ linkedContent?: {
1922
+ type: ContentType;
1923
+ contentRef: DocumentReference<any>;
1924
+ }[];
1925
+ seriesDetailArticle?: Article;
1926
+ originalTagId?: string;
1927
+ }
1928
+
1929
+ declare type Settings = {
1930
+ onSetUser: (handler: (userId: string, userPayload: unknown) => void) => void;
1931
+ setUser: (userId: string, userPayload: unknown) => void;
1932
+ };
1933
+
1934
+ /**
1935
+ * @public
1936
+ */
1937
+ declare type Source = TvProgramSource | TivioVodSource | AdSource | OtherSource | LiveTvChannelSource;
1938
+
1939
+ /**
1940
+ * @public
1941
+ */
1942
+ declare type SourceBase = {
1943
+ /**
1944
+ * Tivio SDK users may use pretty complicated source objects in their existing code and if Tivio player
1945
+ * is an interception layer, it should allow them to pass through any type of object.
1946
+ */
1947
+ additionalPayload?: Record<string, any>;
1948
+ /**
1949
+ * Source type.
1950
+ */
1951
+ type: 'ad' | 'live_tv_channel' | 'other' | 'tivio_vod' | 'tv_program';
1952
+ /**
1953
+ * URI to play.
1954
+ */
1955
+ uri: string;
1956
+ };
1957
+
1958
+ /**
1959
+ * Based on this value player will change how the source is played. This, for example, affects whether source:
1960
+ * - will be seekable or not
1961
+ * - duration will be dynamically updated as time goes on
1962
+ * - live button will be shown in ui
1963
+ */
1964
+ declare enum SourcePlayMode {
1965
+ ON_DEMAND = "ON_DEMAND",
1966
+ LIVE = "LIVE",
1967
+ /**
1968
+ * ON_DEMAND and LIVE at the same time.
1969
+ */
1970
+ HYBRID = "HYBRID"
1971
+ }
1972
+
1973
+ /**
1974
+ * @public
1975
+ */
1976
+ declare enum SourceType {
1977
+ ADVERTISEMENT = "ad",
1978
+ CHANNEL = "channel",
1979
+ VOD_TIVIO = "vod_tivio",
1980
+ VOD_EXTERNAL = "vod_external"
1981
+ }
1982
+
1983
+ /**
1984
+ * @public
1985
+ */
1986
+ declare type StartAndContinuePosition = {
1987
+ /**
1988
+ * Relative from stream start, in ms.
1989
+ *
1990
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
1991
+ *
1992
+ * On output from Tivio it is always defined. Tivio can change this value.
1993
+ * (e.g. in order to fix start position of a TV program)
1994
+ */
1995
+ startFromPosition?: number;
1996
+ /**
1997
+ * Relative from stream start, in ms.
1998
+ *
1999
+ * On input to Tivio either `startFromPosition` or `continueFromPosition` must always be provided.
2000
+ *
2001
+ * If provided, tivio will not correct it and will send this value back in startFromPosition.
2002
+ * If provided, startFromPosition is ignored.
2003
+ */
2004
+ continueFromPosition?: number;
2005
+ };
2006
+
2007
+ /**
2008
+ * @public
2009
+ */
2010
+ declare interface StorageManager_2 {
2011
+ getItem(key: string): string | null | Promise<string | null>;
2012
+ setItem(key: string, value: string): void | Promise<void>;
2013
+ removeItem(key: string): void | Promise<void>;
2014
+ }
2015
+
2016
+ /**
2017
+ * @public
2018
+ */
2019
+ declare type SubscribeToItemsInRow = (rowId: string, cb: (error: Error | null, data: PaginationInterface<ItemInRow> | null) => void, options?: SubscribeToItemsInRowOptions, organizationId?: string) => Disposer_2;
2020
+
2021
+ /**
2022
+ * @public
2023
+ */
2024
+ declare type SubscribeToItemsInRowOptions = Partial<{
2025
+ fetchTags: boolean;
2026
+ orderBy?: OrderBy<'defaultName' | DefaultOrderByField>[];
2027
+ where?: WhereFilter[];
2028
+ }> & PaginationOptions;
2029
+
2030
+ /**
2031
+ * @public
2032
+ */
2033
+ declare type SubscribeToRowsInScreen = (screenId: string, cb: (error: Error | null, data: PaginationInterface<Row> | null) => void, options?: PaginationOptions) => Disposer_2;
2034
+
2035
+ /**
2036
+ * @public
2037
+ */
2038
+ declare type SubscribeToTaggedVideos = (tagIds: string[], cb: (error: Error | null, data: PaginationInterface<Video> | null) => void, options?: SubscribeToTaggedVideosOptions, organizationPath?: string) => Disposer_2;
2039
+
2040
+ /**
2041
+ * @public
2042
+ */
2043
+ declare type SubscribeToTaggedVideosOptions = Omit<SubscribeToItemsInRowOptions, 'orderBy'> & {
2044
+ orderBy?: OrderBy<TaggedVideosOrderByField>[];
2045
+ };
2046
+
2047
+ /**
2048
+ * @public
2049
+ */
2050
+ declare interface Tag extends RowItem {
2051
+ id: string;
2052
+ itemType: ROW_ITEM_TYPES.TAG;
2053
+ tagId: string;
2054
+ type?: string | null;
2055
+ metadata?: TagMetadataField[];
2056
+ color?: string;
2057
+ detailBanner?: string;
2058
+ availableSeasons?: AvailableSeason[];
2059
+ isFavorite: boolean;
2060
+ addToFavorites: () => void;
2061
+ removeFromFavorites: () => void;
2062
+ cover: string;
2063
+ getApplicationName: () => string | undefined;
2064
+ seriesRef?: DocumentReference<any>;
2065
+ fetchData: () => Promise<void>;
2066
+ getSeriesEntity: (path: string) => Promise<Series>;
2067
+ ref: DocumentReference<any>;
2068
+ seriesEntity: Series | null;
2069
+ tagType: {
2070
+ tagTypeId: string | null;
2071
+ } | null;
2072
+ initSeries: () => Promise<void>;
2073
+ }
2074
+
2075
+ declare interface TagAvailableSeasonsFieldType extends TagMetadataFieldDefinition {
2076
+ type: TagMetadataFieldType.AVAILABLE_SEASONS;
2077
+ value: AvailableSeasonField[];
2078
+ }
2079
+
2080
+ declare interface TagBooleanFieldType extends TagMetadataFieldDefinition {
2081
+ type: TagMetadataFieldType.BOOLEAN;
2082
+ value: boolean;
2083
+ }
2084
+
2085
+ /**
2086
+ * @public
2087
+ */
2088
+ declare type TaggedVideosOrderByField = 'seasonNumber' | 'episodeNumber' | 'contentType' | DefaultOrderByField;
2089
+
2090
+ declare type TagMetadataField = TagStringFieldType | TagNumberFieldType | TagBooleanFieldType | TagTranslationFieldType | TagAvailableSeasonsFieldType | TagOrganizationRefFieldType;
2091
+
2092
+ declare interface TagMetadataFieldDefinition {
2093
+ key: string;
2094
+ type: TagMetadataFieldType;
2095
+ }
2096
+
2097
+ declare enum TagMetadataFieldType {
2098
+ STRING = "STRING",
2099
+ TRANSLATION = "TRANSLATION",
2100
+ NUMBER = "NUMBER",
2101
+ BOOLEAN = "BOOLEAN",
2102
+ AVAILABLE_SEASONS = "AVAILABLE_SEASONS",
2103
+ ORGANIZATION_REF = "ORGANIZATION_REF"
2104
+ }
2105
+
2106
+ declare interface TagNumberFieldType extends TagMetadataFieldDefinition {
2107
+ type: TagMetadataFieldType.NUMBER;
2108
+ value: number;
2109
+ }
2110
+
2111
+ declare interface TagOrganizationRefFieldType extends TagMetadataFieldDefinition {
2112
+ type: TagMetadataFieldType.ORGANIZATION_REF;
2113
+ value: DocumentReference<any>;
2114
+ }
2115
+
2116
+ declare interface TagStringFieldType extends TagMetadataFieldDefinition {
2117
+ type: TagMetadataFieldType.STRING;
2118
+ value: string;
2119
+ }
2120
+
2121
+ declare interface TagTranslationFieldType extends TagMetadataFieldDefinition {
2122
+ type: TagMetadataFieldType.TRANSLATION;
2123
+ value: Translation;
2124
+ }
2125
+
2126
+ /**
2127
+ * @public
2128
+ */
2129
+ declare interface TivioAuth {
2130
+ /**
2131
+ * @param email
2132
+ * @param password
2133
+ */
2134
+ createUserWithEmailAndPassword: CreateUserWithEmailAndPassword;
2135
+ /**
2136
+ * Sign in the user and starts listening on his purchases
2137
+ * @param email
2138
+ * @param password
2139
+ */
2140
+ signInWithEmailAndPassword: (email: string, password: string) => Promise<string | null>;
2141
+ signInWithCustomToken: (token: string) => Promise<string | null>;
2142
+ signOut: () => Promise<void>;
2143
+ /**
2144
+ * Used for reset forgotten password by user
2145
+ */
2146
+ resetPassword: (email: string) => Promise<void>;
2147
+ }
2148
+
2149
+ export declare type TivioBundle = TivioJsBundle;
2150
+
2151
+ export declare let tivioBundle: RemoteBundleState | null;
2152
+
2153
+ /**
2154
+ * @public
2155
+ */
2156
+ declare interface TivioConfig {
2157
+ /**
2158
+ * Tells Tivio which technologies/protocols etc. is the device capable to play.
2159
+ * If not provided, Tivio will try to guess it (based on the browser).
2160
+ */
2161
+ deviceCapabilities?: PlayerCapability_2[];
2162
+ /**
2163
+ * Additional options for deviceCapabilities
2164
+ */
2165
+ capabilitiesOptions?: {
2166
+ /**
2167
+ * Should the player prefer HTTP sources instead HTTPs if they are available.
2168
+ * This can be used on platforms that support mixed content but do not support
2169
+ * specific HTTPS certificates. (e.g. certificates from Letsencrypt not supported on LG TVs)
2170
+ */
2171
+ preferHttp?: boolean;
2172
+ };
2173
+ secret: string;
2174
+ language: LangCode;
2175
+ debug?: boolean;
2176
+ verbose?: boolean;
2177
+ firebaseApp?: any | null;
2178
+ firebaseFactory?: (config: Object, appName?: string) => firebase.FirebaseApp;
2179
+ authDomainOverride?: string;
2180
+ firestore?: any | null;
2181
+ currency: Currency;
2182
+ applicationId?: string;
2183
+ isTivioProApp?: boolean;
2184
+ lockApplicationHandle?: string;
2185
+ /**
2186
+ * Configuration for GDPR consent collection (CMP)
2187
+ */
2188
+ cmp?: CmpConfig;
2189
+ /**
2190
+ * Device information - model, os, version, etc. This is useful for devices
2191
+ * where this information cannot be reliably auto-detected.
2192
+ */
2193
+ deviceInfo?: DeviceInfo;
2194
+ player?: PlayerConfig;
2195
+ /**
2196
+ * Used for purposes where we need to differentiate organizations before it is known based on secret and data from DB.
2197
+ *
2198
+ * At this time it is necessary only for LG builds because on LG TVs it is needed to separate apps indexedDB storages
2199
+ * (otherwise organizations would share login token).
2200
+ */
2201
+ customerId?: CustomerId;
2202
+ }
2203
+
2204
+ /**
2205
+ * @public
2206
+ */
2207
+ declare type TivioGetters = {
2208
+ isTivioLoaded: (cb: (isLoaded: boolean) => void) => void;
2209
+ isSignedIn: () => boolean;
2210
+ /**
2211
+ * Get (or create) player wrapper instance
2212
+ * @param opt - player getter options
2213
+ * @returns {PlayerWrapper} player wrapper instance
2214
+ */
2215
+ getPlayerWrapper: (opt: {
2216
+ playerWrapperId?: string;
2217
+ }) => PlayerWrapper_2;
2218
+ organization: {
2219
+ /**
2220
+ * Get organization subscriptions
2221
+ * @returns {Promise<Monetization[] | undefined>} organization subscriptions or undefined if organization does not exists
2222
+ */
2223
+ getSubscriptions: () => Promise<Monetization[] | undefined>;
2224
+ };
2225
+ /**
2226
+ * Get video by its id.
2227
+ * @param videoId - video id
2228
+ * @returns {Promise<Video | null>} video or null if video does not exists
2229
+ */
2230
+ getVideoById: (videoId: string) => Promise<Video | null>;
2231
+ /**
2232
+ * Get screen by its id.
2233
+ * @param screenId - screen id
2234
+ * @returns {Promise<Screen | null>} screen or null if screen does not exists
2235
+ */
2236
+ getScreenById: (screenId: string, cb?: (error: Error | null, data: Screen_2 | null, disposer?: Disposer_2) => void) => Promise<Screen_2 | null>;
2237
+ /**
2238
+ * Get player capabilities based on user's browser and OS as resolved by Tivio.
2239
+ * @returns PlayerCapability[]
2240
+ */
2241
+ getPlayerCapabilities: () => PlayerCapability_2[];
2242
+ };
2243
+
2244
+ /**
2245
+ * @internal
2246
+ */
2247
+ declare type TivioJsBundle = TivioJsBundleExposedApi & {
2248
+ init: (config: TivioConfig) => void | Promise<void>;
2249
+ tivio: any;
2250
+ };
2251
+
2252
+ /**
2253
+ * @public
2254
+ */
2255
+ declare type TivioJsBundleExposedApi = {
2256
+ AdSource: any;
2257
+ ChannelSource: any;
2258
+ VodTivioSource: any;
2259
+ /**
2260
+ * Get (or create) player wrapper instance
2261
+ * @param id - player wrapper id
2262
+ * @returns {Player} player wrapper instance
2263
+ */
2264
+ getPlayerWrapper: (id: string) => Player;
2265
+ /**
2266
+ * Get tv channel by its id.
2267
+ * @param tvChannelId - tv channel id
2268
+ * @returns {Promise<TvChannel | null>} channel or null if tv channel does not exists
2269
+ */
2270
+ getTvChannelById: (tvChannelId: string) => Promise<TvChannel | null>;
2271
+ /**
2272
+ * Get tag by its id.
2273
+ * @param tagId - tag id
2274
+ * @returns {Promise<Tag | null>} widget or null if tag does not exists
2275
+ */
2276
+ getTagById: (tagId: string) => Promise<Tag | null>;
2277
+ createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
2278
+ destroy: () => Promise<void>;
2279
+ } & Pick<TivioGetters, 'getVideoById' | 'getScreenById' | 'organization'> & Pick<TivioSubscriptions, 'subscribeToVideo' | 'subscribeToItemsInRow' | 'subscribeToRowsInScreen'> & Pick<TivioAuth, 'createUserWithEmailAndPassword' | 'signInWithEmailAndPassword'> & Pick<TivioSetters, 'setBundleVersion' | 'setUser' | 'setLanguage' | 'setStorageManager'>;
2280
+
2281
+ /**
2282
+ * @public
2283
+ */
2284
+ declare interface TivioPlayerWrapper {
2285
+ addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
2286
+ reportError: (error: Error) => void;
2287
+ reportPlaybackEnded: () => void;
2288
+ reportTimeProgress: (ms: number) => void;
2289
+ seekTo: (ms: number) => void;
2290
+ /**
2291
+ * @param {Source} source - source to set
2292
+ * @param {string} calibrationId - id of calibration profile
2293
+ */
2294
+ setSource: (source: Source | null, calibrationId?: string) => void;
2295
+ }
2296
+
2297
+ /**
2298
+ * @public
2299
+ */
2300
+ declare type TivioSetters = {
2301
+ setBundleVersion: (bundleVersion: string | null) => void;
2302
+ /**
2303
+ * Set tivio language.
2304
+ * @param language
2305
+ */
2306
+ setLanguage: (language: LangCode) => void;
2307
+ setStorageManager: (storageManager: StorageManager_2) => void;
2308
+ setUser: (userId: string | null, userPayload?: UserPayload) => Promise<void>;
2309
+ };
2310
+
2311
+ /**
2312
+ * @public
2313
+ */
2314
+ declare type TivioSubscriptions = {
2315
+ subscribeToUser: (cb: (error: string | null, user: User | null) => void) => void;
2316
+ /**
2317
+ * Listen to video changes.
2318
+ * @param videoId - video id
2319
+ * @param cb - callback on video updates or on error
2320
+ */
2321
+ subscribeToVideo: (videoId: string, cb: (error: Error | null, data: Video | null, disposer?: Disposer_2) => void) => void;
2322
+ subscribeToItemsInRow: SubscribeToItemsInRow;
2323
+ subscribeToRowsInScreen: SubscribeToRowsInScreen;
2324
+ subscribeToTaggedVideos: SubscribeToTaggedVideos;
2325
+ registerOverlayCallbacks: (callbacks: {
2326
+ onShow: () => void;
2327
+ onHide: () => void;
2328
+ }) => void;
2329
+ };
2330
+
2331
+ /**
2332
+ * @public
2333
+ */
2334
+ declare type TivioVodSource = SourceBase & StartAndContinuePosition & {
2335
+ type: 'tivio_vod';
2336
+ /**
2337
+ * Allows Tivio to load monetization config an apply ads.
2338
+ */
2339
+ videoPath: string;
2340
+ };
2341
+
2342
+ declare interface TokenInterface {
2343
+ token: string;
2344
+ expirationDate: Date;
2345
+ type: TokenType;
2346
+ active: boolean;
2347
+ }
2348
+
2349
+ declare type TokenType = 'rss';
2350
+
2351
+ /**
2352
+ * @public
2353
+ * Video track
2354
+ */
2355
+ declare interface Track {
2356
+ id: number;
2357
+ /**
2358
+ * e.g. 480, 720, 1080
2359
+ */
2360
+ height: number;
2361
+ width: number;
2362
+ active: boolean;
2363
+ language: LangCode;
2364
+ }
2365
+
2366
+ /**
2367
+ * Represents one string in every supported language mutation.
2368
+ * @public
2369
+ */
2370
+ declare type Translation = {
2371
+ [key in LangCode]?: string;
2372
+ };
2373
+
2374
+ /**
2375
+ * @public
2376
+ */
2377
+ declare interface TvChannel extends RowItem {
2378
+ id: string;
2379
+ itemType: ROW_ITEM_TYPES.TV_CHANNEL;
2380
+ name: string;
2381
+ path: string;
2382
+ country?: string;
2383
+ filters: string[];
2384
+ logo?: string;
2385
+ logoPendingOverlayWidth?: string;
2386
+ hls: string;
2387
+ dash: string;
2388
+ /**
2389
+ * Returns all transactions and subscriptions applied to this tv channel.
2390
+ * Transactions before subscriptions, sorted by price ascending.
2391
+ */
2392
+ getPurchasableMonetizations(options?: GetPurchasableMonetizationsOptions): PurchasableMonetization[];
2393
+ getSourceUrl(options?: {
2394
+ language?: LangCode;
2395
+ }): Promise<GetSourceUrlResponse & {
2396
+ language?: LangCode;
2397
+ }>;
2398
+ purchasableMonetization: any | null;
2399
+ price: number;
2400
+ cover: string;
2401
+ isPlayable: boolean;
2402
+ url: string;
2403
+ type?: TvChannelType;
2404
+ }
2405
+
2406
+ declare enum TvChannelType {
2407
+ /**
2408
+ * Classic live tv channel
2409
+ */
2410
+ CLASSIC = "CLASSIC",
2411
+ /**
2412
+ * "Virtual" tv channel constructed from separate videos
2413
+ */
2414
+ VIRTUAL = "VIRTUAL"
2415
+ }
2416
+
2417
+ /**
2418
+ * @public
2419
+ */
2420
+ declare type TvMode = 'startover' | 'timeshift';
2421
+
2422
+ declare interface TvProgram {
2423
+ id: string;
2424
+ from: Date | null;
2425
+ to: Date | null;
2426
+ name: string;
2427
+ description: string;
2428
+ url: string;
2429
+ image: string;
2430
+ landscape?: string | null;
2431
+ video: Video | null;
2432
+ tvChannelRef?: any;
2433
+ loadVideo?: () => Promise<void>;
2434
+ }
2435
+
2436
+ /**
2437
+ * @public
2438
+ */
2439
+ declare type TvProgramSource = SourceBase & StartAndContinuePosition & {
2440
+ type: 'tv_program';
2441
+ /**
2442
+ * If epgTo is wrong, Tivio cannot correctly guess if the video it startover or timeshift . For such cases
2443
+ * Tivio needs explicit tv mode.
2444
+ * null if source begins in the future.
2445
+ */
2446
+ tvMode: 'startover' | 'timeshift' | null;
2447
+ /**
2448
+ * Tivio needs channel name in order to load markers.
2449
+ */
2450
+ channelName: string;
2451
+ /**
2452
+ * Tivio needs EPG from in order to load markers.
2453
+ */
2454
+ epgFrom: Date;
2455
+ /**
2456
+ * Tivio needs EPG to in order to load markers.
2457
+ */
2458
+ epgTo: Date;
2459
+ /**
2460
+ * When the stream (provided in uri) really starts - typically few minutes before epgFrom.
2461
+ */
2462
+ streamStart: Date;
2463
+ };
2464
+
2465
+ /**
2466
+ * @public
2467
+ */
2468
+ declare type User = {
2469
+ /**
2470
+ * Unique id of the corresponding user document.
2471
+ */
2472
+ id: string;
2473
+ /**
2474
+ * Returns "active" (non-expired) purchases so they give access to some content.
2475
+ * Does not return voucher purchases because they give access to videos/subscriptions only for user who activates voucher
2476
+ * not for user who purchases it.
2477
+ */
2478
+ purchases: Purchase[];
2479
+ /**
2480
+ * Returns all PAID or CANCELLED user purchases (expired and non-expired)
2481
+ */
2482
+ allPurchases: Purchase[];
2483
+ availablePromotionsIds: string[];
2484
+ /**
2485
+ * Returns "active" (not CANCELLED) VoD purchases ("transaction" type)
2486
+ */
2487
+ purchasedVods: Purchase[];
2488
+ /**
2489
+ * Returns "active" (non-expired) subscription purchases
2490
+ */
2491
+ purchasedSubscriptions: Purchase[];
2492
+ /**
2493
+ * Returns last expired subscription which user can renew or undefined
2494
+ */
2495
+ extendableSubscription?: Purchase;
2496
+ getPurchasedVideos: () => unknown[];
2497
+ getOneTimePurchases: () => Purchase[];
2498
+ isPurchasesInitialized: boolean;
2499
+ isSignedIn: boolean;
2500
+ isReady: boolean;
2501
+ email?: string;
2502
+ type?: UserType;
2503
+ photoURL: string | null;
2504
+ name?: string;
2505
+ /**
2506
+ * Authentication id differs from {@link id}.
2507
+ */
2508
+ authUserId?: string;
2509
+ favorites: any[];
2510
+ watchedPositions: any[];
2511
+ watchHistory: any[];
2512
+ profiles: any[];
2513
+ activeUserProfileId: string | null;
2514
+ patreon?: PatreonUserAuth;
2515
+ subscriptionIdsToShow: string[] | null;
2516
+ followedOrganizationIds: string[];
2517
+ isAnonymous: boolean;
2518
+ isDiscordConnected: boolean;
2519
+ disconnectDiscord: () => Promise<void>;
2520
+ createUserProfile: (request: any) => Promise<void>;
2521
+ deleteUserProfile: (profileId: string) => Promise<void>;
2522
+ setActiveUserProfileId: (id: string) => void;
2523
+ getFollowedOrganizations: () => Promise<Array<FollowedOrganizationData | undefined>>;
2524
+ sendFinalizeRegistrationEmail: (email: string) => Promise<void>;
2525
+ isUserAlreadyRegisteredByTenant: (email: string) => Promise<boolean>;
2526
+ getAllExtendableSubscriptions: () => Promise<Purchase[]>;
2527
+ getRssValidToken: () => Promise<TokenInterface | undefined>;
2528
+ getRssUrl: () => Promise<GetUserRssUrlResponse>;
2529
+ invalidateAllTokens: (type: TokenType) => Promise<void>;
2530
+ isPartiallyRegistered: boolean;
2531
+ conversationStore: ConversationStore;
2532
+ };
2533
+
2534
+ /**
2535
+ * @public
2536
+ */
2537
+ declare type UserPayload = Record<string, any>;
2538
+
2539
+ /**
2540
+ * @public
2541
+ */
2542
+ declare enum UserType {
2543
+ ORGANIZATION_USER = "ORGANIZATION_USER",
2544
+ TIVIO_USER = "TIVIO_USER"
2545
+ }
2546
+
2547
+ /**
2548
+ * @public
2549
+ * null - classic VAST
2550
+ * VPAID - VAST with VPAID extension
2551
+ * others...
2552
+ */
2553
+ declare type VastApiFramework = string | 'VPAID' | null;
2554
+
2555
+ /**
2556
+ * @public
2557
+ */
2558
+ declare enum VastProvider {
2559
+ CNC_PREBID = "cnc-prebid",
2560
+ CNC_STARGAZE_PREROLL_1 = "cnc-stargaze-preroll-1",
2561
+ CNC_STARGAZE_PREROLL_2 = "cnc-stargaze-preroll-2",
2562
+ CNC_STARGAZE_MIDROLL = "cnc-stargaze-midroll",
2563
+ ETARGET_PREBID = "etarget-prebid",
2564
+ FALLBACK_HLS = "fallback-hls",
2565
+ FALLBACK_MP4 = "fallback",
2566
+ GARAZ_TV = "garaz.tv",
2567
+ GARAZ_TV_DEV = "garaz.tv.dev",
2568
+ IMPRESSION_MEDIA_PREBID = "impressionMedia-prebid",
2569
+ JOJ_ADFORM = "joj",
2570
+ JOJ_SMART = "joj-smart",
2571
+ JOJ_AD_MANAGER_VOD_PREROLL = "joj-ad-manager-vod-preroll",
2572
+ JOJ_AD_MANAGER_VOD_MIDROLL = "joj-ad-manager-vod-midroll",
2573
+ JOJ_AD_MANAGER_LIVE_PREROLL = "joj-ad-manager-live-preroll",
2574
+ MALL_TV = "malltv",
2575
+ MALL_TV_PREBID = "malltv-prebid",
2576
+ PRIMA = "prima",
2577
+ TEST = "test",
2578
+ TEST_VPAID = "test-vpaid",
2579
+ TIVIO_ADS = "tivio-ads",
2580
+ JOJ_TEST_AD_FORM_PROGRAMMATIC = "joj-test-ad-form-programmatic",
2581
+ JOJ_TEST_TESTER_VASTERIX = "joj-test-tester-vasterix",
2582
+ JOJ_TEST_TESTER_ADFORM_30 = "joj-test-tester-adform-30"
2583
+ }
2584
+
2585
+ /**
2586
+ * @public
2587
+ */
2588
+ declare interface Video extends RowItem, MonetizableItem, ReactableContent {
2589
+ id: string;
2590
+ itemType: ROW_ITEM_TYPES.VIDEO;
2591
+ /**
2592
+ * @deprecated use assets instead
2593
+ */
2594
+ cover: string | null;
2595
+ sectionId: string | null;
2596
+ channelId: string | null;
2597
+ duration: number;
2598
+ path: string;
2599
+ tags: Tag[];
2600
+ image: string | null;
2601
+ isPlayable: boolean;
2602
+ monetizations: Monetization[];
2603
+ getSourceUrl(options?: {
2604
+ language?: LangCode;
2605
+ }): Promise<GetSourceUrlResponse & {
2606
+ language?: LangCode;
2607
+ }>;
2608
+ getSeekingMatrixPreviewByTime(timeMs: number, offsetIndex?: number): SeekingMatrix | null;
2609
+ purchasableMonetization: any | null;
2610
+ transaction: PurchasableMonetization | undefined;
2611
+ subscriptions: PurchasableMonetization[];
2612
+ sources?: any[];
2613
+ allSources?: any[];
2614
+ isPlaylist: boolean;
2615
+ name: string;
2616
+ urlNames?: string[];
2617
+ urlName?: string;
2618
+ price: number | null;
2619
+ detailedPrice: DetailedPrice | null;
2620
+ url: string;
2621
+ adMonetizationId?: string;
2622
+ from?: Date;
2623
+ to?: Date;
2624
+ detailBanner?: string;
2625
+ descriptionRich?: string;
2626
+ organizationId?: string;
2627
+ linkedVideosRaw: LinkedVideoRaw[] | undefined;
2628
+ linkedVideos: LinkedVideo[] | undefined;
2629
+ pipPaths?: string[];
2630
+ contentType: VideoContentType | null;
2631
+ year?: number;
2632
+ episodeNumber?: number;
2633
+ seasonNumber?: number;
2634
+ getTagsOfType: (type: string) => Tag[];
2635
+ geoBlocking: GeoBlocking | undefined;
2636
+ loadLinkedVideos: () => any;
2637
+ getLinkedVideos: (type: any) => any;
2638
+ trailer: Video | null;
2639
+ teaser: Video | null;
2640
+ hasTasting: boolean;
2641
+ isTastingValid: () => boolean;
2642
+ tasting: Video | null;
2643
+ watchPosition: number | null;
2644
+ isFavorite: boolean;
2645
+ addToFavorites: () => void;
2646
+ removeFromFavorites: () => void;
2647
+ availability: ContentAvailability | null;
2648
+ sourceLanguages: LangCode[];
2649
+ urlByLanguage: (lang: LangCode) => string | undefined;
2650
+ getApplicationName: () => string | undefined;
2651
+ getApplicationLogo: () => string | undefined;
2652
+ setApplicationData: (applicationData: RowItemApplicationData) => void;
2653
+ linkedVideosInNotLoaded: () => boolean | undefined;
2654
+ initApplication: () => Promise<void>;
2655
+ init: () => Promise<void>;
2656
+ progress?: number;
2657
+ backgroundBlurBannerMobile?: string | null;
2658
+ isWatched?: boolean;
2659
+ pgRating?: string;
2660
+ contentDescriptors?: string[];
2661
+ publishedStatus?: PublishedStatus;
2662
+ }
2663
+
2664
+ /**
2665
+ * @public
2666
+ */
2667
+ declare enum VideoContentType {
2668
+ /**
2669
+ * Default video content type
2670
+ */
2671
+ VIDEO = "VIDEO",
2672
+ FILM = "FILM",
2673
+ SERIES = "SERIES"
2674
+ }
2675
+
2676
+ declare enum VideoSourceCodec {
2677
+ H264 = "h264",
2678
+ H265 = "h265",
2679
+ MPEG_2 = "MPEG-2"
2680
+ }
2681
+
2682
+ declare enum VideoSourceEncryption {
2683
+ NONE = "none",
2684
+ WIDEVINE = "widevine",
2685
+ FAIRPLAY = "fairplay",
2686
+ PLAYREADY = "playready"
2687
+ }
2688
+
2689
+ declare enum VideoSourceProtocol {
2690
+ HLS = "hls",
2691
+ DASH = "dash",
2692
+ MP4 = "mp4",
2693
+ MP3 = "mp3"
2694
+ }
2695
+
2696
+ /**
2697
+ * @public
2698
+ */
2699
+ declare interface VirtualChannelSourceInterface extends ChannelSourceInterface {
2700
+ tvChannelType: TvChannelType.VIRTUAL;
2701
+ program?: TvProgram | null;
2702
+ video?: Video | null;
2703
+ clone(params?: Partial<VirtualChannelSourceParams>): VirtualChannelSourceInterface;
2704
+ initializeNext(): Promise<void>;
2705
+ }
2706
+
2707
+ /**
2708
+ * @public
2709
+ */
2710
+ declare interface VirtualChannelSourceParams extends ChannelSourceParams {
2711
+ tvChannelType: TvChannelType.VIRTUAL;
2712
+ currentProgram?: TvProgram | null;
2713
+ drm?: Drm;
2714
+ }
2715
+
2716
+ /**
2717
+ * @public
2718
+ */
2719
+ declare interface VodExternalSourceInterface extends PlayerSourceInterface<SourceType.VOD_EXTERNAL> {
2720
+ monetizationId?: string;
2721
+ originalOptions: Record<string, any>;
2722
+ poster: string | null;
2723
+ }
2724
+
2725
+ /**
2726
+ * @public
2727
+ */
2728
+ declare interface VodTivioSourceInterface extends PlayerSourceInterface<SourceType.VOD_TIVIO> {
2729
+ /**
2730
+ * e.g. 259ud0fgdf4
2731
+ */
2732
+ adMonetizationId?: string;
2733
+ /**
2734
+ * e.g. videos/1532543
2735
+ */
2736
+ videoPath: string;
2737
+ poster: string | null;
2738
+ /**
2739
+ * Position to continue playing from in milliseconds
2740
+ */
2741
+ continuePositionMs?: ContinuePosition;
2742
+ /**
2743
+ * Drm configuration
2744
+ */
2745
+ drm?: Drm;
2746
+ watermark: Watermark | null;
2747
+ canWatchOnDevice: boolean;
2748
+ isAvailable: boolean;
2749
+ availability: ContentAvailability | null;
2750
+ video: Video;
2751
+ clone: (params?: Partial<VodTivioSourceParams>) => VodTivioSourceInterface;
2752
+ }
2753
+
2754
+ /**
2755
+ * @public
2756
+ */
2757
+ declare interface VodTivioSourceParams extends PlayerSourceParams<SourceType.VOD_TIVIO> {
2758
+ videoPath: string;
2759
+ adMonetizationId?: string;
2760
+ language?: LangCode;
2761
+ drm?: Drm;
2762
+ ignoreWatchPosition?: boolean;
2763
+ }
2764
+
2765
+ /**
2766
+ * @public
2767
+ */
2768
+ declare interface Watermark {
2769
+ caption: string;
2770
+ size: 'large' | 'medium';
2771
+ }
2772
+
2773
+ /**
2774
+ * @public
2775
+ */
2776
+ declare interface WhereFilter {
2777
+ field: string;
2778
+ operator: WhereFilterOp;
2779
+ value: any;
2780
+ }
2781
+
2782
+ declare type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
2783
+
2784
+ export { }