@devix-technologies/react-gjirafa-vp-player 1.0.31-beta.5 → 1.0.31-beta.6
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/dist/index.d.ts +550 -82
- package/dist/react-gjirafa-vp-player.es.js +772 -773
- package/dist/react-gjirafa-vp-player.umd.js +8 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,78 @@ import { VPPlayerInstance as VPPlayerInstance_2 } from '../../../../../../../src
|
|
|
10
10
|
import { VPPlayerProps as VPPlayerProps_2 } from '../../../../../../../src/interfaces';
|
|
11
11
|
import { VPPlayerRef as VPPlayerRef_2 } from '../../../../../../../src/interfaces';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Ad announcement configuration
|
|
15
|
+
*/
|
|
16
|
+
export declare interface AdAnnouncementConfig {
|
|
17
|
+
state: boolean;
|
|
18
|
+
timeBeforeAd: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Ad break configuration
|
|
23
|
+
*/
|
|
24
|
+
export declare interface AdBreak {
|
|
25
|
+
adTagUrl: string[];
|
|
26
|
+
breakType: "preroll" | "midroll" | "postroll";
|
|
27
|
+
breakTimingType: "time" | "percentage" | "playlist";
|
|
28
|
+
breakTimingValue: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Ad function configuration
|
|
33
|
+
*/
|
|
34
|
+
export declare interface AdFunction {
|
|
35
|
+
isDynamicKey: boolean;
|
|
36
|
+
isDynamicValue: boolean;
|
|
37
|
+
key: string;
|
|
38
|
+
order: number;
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Advertising configuration
|
|
44
|
+
*/
|
|
45
|
+
export declare interface AdsConfig {
|
|
46
|
+
skipAd?: AdSkipConfig;
|
|
47
|
+
vmap?: string;
|
|
48
|
+
VPAIDmode?: string;
|
|
49
|
+
enableProgrammability?: boolean;
|
|
50
|
+
functions?: AdFunction[];
|
|
51
|
+
bidding?: boolean;
|
|
52
|
+
afterMidrollBacktrack?: AfterMidrollBacktrack;
|
|
53
|
+
adBreaks?: AdBreak[];
|
|
54
|
+
bidders?: BidderConfig[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Ad skip configuration
|
|
59
|
+
*/
|
|
60
|
+
export declare interface AdSkipConfig {
|
|
61
|
+
state: boolean;
|
|
62
|
+
skipFrom: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Ads localization
|
|
67
|
+
*/
|
|
68
|
+
export declare interface AdsLang {
|
|
69
|
+
ad?: string;
|
|
70
|
+
skip?: string;
|
|
71
|
+
skipIn?: string;
|
|
72
|
+
visit?: string;
|
|
73
|
+
info?: string;
|
|
74
|
+
simultaneousAds?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* After midroll backtrack configuration
|
|
79
|
+
*/
|
|
80
|
+
export declare interface AfterMidrollBacktrack {
|
|
81
|
+
state: boolean;
|
|
82
|
+
seconds: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
13
85
|
/**
|
|
14
86
|
* Appends the divId query parameter to a script URL.
|
|
15
87
|
* This tells the managed script which DOM element to use as the player container.
|
|
@@ -23,6 +95,118 @@ import { VPPlayerRef as VPPlayerRef_2 } from '../../../../../../../src/interface
|
|
|
23
95
|
*/
|
|
24
96
|
export declare const appendDivIdToUrl: (url: string, divId: string) => string;
|
|
25
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Autopause on viewable configuration
|
|
100
|
+
*/
|
|
101
|
+
export declare interface AutopauseOnViewableConfig {
|
|
102
|
+
state: boolean;
|
|
103
|
+
percentageViewable?: number;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Autoplay toggle skin
|
|
108
|
+
*/
|
|
109
|
+
export declare interface AutoplaySkin {
|
|
110
|
+
autoplayOn?: string;
|
|
111
|
+
autoplayOff?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Autostart on load configuration
|
|
116
|
+
*/
|
|
117
|
+
export declare interface AutostartOnLoadConfig {
|
|
118
|
+
state: boolean;
|
|
119
|
+
onMobile?: boolean;
|
|
120
|
+
onData?: boolean;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Autostart on viewable configuration
|
|
125
|
+
*/
|
|
126
|
+
export declare interface AutostartOnViewableConfig {
|
|
127
|
+
state: boolean;
|
|
128
|
+
onMobile?: boolean;
|
|
129
|
+
onData?: boolean;
|
|
130
|
+
percentageViewable?: number;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Bidder configuration
|
|
135
|
+
*/
|
|
136
|
+
export declare interface BidderConfig {
|
|
137
|
+
name: string;
|
|
138
|
+
params: Record<string, string>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Control bar skin configuration
|
|
143
|
+
*/
|
|
144
|
+
export declare interface ControlBarSkin {
|
|
145
|
+
background?: string;
|
|
146
|
+
text?: string;
|
|
147
|
+
icons?: IconsSkin;
|
|
148
|
+
timeslider?: TimesliderSkin;
|
|
149
|
+
volume?: VolumeSkin;
|
|
150
|
+
timesliderOnAd?: TimesliderSkin;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Controls visibility configuration
|
|
155
|
+
*/
|
|
156
|
+
export declare interface ControlsConfig {
|
|
157
|
+
theaterButton?: boolean;
|
|
158
|
+
settingsButton?: boolean;
|
|
159
|
+
chromecastButton?: boolean;
|
|
160
|
+
nextButton?: boolean;
|
|
161
|
+
fullscreenButton?: boolean;
|
|
162
|
+
airplayButton?: boolean;
|
|
163
|
+
bigPlayButton?: boolean;
|
|
164
|
+
pictureInPictureButton?: boolean;
|
|
165
|
+
relatedButton?: boolean;
|
|
166
|
+
volumeButton?: boolean;
|
|
167
|
+
shareButton?: boolean;
|
|
168
|
+
subtitlesButton?: boolean;
|
|
169
|
+
showCaptions?: boolean;
|
|
170
|
+
audioOnlyButton?: boolean;
|
|
171
|
+
rewindButton?: boolean;
|
|
172
|
+
forwardButton?: boolean;
|
|
173
|
+
chaptersButton?: boolean;
|
|
174
|
+
showHelperButton?: boolean | null;
|
|
175
|
+
helperButtonImage?: string;
|
|
176
|
+
showLiveIcon?: boolean | null;
|
|
177
|
+
delayLiveVideosTime?: number;
|
|
178
|
+
delayLiveVideos?: boolean | null;
|
|
179
|
+
showAutoPlay?: boolean | null;
|
|
180
|
+
showQualities?: boolean | null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Controls localization
|
|
185
|
+
*/
|
|
186
|
+
export declare interface ControlsLang {
|
|
187
|
+
play?: string;
|
|
188
|
+
pause?: string;
|
|
189
|
+
next?: string;
|
|
190
|
+
replay?: string;
|
|
191
|
+
volume?: string;
|
|
192
|
+
mute?: string;
|
|
193
|
+
unmute?: string;
|
|
194
|
+
settings?: string;
|
|
195
|
+
theater?: string;
|
|
196
|
+
fullscreen?: string;
|
|
197
|
+
chromecast?: string;
|
|
198
|
+
airplay?: string;
|
|
199
|
+
pictureInPicture?: string;
|
|
200
|
+
related?: string;
|
|
201
|
+
skipIntro?: string;
|
|
202
|
+
skipAd?: string;
|
|
203
|
+
adAnnouncement?: string;
|
|
204
|
+
playlistTitle?: string;
|
|
205
|
+
upNext?: string;
|
|
206
|
+
live?: string;
|
|
207
|
+
continueAfterPause?: string;
|
|
208
|
+
}
|
|
209
|
+
|
|
26
210
|
/**
|
|
27
211
|
* Represents data about the currently playing video.
|
|
28
212
|
* Used in onVideoStarted callback.
|
|
@@ -48,6 +232,20 @@ export declare interface CurrentVideoData {
|
|
|
48
232
|
description?: string;
|
|
49
233
|
}
|
|
50
234
|
|
|
235
|
+
/**
|
|
236
|
+
* VP Player Configuration Types
|
|
237
|
+
*
|
|
238
|
+
* Fully typed configuration based on VP Player documentation.
|
|
239
|
+
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/full-configuration}
|
|
240
|
+
* @see {@link https://vp.gjirafa.tech/documentation/docs/vertical-player/setup-the-player/configration}
|
|
241
|
+
*/
|
|
242
|
+
/**
|
|
243
|
+
* Deep partial utility type - makes all nested properties optional
|
|
244
|
+
*/
|
|
245
|
+
export declare type DeepPartial<T> = T extends object ? {
|
|
246
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
247
|
+
} : T;
|
|
248
|
+
|
|
51
249
|
/**
|
|
52
250
|
* Event callback refs interface for internal use
|
|
53
251
|
* Prevents stale closures in event handlers
|
|
@@ -70,6 +268,28 @@ export declare interface EventCallbackRefs {
|
|
|
70
268
|
onProgress20s?: (seconds: number) => void;
|
|
71
269
|
}
|
|
72
270
|
|
|
271
|
+
/**
|
|
272
|
+
* Float (picture-in-picture) configuration
|
|
273
|
+
*/
|
|
274
|
+
export declare interface FloatConfig {
|
|
275
|
+
state: boolean;
|
|
276
|
+
onMobile?: boolean;
|
|
277
|
+
position?: "TOP_LEFT" | "TOP_RIGHT" | "BOTTOM_LEFT" | "BOTTOM_RIGHT";
|
|
278
|
+
dismissible?: boolean;
|
|
279
|
+
requiresInteraction?: boolean;
|
|
280
|
+
toVideoThreshold?: number;
|
|
281
|
+
toFloatThreshold?: number;
|
|
282
|
+
style?: FloatStyleConfig;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Float style configuration
|
|
287
|
+
*/
|
|
288
|
+
export declare interface FloatStyleConfig {
|
|
289
|
+
width: number;
|
|
290
|
+
border?: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
73
293
|
/**
|
|
74
294
|
* Generates a full player DOM element ID based on provided playerId and videoId.
|
|
75
295
|
* Falls back to "default" if playerId is not provided.
|
|
@@ -117,14 +337,74 @@ export declare const getPlayerScriptUrl: (playerVersion: string) => string;
|
|
|
117
337
|
export declare const getVerticalPlayerScriptUrl: (scriptId: string) => string;
|
|
118
338
|
|
|
119
339
|
/**
|
|
120
|
-
*
|
|
121
|
-
|
|
340
|
+
* Icons skin configuration
|
|
341
|
+
*/
|
|
342
|
+
export declare interface IconsSkin {
|
|
343
|
+
default?: string;
|
|
344
|
+
hover?: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Full localization configuration
|
|
349
|
+
*/
|
|
350
|
+
export declare interface LangConfig {
|
|
351
|
+
locale?: string;
|
|
352
|
+
controls?: ControlsLang;
|
|
353
|
+
settings?: SettingsLang;
|
|
354
|
+
ads?: AdsLang;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Logo configuration
|
|
359
|
+
*/
|
|
360
|
+
export declare interface LogoConfig {
|
|
361
|
+
state: boolean;
|
|
362
|
+
file?: string;
|
|
363
|
+
position?: "TOP_LEFT" | "TOP_RIGHT" | "BOTTOM_LEFT" | "BOTTOM_RIGHT";
|
|
364
|
+
defaultOpacity?: number;
|
|
365
|
+
inactiveOpacity?: number;
|
|
366
|
+
onClickURL?: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Menu background skin
|
|
371
|
+
*/
|
|
372
|
+
export declare interface MenuBackgroundSkin {
|
|
373
|
+
default?: string;
|
|
374
|
+
hover?: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Menu links skin
|
|
379
|
+
*/
|
|
380
|
+
export declare interface MenuLinksSkin {
|
|
381
|
+
default?: string;
|
|
382
|
+
hover?: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Menus skin configuration
|
|
387
|
+
*/
|
|
388
|
+
export declare interface MenusSkin {
|
|
389
|
+
background?: MenuBackgroundSkin;
|
|
390
|
+
links?: MenuLinksSkin;
|
|
391
|
+
autoplay?: AutoplaySkin;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Next video skin configuration
|
|
122
396
|
*/
|
|
123
|
-
export declare interface
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
397
|
+
export declare interface NextVideoSkin {
|
|
398
|
+
background?: string;
|
|
399
|
+
text?: string;
|
|
400
|
+
timeslider?: {
|
|
401
|
+
rail?: string;
|
|
402
|
+
progress?: string;
|
|
403
|
+
};
|
|
404
|
+
icons?: {
|
|
405
|
+
play?: PlayIconSkin;
|
|
406
|
+
close?: string;
|
|
407
|
+
};
|
|
128
408
|
}
|
|
129
409
|
|
|
130
410
|
/**
|
|
@@ -219,6 +499,36 @@ export declare interface PlayerObject {
|
|
|
219
499
|
progress?: number;
|
|
220
500
|
}
|
|
221
501
|
|
|
502
|
+
/**
|
|
503
|
+
* Player settings configuration (the `config` object in VP Player)
|
|
504
|
+
*/
|
|
505
|
+
export declare interface PlayerSettingsConfig {
|
|
506
|
+
configId?: string;
|
|
507
|
+
size?: SizeConfig;
|
|
508
|
+
adAnnouncement?: AdAnnouncementConfig;
|
|
509
|
+
autoplay?: boolean;
|
|
510
|
+
autostartOnLoad?: AutostartOnLoadConfig;
|
|
511
|
+
autostartOnViewable?: AutostartOnViewableConfig;
|
|
512
|
+
autopauseOnViewable?: AutopauseOnViewableConfig;
|
|
513
|
+
pauseOtherVideos?: boolean;
|
|
514
|
+
focusOnAutostart?: boolean;
|
|
515
|
+
showRelatedOnPause?: ShowRelatedOnPauseConfig;
|
|
516
|
+
playbackRates?: number[];
|
|
517
|
+
volume?: number;
|
|
518
|
+
muted?: boolean;
|
|
519
|
+
loop?: boolean;
|
|
520
|
+
casting?: boolean;
|
|
521
|
+
debug?: boolean;
|
|
522
|
+
skipAmount?: number;
|
|
523
|
+
adsRequireInteraction?: boolean;
|
|
524
|
+
float?: FloatConfig;
|
|
525
|
+
controls?: ControlsConfig;
|
|
526
|
+
logo?: LogoConfig;
|
|
527
|
+
socialMedia?: unknown[];
|
|
528
|
+
lang?: LangConfig;
|
|
529
|
+
skin?: SkinConfig;
|
|
530
|
+
}
|
|
531
|
+
|
|
222
532
|
/**
|
|
223
533
|
* Tracking metadata for analytics (available in v1.0.23+)
|
|
224
534
|
*/
|
|
@@ -245,6 +555,14 @@ as?: React.ElementType;
|
|
|
245
555
|
className?: string;
|
|
246
556
|
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
247
557
|
|
|
558
|
+
/**
|
|
559
|
+
* Play icon skin
|
|
560
|
+
*/
|
|
561
|
+
export declare interface PlayIconSkin {
|
|
562
|
+
default?: string;
|
|
563
|
+
hover?: string;
|
|
564
|
+
}
|
|
565
|
+
|
|
248
566
|
/**
|
|
249
567
|
* API response structure for fetching playlist data.
|
|
250
568
|
*
|
|
@@ -254,6 +572,47 @@ export declare interface PlaylistApiResponse {
|
|
|
254
572
|
result: PlaylistItem[];
|
|
255
573
|
}
|
|
256
574
|
|
|
575
|
+
/**
|
|
576
|
+
* Playlist arrows skin
|
|
577
|
+
*/
|
|
578
|
+
export declare interface PlaylistArrowsSkin {
|
|
579
|
+
active?: string;
|
|
580
|
+
inactive?: string;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Playlist card duration skin
|
|
585
|
+
*/
|
|
586
|
+
export declare interface PlaylistCardDurationSkin {
|
|
587
|
+
text?: string;
|
|
588
|
+
background?: string;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Playlist card skin
|
|
593
|
+
*/
|
|
594
|
+
export declare interface PlaylistCardSkin {
|
|
595
|
+
background?: string;
|
|
596
|
+
title?: string;
|
|
597
|
+
duration?: PlaylistCardDurationSkin;
|
|
598
|
+
icons?: {
|
|
599
|
+
play?: PlayIconSkin;
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Playlist configuration
|
|
605
|
+
*/
|
|
606
|
+
export declare interface PlaylistConfig {
|
|
607
|
+
state: boolean;
|
|
608
|
+
playlistId: string;
|
|
609
|
+
playlistVideoIndex: number;
|
|
610
|
+
highlightCurrentVideo?: boolean;
|
|
611
|
+
algorithm?: string;
|
|
612
|
+
title?: string;
|
|
613
|
+
videos: PlaylistVideoConfig[];
|
|
614
|
+
}
|
|
615
|
+
|
|
257
616
|
/**
|
|
258
617
|
* Represents an item in a video playlist.
|
|
259
618
|
*
|
|
@@ -274,35 +633,99 @@ export declare interface PlaylistItem {
|
|
|
274
633
|
}
|
|
275
634
|
|
|
276
635
|
/**
|
|
277
|
-
*
|
|
636
|
+
* Playlist skin configuration
|
|
278
637
|
*/
|
|
279
|
-
export declare interface
|
|
280
|
-
|
|
638
|
+
export declare interface PlaylistSkin {
|
|
639
|
+
background?: string;
|
|
640
|
+
text?: string;
|
|
641
|
+
icons?: {
|
|
642
|
+
arrows?: PlaylistArrowsSkin;
|
|
643
|
+
close?: string;
|
|
644
|
+
};
|
|
645
|
+
card?: PlaylistCardSkin;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Playlist video item in config
|
|
650
|
+
*/
|
|
651
|
+
export declare interface PlaylistVideoConfig {
|
|
281
652
|
videoId: string;
|
|
282
|
-
/** Video title */
|
|
283
653
|
title: string;
|
|
284
|
-
/** Video file URL (mp4, m3u8, etc.) */
|
|
285
654
|
file: string;
|
|
286
|
-
/** Alternative: HLS URL */
|
|
287
|
-
hlsUrl?: string;
|
|
288
|
-
/** Thumbnail image URL */
|
|
289
655
|
thumbnailUrl?: string;
|
|
290
|
-
/** Alternative: Thumbnail URL */
|
|
291
|
-
thumbnail?: string;
|
|
292
|
-
/** Video duration in seconds */
|
|
293
656
|
duration?: number;
|
|
294
657
|
}
|
|
295
658
|
|
|
659
|
+
/**
|
|
660
|
+
* Settings localization
|
|
661
|
+
*/
|
|
662
|
+
export declare interface SettingsLang {
|
|
663
|
+
quality?: string;
|
|
664
|
+
subtitles?: string;
|
|
665
|
+
autoplay?: string;
|
|
666
|
+
playbackRate?: string;
|
|
667
|
+
auto?: string;
|
|
668
|
+
off?: string;
|
|
669
|
+
normal?: string;
|
|
670
|
+
share?: string;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Show related on pause configuration
|
|
675
|
+
*/
|
|
676
|
+
export declare interface ShowRelatedOnPauseConfig {
|
|
677
|
+
state: boolean;
|
|
678
|
+
onMobile?: boolean;
|
|
679
|
+
from?: number;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Size configuration
|
|
684
|
+
*/
|
|
685
|
+
export declare interface SizeConfig {
|
|
686
|
+
sizeType: "RESPONSIVE" | "FIXED";
|
|
687
|
+
aspectRatio?: "16:9" | "9:16" | "4:3" | "1:1";
|
|
688
|
+
width?: number;
|
|
689
|
+
height?: number;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Full skin configuration
|
|
694
|
+
*/
|
|
695
|
+
export declare interface SkinConfig {
|
|
696
|
+
controlBar?: ControlBarSkin;
|
|
697
|
+
menus?: MenusSkin;
|
|
698
|
+
nextVideo?: NextVideoSkin;
|
|
699
|
+
playlist?: PlaylistSkin;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Skip intro configuration
|
|
704
|
+
*/
|
|
705
|
+
export declare interface SkipIntroConfig {
|
|
706
|
+
state: boolean;
|
|
707
|
+
skipFrom: number;
|
|
708
|
+
skipTo: number;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Timeslider skin configuration
|
|
713
|
+
*/
|
|
714
|
+
export declare interface TimesliderSkin {
|
|
715
|
+
progress?: string;
|
|
716
|
+
rail?: string;
|
|
717
|
+
buffer?: string | null;
|
|
718
|
+
dragger?: string;
|
|
719
|
+
}
|
|
720
|
+
|
|
296
721
|
/**
|
|
297
722
|
* VP Player logic hook
|
|
298
723
|
*
|
|
299
724
|
* Supports two modes:
|
|
300
725
|
* 1. **Auto-init mode** (default): Load managed script that auto-initializes with GTech admin config
|
|
301
|
-
* 2. **
|
|
302
|
-
*
|
|
303
|
-
* The manual playlist mode is required for vertical player when supplying your own videos.
|
|
726
|
+
* 2. **Config override mode**: Fetch config, merge user overrides, and call setup()
|
|
304
727
|
*/
|
|
305
|
-
export declare const useVPPlayerLogic: ({ scriptId, videoId, scriptUrl, projectId,
|
|
728
|
+
export declare const useVPPlayerLogic: ({ scriptId, videoId, scriptUrl, projectId, config, playerId, isVertical, isReels, onReady, onPlay, onPause, onResume, onComplete, onError, onVideoStarted, onTimeUpdate, onQuartile25, onQuartile50, onQuartile75, onNext, onPrevious, onProgress10s, onProgress20s, }: VPPlayerProps_2) => {
|
|
306
729
|
playerRef: RefObject<HTMLDivElement | null>;
|
|
307
730
|
playerInstanceRef: RefObject<VPPlayerInstance_2 | null>;
|
|
308
731
|
isScriptLoaded: boolean;
|
|
@@ -347,6 +770,33 @@ export declare interface VideoApiResponse {
|
|
|
347
770
|
};
|
|
348
771
|
}
|
|
349
772
|
|
|
773
|
+
/**
|
|
774
|
+
* Video configuration
|
|
775
|
+
*/
|
|
776
|
+
export declare interface VideoConfig {
|
|
777
|
+
videoId?: string;
|
|
778
|
+
assetId?: string;
|
|
779
|
+
fpsCertificateUrl?: string;
|
|
780
|
+
widevineLicenseUrl?: string;
|
|
781
|
+
related?: string;
|
|
782
|
+
file?: string;
|
|
783
|
+
title?: string;
|
|
784
|
+
duration?: number;
|
|
785
|
+
description?: string;
|
|
786
|
+
live?: boolean;
|
|
787
|
+
liveType?: string;
|
|
788
|
+
thumbnail?: string;
|
|
789
|
+
filmstrip?: string;
|
|
790
|
+
tracks?: unknown[];
|
|
791
|
+
startTime?: number;
|
|
792
|
+
skipIntro?: SkipIntroConfig;
|
|
793
|
+
flags?: VideoFlag[];
|
|
794
|
+
playlist?: PlaylistConfig;
|
|
795
|
+
advertising?: boolean;
|
|
796
|
+
adId?: string;
|
|
797
|
+
ads?: AdsConfig;
|
|
798
|
+
}
|
|
799
|
+
|
|
350
800
|
/**
|
|
351
801
|
* Result structure returned by the video data fetching logic.
|
|
352
802
|
*
|
|
@@ -359,17 +809,34 @@ export declare interface VideoDataResult {
|
|
|
359
809
|
error: string | null;
|
|
360
810
|
}
|
|
361
811
|
|
|
812
|
+
/**
|
|
813
|
+
* Video flag/tag
|
|
814
|
+
*/
|
|
815
|
+
export declare interface VideoFlag {
|
|
816
|
+
id: number;
|
|
817
|
+
name: string;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Volume skin configuration
|
|
822
|
+
*/
|
|
823
|
+
export declare interface VolumeSkin {
|
|
824
|
+
dragger?: string;
|
|
825
|
+
progress?: string;
|
|
826
|
+
rail?: string;
|
|
827
|
+
notifier?: string;
|
|
828
|
+
}
|
|
829
|
+
|
|
362
830
|
/**
|
|
363
831
|
* Base URL for the VP Player host.
|
|
364
832
|
*/
|
|
365
833
|
export declare const VP_PLAYER_BASE_URL = "https://host.vpplayer.tech";
|
|
366
834
|
|
|
367
835
|
/**
|
|
368
|
-
* VP Player Component
|
|
836
|
+
* VP Player Component
|
|
369
837
|
*
|
|
370
838
|
* A thin React wrapper for the GTech VP Player.
|
|
371
|
-
*
|
|
372
|
-
* this wrapper just provides a DOM container, loads the script, and exposes events.
|
|
839
|
+
* Configuration can be managed through the GTech admin panel or via the `config` prop.
|
|
373
840
|
*
|
|
374
841
|
* ## Basic Usage
|
|
375
842
|
*
|
|
@@ -405,23 +872,25 @@ export declare const VP_PLAYER_BASE_URL = "https://host.vpplayer.tech";
|
|
|
405
872
|
* console.log(playerRef.current?.getPosition());
|
|
406
873
|
* ```
|
|
407
874
|
*
|
|
408
|
-
* ##
|
|
875
|
+
* ## Config Override Mode
|
|
409
876
|
*
|
|
410
|
-
*
|
|
877
|
+
* Override the fetched configuration with custom settings:
|
|
411
878
|
*
|
|
412
879
|
* ```tsx
|
|
413
880
|
* <VPPlayer
|
|
414
|
-
* scriptId="
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
881
|
+
* scriptId="ptkzurnx"
|
|
882
|
+
* videoId="vjsobqhe"
|
|
883
|
+
* config={{
|
|
884
|
+
* config: {
|
|
885
|
+
* muted: true,
|
|
886
|
+
* autoplay: true,
|
|
887
|
+
* skin: {
|
|
888
|
+
* controlBar: {
|
|
889
|
+
* background: 'rgba(0,0,0,0.8)'
|
|
890
|
+
* }
|
|
891
|
+
* }
|
|
892
|
+
* }
|
|
423
893
|
* }}
|
|
424
|
-
* onNext={() => console.log('Next video')}
|
|
425
894
|
* />
|
|
426
895
|
* ```
|
|
427
896
|
*
|
|
@@ -444,33 +913,14 @@ export declare const VP_PLAYER_BASE_URL = "https://host.vpplayer.tech";
|
|
|
444
913
|
export declare const VPPlayer: ForwardRefExoticComponent<VPPlayerProps_2 & RefAttributes<VPPlayerRef_2>>;
|
|
445
914
|
|
|
446
915
|
/**
|
|
447
|
-
* VP Player
|
|
448
|
-
*
|
|
449
|
-
* NOTE: In v2.0.0, configuration is managed through the GTech admin panel.
|
|
450
|
-
* These types are kept for reference only - the React wrapper does NOT
|
|
451
|
-
* pass configuration to the SDK. The managed script auto-initializes
|
|
452
|
-
* with all settings from the admin panel.
|
|
453
|
-
*
|
|
454
|
-
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/configuration}
|
|
455
|
-
*/
|
|
456
|
-
/**
|
|
457
|
-
* Advertising configuration interface (reference only)
|
|
458
|
-
* Configured through GTech admin panel
|
|
916
|
+
* Full VP Player configuration
|
|
917
|
+
* This is the root configuration object passed to vpPlayer().setup()
|
|
459
918
|
*/
|
|
460
|
-
export declare interface
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
vmap?: string;
|
|
466
|
-
VPAIDmode?: string;
|
|
467
|
-
enableProgrammability?: boolean;
|
|
468
|
-
adBreaks?: Array<{
|
|
469
|
-
adTagUrl: string[];
|
|
470
|
-
breakType?: "preroll" | "midroll" | "postroll";
|
|
471
|
-
breakTimingType?: "time" | "percentage" | "playlist";
|
|
472
|
-
breakTimingValue?: number;
|
|
473
|
-
}>;
|
|
919
|
+
export declare interface VPPlayerConfig {
|
|
920
|
+
projectId?: string;
|
|
921
|
+
biskoId?: string;
|
|
922
|
+
video?: VideoConfig;
|
|
923
|
+
config?: PlayerSettingsConfig;
|
|
474
924
|
}
|
|
475
925
|
|
|
476
926
|
/**
|
|
@@ -540,10 +990,10 @@ export declare interface VPPlayerInstance {
|
|
|
540
990
|
}
|
|
541
991
|
|
|
542
992
|
/**
|
|
543
|
-
* Simplified props interface for VPPlayer
|
|
993
|
+
* Simplified props interface for VPPlayer
|
|
544
994
|
*
|
|
545
|
-
* The wrapper is
|
|
546
|
-
*
|
|
995
|
+
* The wrapper is a thin bridge to the GTech JS player.
|
|
996
|
+
* Configuration can be managed through the GTech admin panel or via the `config` prop.
|
|
547
997
|
*
|
|
548
998
|
* @interface VPPlayerProps
|
|
549
999
|
*/
|
|
@@ -564,34 +1014,42 @@ export declare interface VPPlayerProps {
|
|
|
564
1014
|
*/
|
|
565
1015
|
scriptUrl?: string;
|
|
566
1016
|
/**
|
|
567
|
-
* GTech project ID
|
|
1017
|
+
* GTech project ID
|
|
1018
|
+
* Convenience prop that gets merged into config.projectId
|
|
1019
|
+
* Can also be set directly in the config prop
|
|
568
1020
|
*/
|
|
569
1021
|
projectId?: string;
|
|
570
1022
|
/**
|
|
571
|
-
*
|
|
572
|
-
* When provided, the wrapper will
|
|
573
|
-
*
|
|
1023
|
+
* Player configuration overrides.
|
|
1024
|
+
* When provided, the wrapper will:
|
|
1025
|
+
* 1. Try to fetch the JSON config from VP Player API
|
|
1026
|
+
* 2. Deep merge your overrides into the fetched config
|
|
1027
|
+
* 3. Call setup() with the merged configuration
|
|
574
1028
|
*
|
|
575
|
-
*
|
|
576
|
-
* supply your own videos (not using GTech admin playlists).
|
|
1029
|
+
* If fetch fails, your config will be used directly.
|
|
577
1030
|
*
|
|
578
1031
|
* @example
|
|
579
1032
|
* ```tsx
|
|
580
1033
|
* <VPPlayer
|
|
581
|
-
* scriptId="
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
1034
|
+
* scriptId="ptkzurnx"
|
|
1035
|
+
* videoId="vjsobqhe"
|
|
1036
|
+
* config={{
|
|
1037
|
+
* config: {
|
|
1038
|
+
* muted: true,
|
|
1039
|
+
* autoplay: true,
|
|
1040
|
+
* skin: {
|
|
1041
|
+
* controlBar: {
|
|
1042
|
+
* background: 'rgba(0,0,0,0.8)'
|
|
1043
|
+
* }
|
|
1044
|
+
* }
|
|
1045
|
+
* }
|
|
590
1046
|
* }}
|
|
591
1047
|
* />
|
|
592
1048
|
* ```
|
|
1049
|
+
*
|
|
1050
|
+
* @see {@link https://vp.gjirafa.tech/documentation/docs/web-player/setup-the-player/full-configuration}
|
|
593
1051
|
*/
|
|
594
|
-
|
|
1052
|
+
config?: DeepPartial<VPPlayerConfig>;
|
|
595
1053
|
/**
|
|
596
1054
|
* Custom container ID for the player div
|
|
597
1055
|
* Auto-generated if not provided
|
|
@@ -728,4 +1186,14 @@ export declare interface VPPlayerRef {
|
|
|
728
1186
|
isFullscreen: () => boolean;
|
|
729
1187
|
}
|
|
730
1188
|
|
|
1189
|
+
/**
|
|
1190
|
+
* VP Vertical Player configuration
|
|
1191
|
+
* Similar to VPPlayerConfig but optimized for vertical video
|
|
1192
|
+
*/
|
|
1193
|
+
export declare interface VPVerticalPlayerConfig {
|
|
1194
|
+
projectId?: string;
|
|
1195
|
+
video?: VideoConfig;
|
|
1196
|
+
config?: PlayerSettingsConfig;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
731
1199
|
export { }
|