@tivio/sdk-react 3.5.2 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +6 -3
- package/README.md.bak +6 -3
- package/dist/index.d.ts +1729 -21
- package/dist/index.js +1 -2
- package/package.json +10 -7
- package/dist/components/ContextProvider.d.ts +0 -7
- package/dist/components/PlayerProvider.d.ts +0 -19
- package/dist/components/TivioProvider.d.ts +0 -16
- package/dist/components/TivioWidget.d.ts +0 -7
- package/dist/components/TivioWidgetError.d.ts +0 -10
- package/dist/components/TivioWidgetLoader.d.ts +0 -6
- package/dist/components/TvTivioProvider.d.ts +0 -7
- package/dist/components/context/ChannelsContext.d.ts +0 -6
- package/dist/components/context/RowItemsContext.d.ts +0 -7
- package/dist/components/context/ScreensContext.d.ts +0 -6
- package/dist/components/context/SectionsContext.d.ts +0 -6
- package/dist/components/context/VideosContext.d.ts +0 -6
- package/dist/components/context/index.d.ts +0 -5
- package/dist/components/context/types.d.ts +0 -27
- package/dist/components/hooks/contentHooks.d.ts +0 -68
- package/dist/components/hooks/index.d.ts +0 -22
- package/dist/components/hooks/playerHooks.d.ts +0 -28
- package/dist/components/hooks/useApplyInviteCode.d.ts +0 -17
- package/dist/components/hooks/useCancelSubscription.d.ts +0 -2
- package/dist/components/hooks/useError.d.ts +0 -9
- package/dist/components/hooks/useFreePurchase.d.ts +0 -4
- package/dist/components/hooks/useIsMonetizationPurchased.d.ts +0 -3
- package/dist/components/hooks/useItemsInRow.d.ts +0 -11
- package/dist/components/hooks/useLastVideoByWidgetId.d.ts +0 -5
- package/dist/components/hooks/useOrganizationSubscriptions.d.ts +0 -3
- package/dist/components/hooks/usePurchaseRecovery.d.ts +0 -14
- package/dist/components/hooks/usePurchaseSubscription.d.ts +0 -4
- package/dist/components/hooks/usePurchasesWithVideos.d.ts +0 -7
- package/dist/components/hooks/useRowsInScreen.d.ts +0 -6
- package/dist/components/hooks/useScreen.d.ts +0 -10
- package/dist/components/hooks/useScreens.d.ts +0 -5
- package/dist/components/hooks/useSearch.d.ts +0 -8
- package/dist/components/hooks/useTaggedVideos.d.ts +0 -11
- package/dist/components/hooks/useTivio.d.ts +0 -3
- package/dist/components/hooks/useTransactionPayment.d.ts +0 -5
- package/dist/components/hooks/useUser.d.ts +0 -5
- package/dist/components/hooks/useVoucher.d.ts +0 -42
- package/dist/components/hooks/useWatchWithoutAdsOffer.d.ts +0 -4
- package/dist/config.d.ts +0 -20
- package/dist/index.js.LICENSE.txt +0 -335
- package/dist/info.d.ts +0 -2
- package/dist/services/bundleLoader.d.ts +0 -15
- package/dist/services/bundlePromise.d.ts +0 -7
- package/dist/services/dependencyResolver.d.ts +0 -24
- package/dist/services/gdpr.d.ts +0 -1
- package/dist/services/localFetch/coreReactDomDist.d.ts +0 -1
- package/dist/services/localFetch/none.d.ts +0 -1
- package/dist/services/logger.d.ts +0 -26
- package/dist/services/login.d.ts +0 -9
- package/dist/services/packageLoader.d.ts +0 -6
- package/dist/services/pubSub.d.ts +0 -13
- package/dist/services/sentry.d.ts +0 -4
- package/dist/services/settings.d.ts +0 -13
- package/dist/types/bundle.types.d.ts +0 -444
- package/dist/types/common.d.ts +0 -6
- package/dist/types/config.types.d.ts +0 -0
- package/dist/types/customPlayer.types.d.ts +0 -171
- package/dist/types/types.d.ts +0 -174
package/dist/types/types.d.ts
DELETED
@@ -1,174 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
|
3
|
-
* nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* Export public client side API
|
7
|
-
*/
|
8
|
-
import type { Monetization, Video, User } from '@tivio/common';
|
9
|
-
import type React from 'react';
|
10
|
-
declare type RemoteProviderProps = {
|
11
|
-
disableUnmounting?: boolean;
|
12
|
-
language?: string;
|
13
|
-
};
|
14
|
-
declare enum LangCode {
|
15
|
-
CS = "cs",
|
16
|
-
DE = "de",
|
17
|
-
EN = "en",
|
18
|
-
FR = "fr",
|
19
|
-
PL = "pl",
|
20
|
-
SK = "sk",
|
21
|
-
SP = "sp"
|
22
|
-
}
|
23
|
-
declare type Widget = {
|
24
|
-
id: string;
|
25
|
-
channels: Channel[];
|
26
|
-
isEnabled: boolean | null;
|
27
|
-
name: string | null;
|
28
|
-
recentVideos: Video[] | null;
|
29
|
-
widgetId: string | null;
|
30
|
-
lastVideo: Video | null;
|
31
|
-
};
|
32
|
-
declare type Channel = {
|
33
|
-
id: string;
|
34
|
-
name: string;
|
35
|
-
header: string;
|
36
|
-
headerLogo: string;
|
37
|
-
recentVideos: Video[];
|
38
|
-
};
|
39
|
-
declare type Section = {
|
40
|
-
id: string;
|
41
|
-
name: string;
|
42
|
-
channel: Channel;
|
43
|
-
videos: Video[];
|
44
|
-
};
|
45
|
-
declare type Chapter = any;
|
46
|
-
declare type Purchase = {
|
47
|
-
isPurchased: boolean;
|
48
|
-
monetizationId: string;
|
49
|
-
videoId: string;
|
50
|
-
status: string;
|
51
|
-
video: Video | null;
|
52
|
-
};
|
53
|
-
declare type Marker = {
|
54
|
-
id: string;
|
55
|
-
type: string;
|
56
|
-
from: Date;
|
57
|
-
to: Date;
|
58
|
-
count?: number;
|
59
|
-
fromMs?: number;
|
60
|
-
toMs?: number;
|
61
|
-
};
|
62
|
-
declare type BetOffer = {
|
63
|
-
betService: string;
|
64
|
-
league: string;
|
65
|
-
odds: {
|
66
|
-
winner: string;
|
67
|
-
rate: number;
|
68
|
-
}[];
|
69
|
-
sport: string;
|
70
|
-
opponent1: string;
|
71
|
-
opponent2: string;
|
72
|
-
time: Date;
|
73
|
-
};
|
74
|
-
export interface TivioWidgetProps {
|
75
|
-
id: string;
|
76
|
-
ref: React.MutableRefObject<TivioWidgetRef>;
|
77
|
-
onEnabled?: (enabled: boolean) => any;
|
78
|
-
onBlur?: (event: {
|
79
|
-
key: string;
|
80
|
-
width: number;
|
81
|
-
x: number;
|
82
|
-
}) => any;
|
83
|
-
}
|
84
|
-
export interface TivioWidgetRef {
|
85
|
-
focus: (args: {
|
86
|
-
x?: number;
|
87
|
-
}) => void;
|
88
|
-
handleKey: (key: string) => ({
|
89
|
-
handled: boolean;
|
90
|
-
x: number;
|
91
|
-
});
|
92
|
-
unfocus: () => ({
|
93
|
-
x: number;
|
94
|
-
});
|
95
|
-
}
|
96
|
-
interface VodTivioSourcePojo {
|
97
|
-
type: 'VodTivioSource';
|
98
|
-
description: string;
|
99
|
-
path: string;
|
100
|
-
name: string;
|
101
|
-
uri: string;
|
102
|
-
poster?: string;
|
103
|
-
adMonetizationId?: string;
|
104
|
-
}
|
105
|
-
interface ChannelSourcePojo {
|
106
|
-
type: 'ChannelSource';
|
107
|
-
uri: string;
|
108
|
-
originalOptions: any;
|
109
|
-
channelName: string;
|
110
|
-
programName: string;
|
111
|
-
programDescription: string;
|
112
|
-
from: Date;
|
113
|
-
to: Date;
|
114
|
-
poster?: string;
|
115
|
-
}
|
116
|
-
declare type VideoPath = string;
|
117
|
-
interface WebPlayerProps {
|
118
|
-
id: string;
|
119
|
-
source?: VodTivioSourcePojo | ChannelSourcePojo | VideoPath | null;
|
120
|
-
onEnded?: () => any;
|
121
|
-
/**
|
122
|
-
* If this function is specified, then "Back" button is shown in top right corner.
|
123
|
-
*/
|
124
|
-
onBack?: () => void;
|
125
|
-
className?: string;
|
126
|
-
/**
|
127
|
-
* default false
|
128
|
-
*
|
129
|
-
* If you choose `autoplay` make sure that autoplay is allowed in the specific situation.
|
130
|
-
* In some cases it may not be allowed, e.g. before the user interacted with the site, and the video
|
131
|
-
* will stay paused.
|
132
|
-
*
|
133
|
-
* Source: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide
|
134
|
-
*/
|
135
|
-
autoplay?: boolean;
|
136
|
-
/**
|
137
|
-
* default false
|
138
|
-
*/
|
139
|
-
canReplay?: boolean;
|
140
|
-
/**
|
141
|
-
* default false
|
142
|
-
*/
|
143
|
-
showMarkers?: boolean;
|
144
|
-
/**
|
145
|
-
* number[] is array of keyboard event.which numeric codes
|
146
|
-
* (see https://keycode.info/)
|
147
|
-
*/
|
148
|
-
customShortcuts?: Partial<{
|
149
|
-
toggleFullscreen: number[];
|
150
|
-
togglePause: number[];
|
151
|
-
toggleMute: number[];
|
152
|
-
jumpForward: number[];
|
153
|
-
jumpBack: number[];
|
154
|
-
volumeUp: number[];
|
155
|
-
volumeDown: number[];
|
156
|
-
}>;
|
157
|
-
/**
|
158
|
-
* default true
|
159
|
-
*/
|
160
|
-
enableKeyboardShortcuts?: boolean;
|
161
|
-
onProgress?: (event: React.ChangeEvent<HTMLVideoElement>) => void;
|
162
|
-
/**
|
163
|
-
* @deprecated this callback is never called. Will be removed in @tivio/sdk-react version 4
|
164
|
-
*/
|
165
|
-
onPlayerControllerCreated?: (playerController: any) => void;
|
166
|
-
}
|
167
|
-
declare type TivioSources = {
|
168
|
-
AdSource: any;
|
169
|
-
ChannelSource: any;
|
170
|
-
VodExternalSource: any;
|
171
|
-
VodTivioSource: any;
|
172
|
-
};
|
173
|
-
export type { RemoteProviderProps, WebPlayerProps, Marker, BetOffer, Purchase, Chapter, Widget, Channel, Section, Video, TivioSources, User, Monetization, VodTivioSourcePojo, ChannelSourcePojo, };
|
174
|
-
export { LangCode };
|