@devix-technologies/react-gjirafa-vp-player 1.0.31-beta.22 → 1.0.31-beta.24
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 +13 -1
- package/dist/react-gjirafa-vp-player.es.js +851 -837
- package/dist/react-gjirafa-vp-player.umd.js +8 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -728,7 +728,7 @@ export declare interface TimesliderSkin {
|
|
|
728
728
|
* 1. **Auto-init mode** (default): Load managed script that auto-initializes with GTech admin config
|
|
729
729
|
* 2. **Config override mode**: Fetch config, merge user overrides, and call setup()
|
|
730
730
|
*/
|
|
731
|
-
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, onPlaylistItem, onVideoSwitch, }: VPPlayerProps_2) => {
|
|
731
|
+
export declare const useVPPlayerLogic: ({ scriptId, videoId, scriptUrl, projectId, userId, config, playerId, isVertical, isReels, onReady, onPlay, onPause, onResume, onComplete, onError, onVideoStarted, onTimeUpdate, onQuartile25, onQuartile50, onQuartile75, onNext, onPrevious, onProgress10s, onProgress20s, onPlaylistItem, onVideoSwitch, }: VPPlayerProps_2) => {
|
|
732
732
|
playerRef: RefObject<HTMLDivElement | null>;
|
|
733
733
|
playerInstanceRef: RefObject<VPPlayerInstance_2 | null>;
|
|
734
734
|
isScriptLoaded: boolean;
|
|
@@ -990,6 +990,7 @@ export declare interface VPPlayerInstance {
|
|
|
990
990
|
setVideoLocking?: (config: VideoLockingConfig) => void;
|
|
991
991
|
removeVideoLock?: () => void;
|
|
992
992
|
shouldLockVideo?: () => VideoLockingConfig;
|
|
993
|
+
setUserId?: (userId: string, save?: boolean) => boolean;
|
|
993
994
|
on?: (event: string, callback: (data?: unknown) => void) => void;
|
|
994
995
|
off?: (event: string, callback?: (data?: unknown) => void) => void;
|
|
995
996
|
videoIndex?: number;
|
|
@@ -1036,6 +1037,12 @@ export declare interface VPPlayerProps {
|
|
|
1036
1037
|
* Can also be set directly in the config prop
|
|
1037
1038
|
*/
|
|
1038
1039
|
projectId?: string;
|
|
1040
|
+
/**
|
|
1041
|
+
* User ID for analytics and continue watching.
|
|
1042
|
+
* When provided, calls player.setUserId(userId, true) after initialization,
|
|
1043
|
+
* enabling automatic resume from last watched position.
|
|
1044
|
+
*/
|
|
1045
|
+
userId?: string;
|
|
1039
1046
|
/**
|
|
1040
1047
|
* Player configuration overrides.
|
|
1041
1048
|
* When provided, the wrapper will:
|
|
@@ -1231,6 +1238,11 @@ export declare interface VPPlayerRef {
|
|
|
1231
1238
|
* Imperatively set the video lock config. Use this to apply lock after video switch.
|
|
1232
1239
|
*/
|
|
1233
1240
|
setVideoLocking: (config: VideoLockingConfig) => void;
|
|
1241
|
+
/**
|
|
1242
|
+
* Set user ID for analytics and continue watching.
|
|
1243
|
+
* When save is true, persists to localStorage for future sessions.
|
|
1244
|
+
*/
|
|
1245
|
+
setUserId: (userId: string, save?: boolean) => boolean;
|
|
1234
1246
|
}
|
|
1235
1247
|
|
|
1236
1248
|
/**
|