@devix-technologies/react-gjirafa-vp-player 1.0.23 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -114,7 +114,6 @@ interface VPPlayerProps {
114
114
  projectId?: string; // Project ID for API calls (used with videoId or playlistId)
115
115
  playlistId?: string; // Playlist ID for fetching a playlist from API
116
116
  config?: Partial<VPPlayerConfig>; // Optional partial configuration to override defaults
117
- apiKey?: string; // Optional API key for VP player requests; falls back to VP_API_KEY from .env if not provided.
118
117
  isReels?: boolean; // Optional flag to enable Reels/iShorties mode (defaults to false)
119
118
  thumbnailUrl?: string; // Optional URL to a thumbnail image for Reels mode
120
119
  hiddenClasses?: string[]; // Optional array of CSS class names to hide specific player elements
@@ -171,10 +170,6 @@ interface VPPlayerProps {
171
170
 
172
171
  - Optional partial configuration object to override the default `VPPlayerConfig`. Allows customization of player behavior and settings.
173
172
 
174
- ### **apiKey?: string**
175
-
176
- - Optional API key for VP Player API requests. Falls back to `VITE_VP_API_KEY` from `.env` if not provided. A warning is logged if missing for API-based configurations.
177
-
178
173
  ### **isReels?: boolean**
179
174
 
180
175
  - Optional flag to enable Reels/iShorties mode, optimizing the player for short vertical video playback (e.g., 9:16 aspect ratio). Defaults to `false`.
@@ -218,7 +213,6 @@ interface VPPlayerProps {
218
213
  playerId="player"
219
214
  projectId="agmipnzb"
220
215
  playlistId="lzxikgjw"
221
- apiKey="YOUR_API_KEY"
222
216
  onPlaylistData={(videos) => {
223
217
  console.log('Playlist loaded:', videos.length, 'videos');
224
218
  console.log('Main videos:', videos.filter(v => !v.isBackupPlaylist).length);
@@ -276,7 +270,6 @@ interface VPPlayerProps {
276
270
  playlistId="lzxikgjw"
277
271
  scriptUrl="https://host.vpplayer.tech/vertical-player/rbqcdwznd.js"
278
272
  isReels={true}
279
- apiKey="YOUR_API_KEY"
280
273
  onVideoStarted={(videoData) => {
281
274
  console.log('Video changed:', videoData.title);
282
275
  console.log('Video index:', videoData.videoIndex);
@@ -292,7 +285,6 @@ interface VPPlayerProps {
292
285
  projectId="agmipnzb"
293
286
  videoId="vjsnuhvm"
294
287
  scriptUrl="https://host.vpplayer.tech/player/ptkzurnx.js"
295
- apiKey="YOUR_API_KEY"
296
288
  onVideoStarted={(videoData) => {
297
289
  console.log('Video started:', videoData.title);
298
290
  console.log('Author:', videoData.author);
@@ -319,46 +311,6 @@ interface VPPlayerProps {
319
311
 
320
312
  2. Player Setup: Once the script is loaded and the DOM element is rendered, the vpPlayer function is called with the element's ID and the final configuration.
321
313
 
322
- ### API Key Usage
323
-
324
- The API key can be provided via the apiKey prop or the VITE_VP_API_KEY environment variable, with props taking precedence, and a warning is logged if neither is supplied for API requests.
325
-
326
- - **Source:**
327
- - Props (`apiKey`) or `.env` (`VITE_VP_API_KEY`).
328
- - **Priority:**
329
- - Props > `.env`.
330
- - **Fallback:**
331
- - Optional, e.g., `'FALLBACK_TEST_KEY'`.
332
- - **Warning:**
333
- - Logged if missing for API calls.
334
-
335
- ### Setting up the API Key
336
-
337
- #### Step 1: Create a .env File
338
-
339
- In the root of your project, create a `.env` file (or update an existing one) and add the following line:
340
-
341
- ```bash
342
- VITE_VP_API_KEY=YOUR_API_KEY_HERE
343
- ```
344
-
345
- Replace `YOUR_API_KEY_HERE` with your actual API key.
346
-
347
- The VPPlayer component will automatically use the `VITE_VP_API_KEY` environment variable if the `apiKey` is not provided via props:
348
-
349
- ```bash
350
- import { VPPlayer } from "@dvxx/vp-player";
351
-
352
- const MyComponent = () => (
353
- <VPPlayer
354
- playerId="my-player"
355
- videoId="abcdefgh123"
356
- projectId="ijklmnop456"
357
- // apiKey will be read from VITE_VP_API_KEY since it is not passed
358
- />
359
- );
360
- ```
361
-
362
314
  ## Supported Data Input Types
363
315
 
364
316
  ## Supported Data Input Types
@@ -492,7 +444,6 @@ const MyPlaylistComponent = () => {
492
444
  playerId="my-playlist-player"
493
445
  projectId="agmipnzb"
494
446
  playlistId="lzxikgjw"
495
- apiKey="YOUR_API_KEY"
496
447
  onPlaylistData={(playlistVideos) => {
497
448
  setVideos(playlistVideos);
498
449
  console.log("Loaded videos:", playlistVideos.length);
@@ -516,7 +467,6 @@ Fires every time a video starts (scroll, click, auto-play). Perfect for analytic
516
467
  playlistId="lzxikgjw"
517
468
  scriptUrl="https://host.vpplayer.tech/vertical-player/rbqcdwznd.js"
518
469
  isReels={true}
519
- apiKey="YOUR_API_KEY"
520
470
  onVideoStarted={(videoData) => {
521
471
  // Fires on scroll or arrow navigation
522
472
  console.log("Now playing:", videoData.title);
@@ -540,7 +490,6 @@ Fires every time a video starts (scroll, click, auto-play). Perfect for analytic
540
490
  projectId="agmipnzb"
541
491
  videoId="vjsnuhvm"
542
492
  scriptUrl="https://host.vpplayer.tech/player/ptkzurnx.js"
543
- apiKey="YOUR_API_KEY"
544
493
  onVideoStarted={(videoData) => {
545
494
  // Fires on next/previous or auto-play
546
495
  // Full metadata fetched from API
@@ -594,7 +543,6 @@ const AdvancedPlayerComponent = () => {
594
543
  projectId="agmipnzb"
595
544
  playlistId="lzxikgjw"
596
545
  scriptUrl="https://host.vpplayer.tech/player/ptkzurnx.js"
597
- apiKey="YOUR_API_KEY"
598
546
  onPlaylistData={(videos) => {
599
547
  setPlaylistVideos(videos);
600
548
  console.log(`Playlist loaded: ${videos.length} videos`);