@devix-technologies/react-gjirafa-vp-player 1.0.31-beta.1 → 1.0.31-beta.3
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 +202 -99
- package/dist/index.d.ts +314 -561
- package/dist/react-gjirafa-vp-player.es.js +976 -1329
- package/dist/react-gjirafa-vp-player.umd.js +9 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,72 +1,25 @@
|
|
|
1
1
|
import { CurrentVideoData as CurrentVideoData_2 } from '../../../../../../../src/types';
|
|
2
|
-
import { default as default_2 } from 'react';
|
|
3
2
|
import { DetailedHTMLProps } from 'react';
|
|
4
3
|
import { HTMLAttributes } from 'react';
|
|
5
4
|
import { JSX } from 'react/jsx-runtime';
|
|
6
|
-
import { PlayerEventCallbacks as PlayerEventCallbacks_2 } from '../../../../../../../src/types';
|
|
7
|
-
import { PlayerTrackingMetadata as PlayerTrackingMetadata_2 } from '../../../../../../../src/types';
|
|
8
|
-
import { PlaylistItem as PlaylistItem_2 } from '../../../../../../../src/types';
|
|
9
5
|
import { RefObject } from 'react';
|
|
10
6
|
import { StyledComponent } from '@emotion/styled';
|
|
11
7
|
import { Theme } from '@emotion/react';
|
|
12
|
-
import { VPPlayerConfig as VPPlayerConfig_2 } from '../../../../../../../src/interfaces';
|
|
13
|
-
import { VPPlayerConfig as VPPlayerConfig_3 } from '../../../../../../../src/interfaces/config';
|
|
14
8
|
import { VPPlayerInstance as VPPlayerInstance_2 } from '../../../../../../../src/interfaces';
|
|
15
9
|
import { VPPlayerProps as VPPlayerProps_2 } from '../../../../../../../src/interfaces';
|
|
16
10
|
|
|
17
|
-
/** Ad tag URL for linear ads */
|
|
18
|
-
export declare const AD_TAG_LINEAR_URL = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=";
|
|
19
|
-
|
|
20
|
-
/** Ad tag URL for skippable linear ads */
|
|
21
|
-
export declare const AD_TAG_SKIPPABLE_LINEAR_URL = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=";
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Base configuration for VP Player with common settings.
|
|
25
|
-
*/
|
|
26
|
-
export declare const baseConfig: Partial<VPPlayerConfig_3>;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Base configuration for ads with common ad settings.
|
|
30
|
-
*/
|
|
31
|
-
export declare const baseConfigWithAds: Partial<VPPlayerConfig_3>;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Base configuration with autoplay enabled.
|
|
35
|
-
*/
|
|
36
|
-
export declare const baseConfigWithAutoplay: Partial<VPPlayerConfig_3>;
|
|
37
|
-
|
|
38
|
-
/** URL for the Big Buck Bunny video */
|
|
39
|
-
export declare const BIG_BUCK_BUNNY_URL = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4";
|
|
40
|
-
|
|
41
11
|
/**
|
|
42
|
-
*
|
|
12
|
+
* Appends the divId query parameter to a script URL.
|
|
13
|
+
* This tells the managed script which DOM element to use as the player container.
|
|
43
14
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* @throws {Error} - Throws error if no valid video source is found
|
|
15
|
+
* @param url - The base script URL
|
|
16
|
+
* @param divId - The DOM element ID for the player container
|
|
17
|
+
* @returns The URL with ?divId= parameter appended
|
|
18
|
+
* @example
|
|
19
|
+
* appendDivIdToUrl('https://host.vpplayer.tech/player/ptkzurnx/vjsobqhe.js', 'my-player')
|
|
20
|
+
* // Returns: 'https://host.vpplayer.tech/player/ptkzurnx/vjsobqhe.js?divId=my-player'
|
|
51
21
|
*/
|
|
52
|
-
export declare const
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Interface for options used in building the VP Player configuration.
|
|
56
|
-
*
|
|
57
|
-
* @interface ConfigBuilderOptions
|
|
58
|
-
*/
|
|
59
|
-
declare interface ConfigBuilderOptions {
|
|
60
|
-
videoUrl?: string;
|
|
61
|
-
projectId?: string;
|
|
62
|
-
config?: Partial<VPPlayerConfig_2>;
|
|
63
|
-
isVerticalPlayer?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* When true, skips all wrapper defaults and passes only minimal config to the SDK.
|
|
66
|
-
* Use this to let the GTech admin panel settings be the source of truth.
|
|
67
|
-
*/
|
|
68
|
-
pureMode?: boolean;
|
|
69
|
-
}
|
|
22
|
+
export declare const appendDivIdToUrl: (url: string, divId: string) => string;
|
|
70
23
|
|
|
71
24
|
/**
|
|
72
25
|
* Represents data about the currently playing video.
|
|
@@ -94,44 +47,83 @@ export declare interface CurrentVideoData {
|
|
|
94
47
|
}
|
|
95
48
|
|
|
96
49
|
/**
|
|
97
|
-
*
|
|
50
|
+
* Event callback refs interface for internal use
|
|
51
|
+
* Prevents stale closures in event handlers
|
|
52
|
+
*/
|
|
53
|
+
export declare interface EventCallbackRefs {
|
|
54
|
+
onReady?: () => void;
|
|
55
|
+
onPlay?: () => void;
|
|
56
|
+
onPause?: () => void;
|
|
57
|
+
onResume?: () => void;
|
|
58
|
+
onComplete?: () => void;
|
|
59
|
+
onError?: (error: string) => void;
|
|
60
|
+
onVideoStarted?: (data: CurrentVideoData_2) => void;
|
|
61
|
+
onTimeUpdate?: (seconds: number) => void;
|
|
62
|
+
onQuartile25?: () => void;
|
|
63
|
+
onQuartile50?: () => void;
|
|
64
|
+
onQuartile75?: () => void;
|
|
65
|
+
onNext?: () => void;
|
|
66
|
+
onPrevious?: () => void;
|
|
67
|
+
onProgress10s?: (seconds: number) => void;
|
|
68
|
+
onProgress20s?: (seconds: number) => void;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Generates a full player DOM element ID based on provided playerId and videoId.
|
|
73
|
+
* Falls back to "default" if playerId is not provided.
|
|
98
74
|
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
75
|
+
* @param playerId - Base identifier for the player.
|
|
76
|
+
* @param videoId - Optional video identifier.
|
|
77
|
+
* @returns Full DOM element ID string.
|
|
78
|
+
*/
|
|
79
|
+
export declare const generatePlayerId: (playerId?: string, videoId?: string) => string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Generates the URL for a FULLY managed video-specific player script.
|
|
83
|
+
* This script auto-initializes with all config from GTech admin panel -
|
|
84
|
+
* NO .setup() call needed! Chapters, ads, controls, etc. are all pre-configured.
|
|
102
85
|
*
|
|
103
|
-
* @
|
|
104
|
-
* @
|
|
105
|
-
* @
|
|
86
|
+
* @param {string} scriptId - The player script ID (e.g., 'ptkzurnx').
|
|
87
|
+
* @param {string} videoId - The video ID (e.g., 'vjsobqhe').
|
|
88
|
+
* @returns {string} - The complete URL for the fully managed player script.
|
|
89
|
+
* @example
|
|
90
|
+
* // Returns: https://host.vpplayer.tech/player/ptkzurnx/vjsobqhe.js
|
|
91
|
+
* getFullyManagedPlayerScriptUrl('ptkzurnx', 'vjsobqhe')
|
|
106
92
|
*/
|
|
107
|
-
export declare const
|
|
93
|
+
export declare const getFullyManagedPlayerScriptUrl: (scriptId: string, videoId: string) => string;
|
|
108
94
|
|
|
109
|
-
/**
|
|
110
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Generates the URL for loading a managed VP Player script (Web Player).
|
|
97
|
+
* This script requires calling .setup() with your config.
|
|
98
|
+
* @param {string} scriptId - The unique script ID (e.g., 'ptkzurly').
|
|
99
|
+
* @returns {string} - The complete URL for the managed player script.
|
|
100
|
+
*/
|
|
101
|
+
export declare const getManagedPlayerScriptUrl: (scriptId: string) => string;
|
|
111
102
|
|
|
112
103
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* Vertical player URLs contain a player script ID, NOT a video ID.
|
|
117
|
-
* - Horizontal: ${VP_PLAYER_BASE_URL}/player/{version}/{videoId}.js -> extracts videoId
|
|
118
|
-
* - Vertical: ${VP_PLAYER_BASE_URL}/vertical-player/{scriptId}.js -> returns undefined
|
|
119
|
-
*
|
|
120
|
-
* @function
|
|
121
|
-
* @param {string} [scriptUrl] - The script URL containing the video ID.
|
|
122
|
-
* @returns {string | undefined} The extracted video ID, or `undefined` if not found or if vertical player.
|
|
104
|
+
* Generates the URL for loading the standard VP Player script by version.
|
|
105
|
+
* @param {string} playerVersion - The version of the VP Player script (e.g., 'latest', 'v2.1.1').
|
|
106
|
+
* @returns {string} - The complete URL for the player script.
|
|
123
107
|
*/
|
|
124
|
-
export declare const
|
|
108
|
+
export declare const getPlayerScriptUrl: (playerVersion: string) => string;
|
|
125
109
|
|
|
126
110
|
/**
|
|
127
|
-
* Generates
|
|
128
|
-
* @param
|
|
129
|
-
* @
|
|
130
|
-
* @param breakTimingType - The timing type for the ad break (e.g., "time", "percentage", "playlist").
|
|
131
|
-
* @param breakTimingValue - The timing value for the ad break (e.g., 0 for immediate, 2 for playlist index).
|
|
132
|
-
* @returns A partial VPPlayerConfig with the ad configuration.
|
|
111
|
+
* Generates the URL for loading a vertical VP Player script.
|
|
112
|
+
* @param {string} scriptId - The unique script ID (e.g., 'rbqcdwzlg').
|
|
113
|
+
* @returns {string} - The complete URL for the vertical player script.
|
|
133
114
|
*/
|
|
134
|
-
export declare const
|
|
115
|
+
export declare const getVerticalPlayerScriptUrl: (scriptId: string) => string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Manual playlist configuration
|
|
119
|
+
* Used when you want to provide your own videos array instead of using GTech admin playlists
|
|
120
|
+
*/
|
|
121
|
+
export declare interface ManualPlaylistConfig {
|
|
122
|
+
/** Array of videos to play */
|
|
123
|
+
videos: PlaylistVideoItem[];
|
|
124
|
+
/** Starting video index (0-based) */
|
|
125
|
+
startIndex?: number;
|
|
126
|
+
}
|
|
135
127
|
|
|
136
128
|
/**
|
|
137
129
|
* Styled component for the full-screen overlay when the player is active.
|
|
@@ -146,12 +138,6 @@ as?: React.ElementType;
|
|
|
146
138
|
className?: string;
|
|
147
139
|
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
148
140
|
|
|
149
|
-
/** URL for the Pexels thumbnail */
|
|
150
|
-
export declare const PEXELS_THUMBNAIL_URL = "https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600";
|
|
151
|
-
|
|
152
|
-
/** URL for the Pexels vertical video */
|
|
153
|
-
export declare const PEXELS_VERTICAL_VIDEO_URL = "https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4";
|
|
154
|
-
|
|
155
141
|
/**
|
|
156
142
|
* Styled component for the video player container.
|
|
157
143
|
*
|
|
@@ -231,55 +217,6 @@ export declare interface PlayerObject {
|
|
|
231
217
|
progress?: number;
|
|
232
218
|
}
|
|
233
219
|
|
|
234
|
-
/**
|
|
235
|
-
* Interface defining the parameters for configuring the VP Player instance.
|
|
236
|
-
*
|
|
237
|
-
* @interface
|
|
238
|
-
*/
|
|
239
|
-
export declare interface PlayerParams {
|
|
240
|
-
playerId: string;
|
|
241
|
-
config?: Partial<VPPlayerConfig>;
|
|
242
|
-
videoId?: string;
|
|
243
|
-
projectId?: string;
|
|
244
|
-
videoUrl?: string;
|
|
245
|
-
playlistId?: string;
|
|
246
|
-
scriptUrl?: string;
|
|
247
|
-
version?: string | null;
|
|
248
|
-
thumbnailUrl?: string;
|
|
249
|
-
isReels?: boolean;
|
|
250
|
-
hiddenClasses?: string[];
|
|
251
|
-
className?: string;
|
|
252
|
-
/**
|
|
253
|
-
* When true (default), skips all wrapper defaults and passes only minimal config to the SDK.
|
|
254
|
-
* This lets the GTech admin panel settings be the source of truth for
|
|
255
|
-
* controls, autoplay, muted, size, and other configuration.
|
|
256
|
-
* Set to false to use legacy behavior with wrapper defaults.
|
|
257
|
-
* @default true
|
|
258
|
-
*/
|
|
259
|
-
pureMode?: boolean;
|
|
260
|
-
onPlaylistData?: (videos: PlaylistItem_2[]) => void;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Interface defining the parameters for initializing the VPPlayer.
|
|
265
|
-
*
|
|
266
|
-
* @interface PlayerParams
|
|
267
|
-
*/
|
|
268
|
-
declare interface PlayerParams_2 {
|
|
269
|
-
playerId?: string;
|
|
270
|
-
videoId?: string;
|
|
271
|
-
projectId?: string;
|
|
272
|
-
videoUrl?: string;
|
|
273
|
-
playlistId?: string;
|
|
274
|
-
scriptUrl?: string;
|
|
275
|
-
version?: string | null;
|
|
276
|
-
config?: VPPlayerProps_2["config"];
|
|
277
|
-
thumbnailUrl?: string;
|
|
278
|
-
isReels?: boolean;
|
|
279
|
-
hiddenClasses?: string[];
|
|
280
|
-
className?: string;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
220
|
/**
|
|
284
221
|
* Tracking metadata for analytics (available in v1.0.23+)
|
|
285
222
|
*/
|
|
@@ -335,19 +272,35 @@ export declare interface PlaylistItem {
|
|
|
335
272
|
}
|
|
336
273
|
|
|
337
274
|
/**
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
* @function
|
|
341
|
-
* @throws {Error} If used outside of the VPPlayerProvider.
|
|
342
|
-
* @returns {VPPlayerContextType} The VPPlayer context.
|
|
275
|
+
* Video item for manual playlist
|
|
343
276
|
*/
|
|
344
|
-
export declare
|
|
277
|
+
export declare interface PlaylistVideoItem {
|
|
278
|
+
/** Unique video identifier */
|
|
279
|
+
videoId: string;
|
|
280
|
+
/** Video title */
|
|
281
|
+
title: string;
|
|
282
|
+
/** Video file URL (mp4, m3u8, etc.) */
|
|
283
|
+
file: string;
|
|
284
|
+
/** Alternative: HLS URL */
|
|
285
|
+
hlsUrl?: string;
|
|
286
|
+
/** Thumbnail image URL */
|
|
287
|
+
thumbnailUrl?: string;
|
|
288
|
+
/** Alternative: Thumbnail URL */
|
|
289
|
+
thumbnail?: string;
|
|
290
|
+
/** Video duration in seconds */
|
|
291
|
+
duration?: number;
|
|
292
|
+
}
|
|
345
293
|
|
|
346
294
|
/**
|
|
347
|
-
*
|
|
348
|
-
*
|
|
295
|
+
* VP Player logic hook
|
|
296
|
+
*
|
|
297
|
+
* Supports two modes:
|
|
298
|
+
* 1. **Auto-init mode** (default): Load managed script that auto-initializes with GTech admin config
|
|
299
|
+
* 2. **Manual playlist mode**: Build config and call setup() with custom videos array
|
|
300
|
+
*
|
|
301
|
+
* The manual playlist mode is required for vertical player when supplying your own videos.
|
|
349
302
|
*/
|
|
350
|
-
export declare const useVPPlayerLogic: ({
|
|
303
|
+
export declare const useVPPlayerLogic: ({ scriptId, videoId, scriptUrl, projectId, playlist, playerId, isVertical, isReels, onReady, onPlay, onPause, onResume, onComplete, onError, onVideoStarted, onTimeUpdate, onQuartile25, onQuartile50, onQuartile75, onNext, onPrevious, onProgress10s, onProgress20s, }: VPPlayerProps_2) => {
|
|
351
304
|
playerRef: RefObject<HTMLDivElement | null>;
|
|
352
305
|
playerInstanceRef: RefObject<VPPlayerInstance_2 | null>;
|
|
353
306
|
isScriptLoaded: boolean;
|
|
@@ -405,51 +358,85 @@ export declare interface VideoDataResult {
|
|
|
405
358
|
}
|
|
406
359
|
|
|
407
360
|
/**
|
|
408
|
-
*
|
|
409
|
-
|
|
361
|
+
* Base URL for the VP Player host.
|
|
362
|
+
*/
|
|
363
|
+
export declare const VP_PLAYER_BASE_URL = "https://host.vpplayer.tech";
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* VP Player Component (v2.0.0)
|
|
410
367
|
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
368
|
+
* A thin React wrapper for the GTech VP Player.
|
|
369
|
+
* All configuration is managed through the GTech admin panel -
|
|
370
|
+
* this wrapper just provides a DOM container, loads the script, and exposes events.
|
|
371
|
+
*
|
|
372
|
+
* ## Basic Usage
|
|
373
|
+
*
|
|
374
|
+
* ```tsx
|
|
375
|
+
* // Using scriptId + videoId (recommended)
|
|
376
|
+
* <VPPlayer
|
|
377
|
+
* scriptId="ptkzurnx"
|
|
378
|
+
* videoId="vjsobqhe"
|
|
379
|
+
* onPlay={() => console.log('Playing!')}
|
|
380
|
+
* />
|
|
381
|
+
*
|
|
382
|
+
* // OR using full script URL
|
|
383
|
+
* <VPPlayer
|
|
384
|
+
* scriptUrl="https://host.vpplayer.tech/player/ptkzurnx/vjsobqhe.js"
|
|
385
|
+
* onPlay={() => console.log('Playing!')}
|
|
386
|
+
* />
|
|
387
|
+
* ```
|
|
388
|
+
*
|
|
389
|
+
* ## Manual Playlist Mode (Vertical Player)
|
|
390
|
+
*
|
|
391
|
+
* For vertical player with custom videos array:
|
|
392
|
+
*
|
|
393
|
+
* ```tsx
|
|
394
|
+
* <VPPlayer
|
|
395
|
+
* scriptId="rbqcdwzlg"
|
|
396
|
+
* projectId="agmipnzb"
|
|
397
|
+
* isVertical={true}
|
|
398
|
+
* playlist={{
|
|
399
|
+
* videos: [
|
|
400
|
+
* { videoId: "1", title: "Video 1", file: "https://...mp4", thumbnailUrl: "...", duration: 120 },
|
|
401
|
+
* { videoId: "2", title: "Video 2", file: "https://...mp4", thumbnailUrl: "...", duration: 150 },
|
|
402
|
+
* ],
|
|
403
|
+
* startIndex: 0,
|
|
404
|
+
* }}
|
|
405
|
+
* onNext={() => console.log('Next video')}
|
|
406
|
+
* />
|
|
407
|
+
* ```
|
|
408
|
+
*
|
|
409
|
+
* ## Reels Mode
|
|
410
|
+
*
|
|
411
|
+
* For TikTok-style vertical videos with overlay:
|
|
412
|
+
*
|
|
413
|
+
* ```tsx
|
|
414
|
+
* <VPPlayer
|
|
415
|
+
* scriptId="rbqcdwzlg"
|
|
416
|
+
* videoId="vjsobqhe"
|
|
417
|
+
* isReels={true}
|
|
418
|
+
* thumbnailUrl="https://example.com/thumb.jpg"
|
|
419
|
+
* onClose={() => console.log('Closed')}
|
|
420
|
+
* />
|
|
421
|
+
* ```
|
|
422
|
+
*
|
|
423
|
+
* @param props - VPPlayer configuration props
|
|
424
|
+
*/
|
|
425
|
+
export declare const VPPlayer: ({ scriptId, videoId, scriptUrl, projectId, playlist, playerId, isVertical, isReels, thumbnailUrl, onClose, className, hiddenClasses, onReady, onPlay, onPause, onResume, onComplete, onError, onVideoStarted, onTimeUpdate, onQuartile25, onQuartile50, onQuartile75, onNext, onPrevious, onProgress10s, onProgress20s, }: VPPlayerProps_2) => JSX.Element;
|
|
447
426
|
|
|
448
427
|
/**
|
|
449
|
-
*
|
|
428
|
+
* VP Player Configuration Types (v2.0.0)
|
|
429
|
+
*
|
|
430
|
+
* NOTE: In v2.0.0, configuration is managed through the GTech admin panel.
|
|
431
|
+
* These types are kept for reference only - the React wrapper does NOT
|
|
432
|
+
* pass configuration to the SDK. The managed script auto-initializes
|
|
433
|
+
* with all settings from the admin panel.
|
|
450
434
|
*
|
|
451
|
-
* @
|
|
452
|
-
|
|
435
|
+
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/configuration}
|
|
436
|
+
*/
|
|
437
|
+
/**
|
|
438
|
+
* Advertising configuration interface (reference only)
|
|
439
|
+
* Configured through GTech admin panel
|
|
453
440
|
*/
|
|
454
441
|
export declare interface VPPlayerAdsConfig {
|
|
455
442
|
skipAd?: {
|
|
@@ -459,332 +446,12 @@ export declare interface VPPlayerAdsConfig {
|
|
|
459
446
|
vmap?: string;
|
|
460
447
|
VPAIDmode?: string;
|
|
461
448
|
enableProgrammability?: boolean;
|
|
462
|
-
functions?: Array<{
|
|
463
|
-
isDynamicKey: boolean;
|
|
464
|
-
isDynamicValue: boolean;
|
|
465
|
-
key: string;
|
|
466
|
-
order: number;
|
|
467
|
-
value: string;
|
|
468
|
-
}>;
|
|
469
|
-
bidding?: boolean;
|
|
470
|
-
afterMidrollBacktrack?: {
|
|
471
|
-
state: boolean;
|
|
472
|
-
seconds: number;
|
|
473
|
-
};
|
|
474
449
|
adBreaks?: Array<{
|
|
475
450
|
adTagUrl: string[];
|
|
476
|
-
breakType?:
|
|
477
|
-
breakTimingType?:
|
|
451
|
+
breakType?: "preroll" | "midroll" | "postroll";
|
|
452
|
+
breakTimingType?: "time" | "percentage" | "playlist";
|
|
478
453
|
breakTimingValue?: number;
|
|
479
|
-
schedule?: {
|
|
480
|
-
type?: 'CUSTOM' | 'RECURRING';
|
|
481
|
-
ranges?: Array<{
|
|
482
|
-
startTime?: number;
|
|
483
|
-
endTime?: number;
|
|
484
|
-
count?: number;
|
|
485
|
-
breaks?: number[];
|
|
486
|
-
}>;
|
|
487
|
-
algorithm?: 'PASSIVE' | 'AGGRESSIVE' | 'SIMILAR_DISTANCE' | 'CUSTOM';
|
|
488
|
-
protectFirst?: number;
|
|
489
|
-
protectLast?: number;
|
|
490
|
-
occurEvery?: number;
|
|
491
|
-
liveCount?: number;
|
|
492
|
-
};
|
|
493
454
|
}>;
|
|
494
|
-
bidders?: Array<{
|
|
495
|
-
name: string;
|
|
496
|
-
params?: Array<{
|
|
497
|
-
paramName?: string;
|
|
498
|
-
paramType?: string;
|
|
499
|
-
paramValue?: string;
|
|
500
|
-
}>;
|
|
501
|
-
}>;
|
|
502
|
-
adsRequireInteraction?: boolean;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Interface defining the configuration options for the VP Player.
|
|
507
|
-
*
|
|
508
|
-
* @interface
|
|
509
|
-
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/configuration}
|
|
510
|
-
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/playing}
|
|
511
|
-
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/advertising}
|
|
512
|
-
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/styling}
|
|
513
|
-
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/localization}
|
|
514
|
-
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/full-configuration}
|
|
515
|
-
*/
|
|
516
|
-
export declare interface VPPlayerConfig {
|
|
517
|
-
projectId?: string;
|
|
518
|
-
videoId?: string;
|
|
519
|
-
categoryName?: string;
|
|
520
|
-
gemiusIdentifier?: string;
|
|
521
|
-
typology?: string;
|
|
522
|
-
video: {
|
|
523
|
-
videoId?: string;
|
|
524
|
-
ads?: VPPlayerAdsConfig;
|
|
525
|
-
advertising?: boolean;
|
|
526
|
-
videoLocking?: {
|
|
527
|
-
isEnabled: boolean;
|
|
528
|
-
type: string;
|
|
529
|
-
value: number;
|
|
530
|
-
};
|
|
531
|
-
file?: string;
|
|
532
|
-
title?: string;
|
|
533
|
-
description?: string;
|
|
534
|
-
publishDate?: string;
|
|
535
|
-
duration?: number;
|
|
536
|
-
preload?: string;
|
|
537
|
-
thumbnail?: string;
|
|
538
|
-
filmstrip?: string;
|
|
539
|
-
author?: string;
|
|
540
|
-
source?: string;
|
|
541
|
-
tags?: string[];
|
|
542
|
-
tracks?: Array<{
|
|
543
|
-
file: string;
|
|
544
|
-
label: string;
|
|
545
|
-
kind: string;
|
|
546
|
-
default?: boolean;
|
|
547
|
-
}>;
|
|
548
|
-
playlist?: {
|
|
549
|
-
state?: boolean;
|
|
550
|
-
playlistId?: string;
|
|
551
|
-
playlistVideoIndex?: number;
|
|
552
|
-
videos?: Array<{
|
|
553
|
-
videoId: string;
|
|
554
|
-
title: string;
|
|
555
|
-
thumbnailUrl?: string;
|
|
556
|
-
duration?: number;
|
|
557
|
-
file?: string;
|
|
558
|
-
hlsUrl?: string;
|
|
559
|
-
}>;
|
|
560
|
-
};
|
|
561
|
-
};
|
|
562
|
-
config: {
|
|
563
|
-
adAnnouncement?: {
|
|
564
|
-
state?: boolean;
|
|
565
|
-
timeBeforeAd?: number;
|
|
566
|
-
};
|
|
567
|
-
autostartOnLoad?: {
|
|
568
|
-
state?: boolean;
|
|
569
|
-
onMobile?: boolean;
|
|
570
|
-
onData?: boolean;
|
|
571
|
-
};
|
|
572
|
-
adsRequireInteraction?: boolean;
|
|
573
|
-
autoplay?: boolean;
|
|
574
|
-
pauseOtherVideos?: boolean;
|
|
575
|
-
focusOnAutostart?: boolean;
|
|
576
|
-
muted?: boolean;
|
|
577
|
-
loop?: boolean;
|
|
578
|
-
size?: {
|
|
579
|
-
sizeType?: string;
|
|
580
|
-
aspectRatio?: string;
|
|
581
|
-
width?: number | string;
|
|
582
|
-
height?: number | string;
|
|
583
|
-
};
|
|
584
|
-
showRelatedOnPause?: {
|
|
585
|
-
state?: boolean;
|
|
586
|
-
onMobile?: boolean;
|
|
587
|
-
from?: number;
|
|
588
|
-
};
|
|
589
|
-
float?: {
|
|
590
|
-
state: boolean;
|
|
591
|
-
onMobile: boolean;
|
|
592
|
-
position: string;
|
|
593
|
-
dismissible: boolean;
|
|
594
|
-
requiresInteraction: boolean;
|
|
595
|
-
toVideoThreshold: number;
|
|
596
|
-
toFloatThreshold: number;
|
|
597
|
-
style: {
|
|
598
|
-
width: number;
|
|
599
|
-
border: string;
|
|
600
|
-
};
|
|
601
|
-
};
|
|
602
|
-
controls?: {
|
|
603
|
-
theaterButton?: boolean;
|
|
604
|
-
settingsButton?: boolean;
|
|
605
|
-
chromecastButton?: boolean;
|
|
606
|
-
nextButton?: boolean;
|
|
607
|
-
fullscreenButton?: boolean;
|
|
608
|
-
airplayButton?: boolean;
|
|
609
|
-
bigPlayButton?: boolean;
|
|
610
|
-
autopausePlayButton?: boolean;
|
|
611
|
-
pictureInPictureButton?: boolean;
|
|
612
|
-
relatedButton?: boolean;
|
|
613
|
-
volumeButton?: boolean;
|
|
614
|
-
shareButton?: boolean;
|
|
615
|
-
subtitlesButton?: boolean;
|
|
616
|
-
showCaptions?: boolean;
|
|
617
|
-
};
|
|
618
|
-
logo?: {
|
|
619
|
-
state?: boolean;
|
|
620
|
-
file?: string;
|
|
621
|
-
position?: string;
|
|
622
|
-
defaultOpacity?: number;
|
|
623
|
-
inactiveOpacity?: number;
|
|
624
|
-
onClickURL?: string;
|
|
625
|
-
};
|
|
626
|
-
skin?: {
|
|
627
|
-
controlBar?: {
|
|
628
|
-
background?: string;
|
|
629
|
-
spread?: "solid" | "gradient";
|
|
630
|
-
gradientMidPoint?: number;
|
|
631
|
-
text?: string;
|
|
632
|
-
icons?: {
|
|
633
|
-
default?: string;
|
|
634
|
-
hover?: string;
|
|
635
|
-
};
|
|
636
|
-
timeslider?: {
|
|
637
|
-
progress?: string;
|
|
638
|
-
rail?: string;
|
|
639
|
-
buffer?: string;
|
|
640
|
-
dragger?: string;
|
|
641
|
-
};
|
|
642
|
-
timesliderOnAd?: {
|
|
643
|
-
progress?: string;
|
|
644
|
-
rail?: string;
|
|
645
|
-
buffer?: string;
|
|
646
|
-
dragger?: string;
|
|
647
|
-
};
|
|
648
|
-
volume?: {
|
|
649
|
-
dragger?: string;
|
|
650
|
-
progress?: string;
|
|
651
|
-
rail?: string;
|
|
652
|
-
notifier?: string;
|
|
653
|
-
};
|
|
654
|
-
};
|
|
655
|
-
menus?: {
|
|
656
|
-
background?: {
|
|
657
|
-
default?: string;
|
|
658
|
-
hover?: string;
|
|
659
|
-
};
|
|
660
|
-
links?: {
|
|
661
|
-
default?: string;
|
|
662
|
-
hover?: string;
|
|
663
|
-
};
|
|
664
|
-
autoplay?: {
|
|
665
|
-
autoplayOn?: string;
|
|
666
|
-
autoplayOff?: string;
|
|
667
|
-
};
|
|
668
|
-
};
|
|
669
|
-
nextVideo?: {
|
|
670
|
-
background?: string;
|
|
671
|
-
text?: string;
|
|
672
|
-
timeslider?: {
|
|
673
|
-
rail?: string;
|
|
674
|
-
progress?: string;
|
|
675
|
-
};
|
|
676
|
-
icons?: {
|
|
677
|
-
play?: {
|
|
678
|
-
default?: string;
|
|
679
|
-
hover?: string;
|
|
680
|
-
};
|
|
681
|
-
close?: string;
|
|
682
|
-
};
|
|
683
|
-
};
|
|
684
|
-
playlist?: {
|
|
685
|
-
background?: string;
|
|
686
|
-
text?: string;
|
|
687
|
-
icons?: {
|
|
688
|
-
arrows?: {
|
|
689
|
-
active?: string;
|
|
690
|
-
inactive?: string;
|
|
691
|
-
};
|
|
692
|
-
close?: string;
|
|
693
|
-
};
|
|
694
|
-
card?: {
|
|
695
|
-
background?: string;
|
|
696
|
-
title?: string;
|
|
697
|
-
duration?: {
|
|
698
|
-
text?: string;
|
|
699
|
-
background?: string;
|
|
700
|
-
};
|
|
701
|
-
icons?: {
|
|
702
|
-
play?: {
|
|
703
|
-
default?: string;
|
|
704
|
-
hover?: string;
|
|
705
|
-
};
|
|
706
|
-
};
|
|
707
|
-
};
|
|
708
|
-
};
|
|
709
|
-
};
|
|
710
|
-
lang?: {
|
|
711
|
-
locale?: string;
|
|
712
|
-
controls?: {
|
|
713
|
-
play?: string;
|
|
714
|
-
pause?: string;
|
|
715
|
-
next?: string;
|
|
716
|
-
replay?: string;
|
|
717
|
-
volume?: string;
|
|
718
|
-
mute?: string;
|
|
719
|
-
unmute?: string;
|
|
720
|
-
settings?: string;
|
|
721
|
-
theater?: string;
|
|
722
|
-
fullscreen?: string;
|
|
723
|
-
chromecast?: string;
|
|
724
|
-
airplay?: string;
|
|
725
|
-
pictureInPicture?: string;
|
|
726
|
-
related?: string;
|
|
727
|
-
skipIntro?: string;
|
|
728
|
-
skipAd?: string;
|
|
729
|
-
playlistTitle?: string;
|
|
730
|
-
upNext?: string;
|
|
731
|
-
live?: string;
|
|
732
|
-
continueAfterPause?: string;
|
|
733
|
-
};
|
|
734
|
-
settings?: {
|
|
735
|
-
quality?: string;
|
|
736
|
-
subtitles?: string;
|
|
737
|
-
autoplay?: string;
|
|
738
|
-
playbackRate?: string;
|
|
739
|
-
auto?: string;
|
|
740
|
-
off?: string;
|
|
741
|
-
normal?: string;
|
|
742
|
-
share?: string;
|
|
743
|
-
};
|
|
744
|
-
ads?: {
|
|
745
|
-
ad?: string;
|
|
746
|
-
skip?: string;
|
|
747
|
-
skipIn?: string;
|
|
748
|
-
visit?: string;
|
|
749
|
-
info?: string;
|
|
750
|
-
simultaneousAds?: string;
|
|
751
|
-
adAnnouncement?: string;
|
|
752
|
-
};
|
|
753
|
-
messages?: {
|
|
754
|
-
playbackErrorTitle?: string;
|
|
755
|
-
playbackErrorDescription?: string;
|
|
756
|
-
geoBlockedTitle?: string;
|
|
757
|
-
geoBlockedDescription?: string;
|
|
758
|
-
streamInterruptedTitle?: string;
|
|
759
|
-
streamInterruptedDescription?: string;
|
|
760
|
-
};
|
|
761
|
-
};
|
|
762
|
-
ads?: VPPlayerAdsConfig;
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* Interface for the VP Player context, providing methods and state for controlling the player.
|
|
768
|
-
*
|
|
769
|
-
* @interface
|
|
770
|
-
*/
|
|
771
|
-
export declare interface VPPlayerContextType {
|
|
772
|
-
showPlayer: (params: PlayerParams) => void;
|
|
773
|
-
hidePlayer: () => void;
|
|
774
|
-
isPlayerVisible: boolean;
|
|
775
|
-
playerParams: PlayerParams | null;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* Interface defining the context for VPPlayer.
|
|
780
|
-
*
|
|
781
|
-
* @interface VPPlayerContextType
|
|
782
|
-
*/
|
|
783
|
-
declare interface VPPlayerContextType_2 {
|
|
784
|
-
showPlayer: (params: PlayerParams_2) => void;
|
|
785
|
-
hidePlayer: () => void;
|
|
786
|
-
isPlayerVisible: boolean;
|
|
787
|
-
playerParams: PlayerParams_2 | null;
|
|
788
455
|
}
|
|
789
456
|
|
|
790
457
|
/**
|
|
@@ -792,10 +459,10 @@ declare interface VPPlayerContextType_2 {
|
|
|
792
459
|
* Based on VP Player API Reference: https://vp.gjirafa.tech/documentation/docs/web-player/api-reference
|
|
793
460
|
* And VP Vertical Player API Reference: https://vp.gjirafa.tech/documentation/docs/vertical-player/api-reference
|
|
794
461
|
*
|
|
795
|
-
* @interface
|
|
462
|
+
* @interface VPPlayerInstance
|
|
796
463
|
*/
|
|
797
464
|
export declare interface VPPlayerInstance {
|
|
798
|
-
setup: (config:
|
|
465
|
+
setup: (config: unknown) => void;
|
|
799
466
|
destroy?: () => void;
|
|
800
467
|
play?: () => void;
|
|
801
468
|
pause?: () => void;
|
|
@@ -824,7 +491,7 @@ export declare interface VPPlayerInstance {
|
|
|
824
491
|
getVolume?: () => number;
|
|
825
492
|
getContainer?: () => HTMLElement;
|
|
826
493
|
getDuration?: () => number;
|
|
827
|
-
getConfig?: () =>
|
|
494
|
+
getConfig?: () => unknown;
|
|
828
495
|
getQualityLevels?: () => unknown[];
|
|
829
496
|
getCurrentQuality?: () => number;
|
|
830
497
|
checkViewability?: () => boolean;
|
|
@@ -852,68 +519,154 @@ export declare interface VPPlayerInstance {
|
|
|
852
519
|
}
|
|
853
520
|
|
|
854
521
|
/**
|
|
855
|
-
*
|
|
522
|
+
* Simplified props interface for VPPlayer v2.0.0
|
|
523
|
+
*
|
|
524
|
+
* The wrapper is now a thin bridge to the GTech JS player.
|
|
525
|
+
* All configuration is managed through the GTech admin panel.
|
|
856
526
|
*
|
|
857
|
-
* @interface
|
|
527
|
+
* @interface VPPlayerProps
|
|
858
528
|
*/
|
|
859
529
|
export declare interface VPPlayerProps {
|
|
860
|
-
|
|
861
|
-
|
|
530
|
+
/**
|
|
531
|
+
* GTech script ID (e.g., 'ptkzurnx')
|
|
532
|
+
* Used with videoId to build the fully managed script URL
|
|
533
|
+
*/
|
|
534
|
+
scriptId?: string;
|
|
535
|
+
/**
|
|
536
|
+
* GTech video ID (e.g., 'vjsobqhe')
|
|
537
|
+
* Used with scriptId to build the fully managed script URL
|
|
538
|
+
*/
|
|
862
539
|
videoId?: string;
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
540
|
+
/**
|
|
541
|
+
* Full managed script URL (alternative to scriptId + videoId)
|
|
542
|
+
* @example "https://host.vpplayer.tech/player/ptkzurnx/vjsobqhe.js"
|
|
543
|
+
*/
|
|
866
544
|
scriptUrl?: string;
|
|
867
|
-
|
|
545
|
+
/**
|
|
546
|
+
* GTech project ID (required for manual playlist mode)
|
|
547
|
+
*/
|
|
548
|
+
projectId?: string;
|
|
549
|
+
/**
|
|
550
|
+
* Manual playlist configuration - provide your own videos array.
|
|
551
|
+
* When provided, the wrapper will call setup() with the built config
|
|
552
|
+
* instead of relying on auto-initialization.
|
|
553
|
+
*
|
|
554
|
+
* IMPORTANT: This is required for vertical player when you want to
|
|
555
|
+
* supply your own videos (not using GTech admin playlists).
|
|
556
|
+
*
|
|
557
|
+
* @example
|
|
558
|
+
* ```tsx
|
|
559
|
+
* <VPPlayer
|
|
560
|
+
* scriptId="rbqcdwzlg"
|
|
561
|
+
* projectId="agmipnzb"
|
|
562
|
+
* isVertical={true}
|
|
563
|
+
* playlist={{
|
|
564
|
+
* videos: [
|
|
565
|
+
* { videoId: "1", title: "Video 1", file: "https://...mp4", thumbnailUrl: "...", duration: 120 },
|
|
566
|
+
* { videoId: "2", title: "Video 2", file: "https://...mp4", thumbnailUrl: "...", duration: 150 },
|
|
567
|
+
* ],
|
|
568
|
+
* startIndex: 0,
|
|
569
|
+
* }}
|
|
570
|
+
* />
|
|
571
|
+
* ```
|
|
572
|
+
*/
|
|
573
|
+
playlist?: ManualPlaylistConfig;
|
|
574
|
+
/**
|
|
575
|
+
* Custom container ID for the player div
|
|
576
|
+
* Auto-generated if not provided
|
|
577
|
+
*/
|
|
578
|
+
playerId?: string;
|
|
579
|
+
/**
|
|
580
|
+
* Use vertical player script URL builder
|
|
581
|
+
* When true, uses /vertical-player/{scriptId}.js pattern
|
|
582
|
+
*/
|
|
583
|
+
isVertical?: boolean;
|
|
584
|
+
/**
|
|
585
|
+
* Enable Reels/TikTok-style overlay mode
|
|
586
|
+
* Shows thumbnail first, then fullscreen overlay when clicked
|
|
587
|
+
*/
|
|
868
588
|
isReels?: boolean;
|
|
589
|
+
/**
|
|
590
|
+
* Thumbnail URL for Reels mode
|
|
591
|
+
*/
|
|
869
592
|
thumbnailUrl?: string;
|
|
593
|
+
/**
|
|
594
|
+
* Callback when Reels overlay is closed
|
|
595
|
+
*/
|
|
870
596
|
onClose?: () => void;
|
|
871
|
-
|
|
872
|
-
|
|
597
|
+
/**
|
|
598
|
+
* Additional CSS class name for the player container
|
|
599
|
+
*/
|
|
873
600
|
className?: string;
|
|
874
601
|
/**
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
* controls, autoplay, muted, size, and other configuration.
|
|
878
|
-
* Set to false to use legacy behavior with wrapper defaults.
|
|
879
|
-
* @default true
|
|
602
|
+
* CSS classes to hide specific SDK elements
|
|
603
|
+
* @example ['vp-share-button', 'vp-logo']
|
|
880
604
|
*/
|
|
881
|
-
|
|
882
|
-
onPlaylistData?: (videos: PlaylistItem_2[]) => void;
|
|
883
|
-
onVideoStarted?: (videoData: CurrentVideoData_2) => void;
|
|
605
|
+
hiddenClasses?: string[];
|
|
884
606
|
/**
|
|
885
|
-
*
|
|
607
|
+
* Called when the player is ready/initialized
|
|
886
608
|
*/
|
|
887
|
-
|
|
888
|
-
onPlayerStart?: PlayerEventCallbacks_2["onPlayerStart"];
|
|
889
|
-
onPlayerPlay?: PlayerEventCallbacks_2["onPlayerPlay"];
|
|
890
|
-
onPlayerPause?: PlayerEventCallbacks_2["onPlayerPause"];
|
|
891
|
-
onPlayerResume?: PlayerEventCallbacks_2["onPlayerResume"];
|
|
892
|
-
onPlayerEnd?: PlayerEventCallbacks_2["onPlayerEnd"];
|
|
893
|
-
onPlayerProgressEvery10Seconds?: PlayerEventCallbacks_2["onPlayerProgressEvery10Seconds"];
|
|
894
|
-
onPlayerProgressAt20Seconds?: PlayerEventCallbacks_2["onPlayerProgressAt20Seconds"];
|
|
895
|
-
onPlayerQuartile25?: PlayerEventCallbacks_2["onPlayerQuartile25"];
|
|
896
|
-
onPlayerQuartile50?: PlayerEventCallbacks_2["onPlayerQuartile50"];
|
|
897
|
-
onPlayerQuartile75?: PlayerEventCallbacks_2["onPlayerQuartile75"];
|
|
898
|
-
onPlayerNext?: PlayerEventCallbacks_2["onPlayerNext"];
|
|
899
|
-
onPlayerPrevious?: PlayerEventCallbacks_2["onPlayerPrevious"];
|
|
609
|
+
onReady?: () => void;
|
|
900
610
|
/**
|
|
901
|
-
*
|
|
902
|
-
|
|
611
|
+
* Called when playback starts
|
|
612
|
+
*/
|
|
613
|
+
onPlay?: () => void;
|
|
614
|
+
/**
|
|
615
|
+
* Called when playback is paused
|
|
616
|
+
*/
|
|
617
|
+
onPause?: () => void;
|
|
618
|
+
/**
|
|
619
|
+
* Called when playback resumes after pause
|
|
903
620
|
*/
|
|
904
|
-
|
|
621
|
+
onResume?: () => void;
|
|
622
|
+
/**
|
|
623
|
+
* Called when video playback completes
|
|
624
|
+
*/
|
|
625
|
+
onComplete?: () => void;
|
|
626
|
+
/**
|
|
627
|
+
* Called when an error occurs
|
|
628
|
+
*/
|
|
629
|
+
onError?: (error: string) => void;
|
|
630
|
+
/**
|
|
631
|
+
* Called when a video starts playing
|
|
632
|
+
* Provides metadata about the current video
|
|
633
|
+
*/
|
|
634
|
+
onVideoStarted?: (data: CurrentVideoData_2) => void;
|
|
635
|
+
/**
|
|
636
|
+
* Called on time updates during playback
|
|
637
|
+
* @param seconds - Current playback position in seconds
|
|
638
|
+
*/
|
|
639
|
+
onTimeUpdate?: (seconds: number) => void;
|
|
640
|
+
/**
|
|
641
|
+
* Called when playback reaches 25% of video duration
|
|
642
|
+
*/
|
|
643
|
+
onQuartile25?: () => void;
|
|
644
|
+
/**
|
|
645
|
+
* Called when playback reaches 50% of video duration
|
|
646
|
+
*/
|
|
647
|
+
onQuartile50?: () => void;
|
|
648
|
+
/**
|
|
649
|
+
* Called when playback reaches 75% of video duration
|
|
650
|
+
*/
|
|
651
|
+
onQuartile75?: () => void;
|
|
652
|
+
/**
|
|
653
|
+
* Called when transitioning to the next video in playlist
|
|
654
|
+
*/
|
|
655
|
+
onNext?: () => void;
|
|
656
|
+
/**
|
|
657
|
+
* Called when transitioning to the previous video in playlist
|
|
658
|
+
*/
|
|
659
|
+
onPrevious?: () => void;
|
|
660
|
+
/**
|
|
661
|
+
* Called every 10 seconds during playback
|
|
662
|
+
* @param seconds - Current playback position in seconds
|
|
663
|
+
*/
|
|
664
|
+
onProgress10s?: (seconds: number) => void;
|
|
665
|
+
/**
|
|
666
|
+
* Called when playback reaches 20 seconds
|
|
667
|
+
* @param seconds - Current playback position (should be ~20)
|
|
668
|
+
*/
|
|
669
|
+
onProgress20s?: (seconds: number) => void;
|
|
905
670
|
}
|
|
906
671
|
|
|
907
|
-
/**
|
|
908
|
-
* VPPlayerProvider component provides context for managing the VPPlayer state.
|
|
909
|
-
*
|
|
910
|
-
* @function
|
|
911
|
-
* @param {Object} props - The component props.
|
|
912
|
-
* @param {React.ReactNode} props.children - The child components.
|
|
913
|
-
* @returns {JSX.Element} The provider component for VPPlayer.
|
|
914
|
-
*/
|
|
915
|
-
export declare const VPPlayerProvider: default_2.FC<{
|
|
916
|
-
children: default_2.ReactNode;
|
|
917
|
-
}>;
|
|
918
|
-
|
|
919
672
|
export { }
|