@devix-technologies/react-gjirafa-vp-player 1.0.31-beta.18 → 1.0.31-beta.19

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 CHANGED
@@ -6,6 +6,7 @@ import { RefAttributes } from 'react';
6
6
  import { RefObject } from 'react';
7
7
  import { StyledComponent } from '@emotion/styled';
8
8
  import { Theme } from '@emotion/react';
9
+ import { VideoLockingConfig as VideoLockingConfig_2 } from '../../../../../../../src/interfaces';
9
10
  import { VPPlayerInstance as VPPlayerInstance_2 } from '../../../../../../../src/interfaces';
10
11
  import { VPPlayerProps as VPPlayerProps_2 } from '../../../../../../../src/interfaces';
11
12
  import { VPPlayerRef as VPPlayerRef_2 } from '../../../../../../../src/interfaces';
@@ -267,6 +268,7 @@ export declare interface EventCallbackRefs {
267
268
  onPrevious?: (currentTime: number) => void;
268
269
  onProgress10s?: (seconds: number) => void;
269
270
  onProgress20s?: (seconds: number) => void;
271
+ onPlaylistItem?: (data: CurrentVideoData_2) => void;
270
272
  }
271
273
 
272
274
  /**
@@ -726,13 +728,15 @@ export declare interface TimesliderSkin {
726
728
  * 1. **Auto-init mode** (default): Load managed script that auto-initializes with GTech admin config
727
729
  * 2. **Config override mode**: Fetch config, merge user overrides, and call setup()
728
730
  */
729
- 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) => {
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, }: VPPlayerProps_2) => {
730
732
  playerRef: RefObject<HTMLDivElement | null>;
731
733
  playerInstanceRef: RefObject<VPPlayerInstance_2 | null>;
732
734
  isScriptLoaded: boolean;
733
735
  isLoading: boolean;
734
736
  error: string | null;
735
737
  generatedPlayerId: string;
738
+ isInPlaylistTransitionRef: RefObject<boolean>;
739
+ pendingVideoLockingRef: RefObject<VideoLockingConfig_2 | null>;
736
740
  };
737
741
 
738
742
  /**
@@ -818,6 +822,12 @@ export declare interface VideoFlag {
818
822
  name: string;
819
823
  }
820
824
 
825
+ export declare interface VideoLockingConfig {
826
+ isEnabled: boolean;
827
+ type: "seconds" | "percentage";
828
+ value: number;
829
+ }
830
+
821
831
  /**
822
832
  * Volume skin configuration
823
833
  */
@@ -936,7 +946,7 @@ export declare interface VPPlayerConfig {
936
946
  * @interface VPPlayerInstance
937
947
  */
938
948
  export declare interface VPPlayerInstance {
939
- setup: (config: unknown) => void;
949
+ setup: (config: unknown) => Promise<void> | void;
940
950
  destroy?: () => void;
941
951
  play?: () => void;
942
952
  pause?: () => void;
@@ -974,6 +984,7 @@ export declare interface VPPlayerInstance {
974
984
  setCurrentQuality?: (index: number) => void;
975
985
  setLevelToAuto?: () => void;
976
986
  setCuePoint?: (cue: number, callback: () => void) => void;
987
+ setVideoLocking?: (config: VideoLockingConfig) => void;
977
988
  on?: (event: string, callback: (data?: unknown) => void) => void;
978
989
  off?: (event: string, callback?: (data?: unknown) => void) => void;
979
990
  videoIndex?: number;
@@ -1151,6 +1162,12 @@ export declare interface VPPlayerProps {
1151
1162
  * @param seconds - Current playback position (should be ~20)
1152
1163
  */
1153
1164
  onProgress20s?: (seconds: number) => void;
1165
+ /**
1166
+ * Called when the active playlist item changes (horizontal player only)
1167
+ * Fires reliably for all playlist transitions, including auto-advance
1168
+ * @param data - Video metadata for the new playlist item
1169
+ */
1170
+ onPlaylistItem?: (data: CurrentVideoData_2) => void;
1154
1171
  }
1155
1172
 
1156
1173
  /**
@@ -1189,6 +1206,11 @@ export declare interface VPPlayerRef {
1189
1206
  isPlaying: () => boolean;
1190
1207
  isPaused: () => boolean;
1191
1208
  isFullscreen: () => boolean;
1209
+ /**
1210
+ * Set video locking configuration dynamically.
1211
+ * This is the correct way to enable/disable video locking after the player has started.
1212
+ */
1213
+ setVideoLocking: (config: VideoLockingConfig) => void;
1192
1214
  }
1193
1215
 
1194
1216
  /**