@devix-technologies/react-gjirafa-vp-player 1.0.0 → 1.0.1

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.
Files changed (43) hide show
  1. package/dist/App.d.ts +2 -0
  2. package/dist/components/Feedback.d.ts +25 -0
  3. package/dist/components/VPPlayer/index.d.ts +2 -0
  4. package/dist/components/VPPlayer/ui/index.d.ts +1 -0
  5. package/dist/components/VPPlayer/ui/styled.d.ts +42 -0
  6. package/dist/config/index.d.ts +1 -0
  7. package/dist/config/vpPlayerConfig.d.ts +9 -0
  8. package/dist/constants/configs.d.ts +22 -0
  9. package/dist/constants/index.d.ts +1 -0
  10. package/dist/constants/storybook.d.ts +11 -0
  11. package/dist/constants/styles.d.ts +11 -0
  12. package/dist/constants/urls.d.ts +18 -0
  13. package/dist/constants/vpPlayer.d.ts +29 -0
  14. package/dist/contexts/VPPlayerContext.d.ts +53 -0
  15. package/dist/contexts/index.d.ts +1 -0
  16. package/dist/features/VPPlayer.d.ts +27 -0
  17. package/dist/features/stories/ads/Ads.stories.d.ts +13 -0
  18. package/dist/features/stories/context/Context.stories.d.ts +10 -0
  19. package/dist/features/stories/index.d.ts +3 -0
  20. package/dist/features/stories/playback/Playback.stories.d.ts +15 -0
  21. package/dist/fixtures/index.d.ts +1 -0
  22. package/dist/fixtures/playlist.d.ts +11 -0
  23. package/dist/hooks/index.d.ts +3 -0
  24. package/dist/hooks/useVPPlayerLogic.d.ts +16 -0
  25. package/dist/hooks/useVPPlayerScript.d.ts +13 -0
  26. package/dist/hooks/useVideoData.d.ts +21 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/interfaces/config.d.ts +303 -0
  29. package/dist/interfaces/index.d.ts +3 -0
  30. package/dist/interfaces/instance.d.ts +11 -0
  31. package/dist/interfaces/props.d.ts +54 -0
  32. package/dist/main.d.ts +1 -0
  33. package/dist/react-gjirafa-vp-player.es.js +1840 -0
  34. package/dist/react-gjirafa-vp-player.umd.js +84 -0
  35. package/dist/types/api.types.d.ts +50 -0
  36. package/dist/types/index.d.ts +1 -0
  37. package/dist/utils/index.d.ts +2 -0
  38. package/dist/utils/vpPlayerConfigBuilder.d.ts +29 -0
  39. package/dist/utils/vpPlayerUtils.d.ts +8 -0
  40. package/package.json +1 -1
  41. package/dist/assets/index-C9o-nGUf.js +0 -111
  42. package/dist/assets/index-kINGwdwO.css +0 -1
  43. package/dist/index.html +0 -13
@@ -0,0 +1,303 @@
1
+ /**
2
+ * Interface describing the advertising configuration options for the VP Player.
3
+ *
4
+ * @interface
5
+ * @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/advertising}
6
+ */
7
+ export interface VPPlayerAdsConfig {
8
+ skipAd?: {
9
+ state: boolean;
10
+ skipFrom: number;
11
+ };
12
+ vmap?: string;
13
+ VPAIDmode?: string;
14
+ enableProgrammability?: boolean;
15
+ functions?: Array<{
16
+ isDynamicKey: boolean;
17
+ isDynamicValue: boolean;
18
+ key: string;
19
+ order: number;
20
+ value: string;
21
+ }>;
22
+ bidding?: boolean;
23
+ afterMidrollBacktrack?: {
24
+ state: boolean;
25
+ seconds: number;
26
+ };
27
+ adBreaks?: Array<{
28
+ adTagUrl: string[];
29
+ breakType?: 'preroll' | 'midroll' | 'postroll';
30
+ breakTimingType?: 'time' | 'percentage' | 'playlist';
31
+ breakTimingValue?: number;
32
+ schedule?: {
33
+ type?: 'CUSTOM' | 'RECURRING';
34
+ ranges?: Array<{
35
+ startTime?: number;
36
+ endTime?: number;
37
+ count?: number;
38
+ breaks?: number[];
39
+ }>;
40
+ algorithm?: 'PASSIVE' | 'AGGRESSIVE' | 'SIMILAR_DISTANCE' | 'CUSTOM';
41
+ protectFirst?: number;
42
+ protectLast?: number;
43
+ occurEvery?: number;
44
+ liveCount?: number;
45
+ };
46
+ }>;
47
+ bidders?: Array<{
48
+ name: string;
49
+ params?: Array<{
50
+ paramName?: string;
51
+ paramType?: string;
52
+ paramValue?: string;
53
+ }>;
54
+ }>;
55
+ adsRequireInteraction?: boolean;
56
+ }
57
+ /**
58
+ * Interface defining the configuration options for the VP Player.
59
+ *
60
+ * @interface
61
+ * @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/configuration}
62
+ * @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/playing}
63
+ * @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/advertising}
64
+ * @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/styling}
65
+ * @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/localization}
66
+ * @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/full-configuration}
67
+ */
68
+ export interface VPPlayerConfig {
69
+ projectId?: string;
70
+ video: {
71
+ ads?: VPPlayerAdsConfig;
72
+ advertising?: boolean;
73
+ file?: string;
74
+ title?: string;
75
+ description?: string;
76
+ publishDate?: string;
77
+ duration?: number;
78
+ thumbnail?: string;
79
+ filmstrip?: string;
80
+ author?: string;
81
+ source?: string;
82
+ tags?: string[];
83
+ playlist?: {
84
+ state: boolean;
85
+ playlistVideoIndex: number;
86
+ videos: Array<{
87
+ videoId: string;
88
+ title: string;
89
+ thumbnailUrl?: string;
90
+ duration?: number;
91
+ file?: string;
92
+ }>;
93
+ };
94
+ };
95
+ config: {
96
+ adAnnouncement?: {
97
+ state?: boolean;
98
+ timeBeforeAd?: number;
99
+ };
100
+ autostartOnLoad?: {
101
+ state?: boolean;
102
+ onMobile?: boolean;
103
+ onData?: boolean;
104
+ };
105
+ adsRequireInteraction?: boolean;
106
+ autoplay?: boolean;
107
+ pauseOtherVideos?: boolean;
108
+ focusOnAutostart?: boolean;
109
+ muted?: boolean;
110
+ loop?: boolean;
111
+ size?: {
112
+ sizeType?: string;
113
+ aspectRatio?: string;
114
+ width?: number | string;
115
+ height?: number | string;
116
+ };
117
+ showRelatedOnPause?: {
118
+ state?: boolean;
119
+ onMobile?: boolean;
120
+ from?: number;
121
+ };
122
+ float?: {
123
+ state: boolean;
124
+ onMobile: boolean;
125
+ position: string;
126
+ dismissible: boolean;
127
+ requiresInteraction: boolean;
128
+ toVideoThreshold: number;
129
+ toFloatThreshold: number;
130
+ style: {
131
+ width: number;
132
+ border: string;
133
+ };
134
+ };
135
+ controls?: {
136
+ theaterButton?: boolean;
137
+ settingsButton?: boolean;
138
+ chromecastButton?: boolean;
139
+ nextButton?: boolean;
140
+ fullscreenButton?: boolean;
141
+ airplayButton?: boolean;
142
+ bigPlayButton?: boolean;
143
+ autopausePlayButton?: boolean;
144
+ pictureInPictureButton?: boolean;
145
+ relatedButton?: boolean;
146
+ volumeButton?: boolean;
147
+ shareButton?: boolean;
148
+ };
149
+ logo?: {
150
+ state?: boolean;
151
+ file?: string;
152
+ position?: string;
153
+ defaultOpacity?: number;
154
+ inactiveOpacity?: number;
155
+ onClickURL?: string;
156
+ };
157
+ skin?: {
158
+ controlBar?: {
159
+ background?: string;
160
+ spread?: "solid" | "gradient";
161
+ gradientMidPoint?: number;
162
+ text?: string;
163
+ icons?: {
164
+ default?: string;
165
+ hover?: string;
166
+ };
167
+ timeslider?: {
168
+ progress?: string;
169
+ rail?: string;
170
+ buffer?: string;
171
+ dragger?: string;
172
+ };
173
+ timesliderOnAd?: {
174
+ progress?: string;
175
+ rail?: string;
176
+ buffer?: string;
177
+ dragger?: string;
178
+ };
179
+ volume?: {
180
+ dragger?: string;
181
+ progress?: string;
182
+ rail?: string;
183
+ notifier?: string;
184
+ };
185
+ };
186
+ menus?: {
187
+ background?: {
188
+ default?: string;
189
+ hover?: string;
190
+ };
191
+ links?: {
192
+ default?: string;
193
+ hover?: string;
194
+ };
195
+ autoplay?: {
196
+ autoplayOn?: string;
197
+ autoplayOff?: string;
198
+ };
199
+ };
200
+ nextVideo?: {
201
+ background?: string;
202
+ text?: string;
203
+ timeslider?: {
204
+ rail?: string;
205
+ progress?: string;
206
+ };
207
+ icons?: {
208
+ play?: {
209
+ default?: string;
210
+ hover?: string;
211
+ };
212
+ close?: string;
213
+ };
214
+ };
215
+ playlist?: {
216
+ background?: string;
217
+ text?: string;
218
+ icons?: {
219
+ arrows?: {
220
+ active?: string;
221
+ inactive?: string;
222
+ };
223
+ close?: string;
224
+ };
225
+ card?: {
226
+ background?: string;
227
+ title?: string;
228
+ duration?: {
229
+ text?: string;
230
+ background?: string;
231
+ };
232
+ icons?: {
233
+ play?: {
234
+ default?: string;
235
+ hover?: string;
236
+ };
237
+ };
238
+ };
239
+ };
240
+ };
241
+ lang?: {
242
+ locale?: string;
243
+ controls?: {
244
+ play?: string;
245
+ pause?: string;
246
+ next?: string;
247
+ replay?: string;
248
+ volume?: string;
249
+ mute?: string;
250
+ unmute?: string;
251
+ settings?: string;
252
+ theater?: string;
253
+ fullscreen?: string;
254
+ chromecast?: string;
255
+ airplay?: string;
256
+ pictureInPicture?: string;
257
+ related?: string;
258
+ skipIntro?: string;
259
+ skipAd?: string;
260
+ playlistTitle?: string;
261
+ upNext?: string;
262
+ live?: string;
263
+ continueAfterPause?: string;
264
+ };
265
+ settings?: {
266
+ quality?: string;
267
+ subtitles?: string;
268
+ autoplay?: string;
269
+ playbackRate?: string;
270
+ auto?: string;
271
+ off?: string;
272
+ normal?: string;
273
+ share?: string;
274
+ };
275
+ ads?: {
276
+ ad?: string;
277
+ skip?: string;
278
+ skipIn?: string;
279
+ visit?: string;
280
+ info?: string;
281
+ simultaneousAds?: string;
282
+ adAnnouncement?: string;
283
+ };
284
+ messages?: {
285
+ playbackErrorTitle?: string;
286
+ playbackErrorDescription?: string;
287
+ geoBlockedTitle?: string;
288
+ geoBlockedDescription?: string;
289
+ streamInterruptedTitle?: string;
290
+ streamInterruptedDescription?: string;
291
+ };
292
+ };
293
+ ads?: VPPlayerAdsConfig;
294
+ };
295
+ }
296
+ /**
297
+ * Default configuration object for the VP Player.
298
+ *
299
+ * @constant
300
+ * @type {VPPlayerConfig}
301
+ * @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/configuration}
302
+ */
303
+ export declare const defaultVPPlayerConfig: VPPlayerConfig;
@@ -0,0 +1,3 @@
1
+ export * from "./props";
2
+ export * from "./instance";
3
+ export * from "./config";
@@ -0,0 +1,11 @@
1
+ import { VPPlayerConfig } from "./config";
2
+ /**
3
+ * Interface representing an instance of the VP Player.
4
+ *
5
+ * @interface
6
+ */
7
+ export interface VPPlayerInstance {
8
+ setup: (config: VPPlayerConfig) => void;
9
+ destroy?: () => void;
10
+ play?: () => void;
11
+ }
@@ -0,0 +1,54 @@
1
+ import { VPPlayerConfig } from "./config";
2
+ /**
3
+ * Interface defining the parameters for configuring the VP Player instance.
4
+ *
5
+ * @interface
6
+ */
7
+ export interface PlayerParams {
8
+ playerId?: string;
9
+ videoId?: string;
10
+ projectId?: string;
11
+ videoUrl?: string;
12
+ playlistId?: string;
13
+ scriptUrl?: string;
14
+ version?: string | null;
15
+ config?: Partial<VPPlayerConfig>;
16
+ thumbnailUrl?: string;
17
+ isReels?: boolean;
18
+ hiddenClasses?: string[];
19
+ apiKey?: string;
20
+ className?: string;
21
+ }
22
+ /**
23
+ * Interface for the VP Player context, providing methods and state for controlling the player.
24
+ *
25
+ * @interface
26
+ */
27
+ export interface VPPlayerContextType {
28
+ showPlayer: (params: PlayerParams) => void;
29
+ hidePlayer: () => void;
30
+ isPlayerVisible: boolean;
31
+ playerParams: PlayerParams | null;
32
+ }
33
+ /**
34
+ * Interface defining the properties for the VP Player component.
35
+ *
36
+ * @interface
37
+ */
38
+ export interface VPPlayerProps {
39
+ playerId: string;
40
+ videoId?: string;
41
+ projectId?: string;
42
+ videoUrl?: string;
43
+ playlistId?: string;
44
+ scriptUrl?: string;
45
+ version?: string | null;
46
+ config?: Partial<VPPlayerConfig>;
47
+ isReels?: boolean;
48
+ thumbnailUrl?: string;
49
+ onClose?: () => void;
50
+ hiddenClasses?: string[];
51
+ apiKey?: string;
52
+ isPlayerVisible?: boolean;
53
+ className?: string;
54
+ }
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ import "./index.css";