@tivio/sdk-react 3.3.1 → 3.5.0

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