@devix-technologies/react-gjirafa-vp-player 1.0.31-beta.0 → 1.0.31-beta.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.
- package/dist/index.d.ts +25 -3
- package/dist/react-gjirafa-vp-player.es.js +905 -822
- package/dist/react-gjirafa-vp-player.umd.js +9 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare const BIG_BUCK_BUNNY_URL = "http://commondatastorage.googleapis.c
|
|
|
49
49
|
* @returns {VPPlayerConfig} - The final configuration object for the player
|
|
50
50
|
* @throws {Error} - Throws error if no valid video source is found
|
|
51
51
|
*/
|
|
52
|
-
export declare const buildVPPlayerConfig: ({ videoUrl, projectId, config, isVerticalPlayer, }: ConfigBuilderOptions) => VPPlayerConfig_2;
|
|
52
|
+
export declare const buildVPPlayerConfig: ({ videoUrl, projectId, config, isVerticalPlayer, pureMode, }: ConfigBuilderOptions) => VPPlayerConfig_2;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Interface for options used in building the VP Player configuration.
|
|
@@ -61,6 +61,11 @@ declare interface ConfigBuilderOptions {
|
|
|
61
61
|
projectId?: string;
|
|
62
62
|
config?: Partial<VPPlayerConfig_2>;
|
|
63
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;
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
/**
|
|
@@ -244,6 +249,14 @@ export declare interface PlayerParams {
|
|
|
244
249
|
isReels?: boolean;
|
|
245
250
|
hiddenClasses?: string[];
|
|
246
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;
|
|
247
260
|
onPlaylistData?: (videos: PlaylistItem_2[]) => void;
|
|
248
261
|
}
|
|
249
262
|
|
|
@@ -334,7 +347,7 @@ export declare const useVPPlayer: () => VPPlayerContextType_2;
|
|
|
334
347
|
* Custom hook to manage VP Player logic.
|
|
335
348
|
* Uses native SDK events instead of manual progress tracking.
|
|
336
349
|
*/
|
|
337
|
-
export declare const useVPPlayerLogic: ({ playerId, videoId: propVideoId, version, videoUrl, projectId, playlistId, scriptUrl, config, isReels, onPlaylistData, onVideoStarted, onPlayerStart, onPlayerPlay, onPlayerPause, onPlayerResume, onPlayerEnd, onPlayerProgressEvery10Seconds, onPlayerProgressAt20Seconds, onPlayerQuartile25, onPlayerQuartile50, onPlayerQuartile75, onPlayerNext, onPlayerPrevious, onPlayerEvent, }: VPPlayerProps_2) => {
|
|
350
|
+
export declare const useVPPlayerLogic: ({ playerId, videoId: propVideoId, version, videoUrl, projectId, playlistId, scriptUrl, config, isReels, pureMode, onPlaylistData, onVideoStarted, onPlayerStart, onPlayerPlay, onPlayerPause, onPlayerResume, onPlayerEnd, onPlayerProgressEvery10Seconds, onPlayerProgressAt20Seconds, onPlayerQuartile25, onPlayerQuartile50, onPlayerQuartile75, onPlayerNext, onPlayerPrevious, onPlayerEvent, }: VPPlayerProps_2) => {
|
|
338
351
|
playerRef: RefObject<HTMLDivElement | null>;
|
|
339
352
|
playerInstanceRef: RefObject<VPPlayerInstance_2 | null>;
|
|
340
353
|
isScriptLoaded: boolean;
|
|
@@ -425,9 +438,10 @@ export declare interface VideoDataResult {
|
|
|
425
438
|
* @param {function} [props.onPlayerQuartile75] - Callback triggered at 75% quartile.
|
|
426
439
|
* @param {function} [props.onPlayerNext] - Callback triggered when the player goes to the next video.
|
|
427
440
|
* @param {function} [props.onPlayerEvent] - Callback triggered for all events.
|
|
441
|
+
* @param {boolean} [props.pureMode=true] - When true (default), skips wrapper defaults and uses GTech admin config.
|
|
428
442
|
* @returns {JSX.Element} The rendered video player component.
|
|
429
443
|
*/
|
|
430
|
-
export declare const VPPlayer: ({ playerId, videoId, version, videoUrl, projectId, playlistId, scriptUrl, config, isReels, hiddenClasses, onClose, className, onPlaylistData, onVideoStarted, trackingMetadata, onPlayerStart, onPlayerPlay, onPlayerPause, onPlayerResume, onPlayerEnd, onPlayerProgressEvery10Seconds, onPlayerProgressAt20Seconds, onPlayerQuartile25, onPlayerQuartile50, onPlayerQuartile75, onPlayerNext, onPlayerPrevious, onPlayerEvent, }: VPPlayerProps_2 & {
|
|
444
|
+
export declare const VPPlayer: ({ playerId, videoId, version, videoUrl, projectId, playlistId, scriptUrl, config, isReels, pureMode, hiddenClasses, onClose, className, onPlaylistData, onVideoStarted, trackingMetadata, onPlayerStart, onPlayerPlay, onPlayerPause, onPlayerResume, onPlayerEnd, onPlayerProgressEvery10Seconds, onPlayerProgressAt20Seconds, onPlayerQuartile25, onPlayerQuartile50, onPlayerQuartile75, onPlayerNext, onPlayerPrevious, onPlayerEvent, }: VPPlayerProps_2 & {
|
|
431
445
|
className?: string;
|
|
432
446
|
}) => JSX.Element;
|
|
433
447
|
|
|
@@ -857,6 +871,14 @@ export declare interface VPPlayerProps {
|
|
|
857
871
|
hiddenClasses?: string[];
|
|
858
872
|
isPlayerVisible?: boolean;
|
|
859
873
|
className?: string;
|
|
874
|
+
/**
|
|
875
|
+
* When true (default), skips all wrapper defaults and passes only minimal config to the SDK.
|
|
876
|
+
* This lets the GTech admin panel settings be the source of truth for
|
|
877
|
+
* controls, autoplay, muted, size, and other configuration.
|
|
878
|
+
* Set to false to use legacy behavior with wrapper defaults.
|
|
879
|
+
* @default true
|
|
880
|
+
*/
|
|
881
|
+
pureMode?: boolean;
|
|
860
882
|
onPlaylistData?: (videos: PlaylistItem_2[]) => void;
|
|
861
883
|
onVideoStarted?: (videoData: CurrentVideoData_2) => void;
|
|
862
884
|
/**
|