@waveform-playlist/browser 8.0.0 → 8.1.0

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
@@ -882,6 +882,8 @@ declare interface PlaybackAnimationContextValue {
882
882
  currentTimeRef: default_2.RefObject<number>;
883
883
  playbackStartTimeRef: default_2.RefObject<number>;
884
884
  audioStartPositionRef: default_2.RefObject<number>;
885
+ /** Returns current playback time from engine (auto-wraps at loop boundaries). */
886
+ getPlaybackTime: () => number;
885
887
  }
886
888
 
887
889
  export declare const PlayButton: default_2.FC<{
@@ -900,9 +902,9 @@ declare interface PlayheadProps {
900
902
  isPlaying: boolean;
901
903
  /** Ref to current time in seconds - use for smooth animation during playback */
902
904
  currentTimeRef: react__default.RefObject<number>;
903
- /** Audio context start time when playback began - for calculating elapsed time */
905
+ /** Audio context start time when playback began. Fallback when getPlaybackTime is not provided. */
904
906
  playbackStartTimeRef: react__default.RefObject<number>;
905
- /** Audio position when playback started - for calculating current position */
907
+ /** Audio position when playback started. Fallback when getPlaybackTime is not provided. */
906
908
  audioStartPositionRef: react__default.RefObject<number>;
907
909
  /** Samples per pixel - for converting time to pixels */
908
910
  samplesPerPixel: number;
@@ -912,6 +914,8 @@ declare interface PlayheadProps {
912
914
  controlsOffset: number;
913
915
  /** Function to get current audio context time - required for smooth animation */
914
916
  getAudioContextTime?: () => number;
917
+ /** Returns current playback time (auto-wraps at loop boundaries). Preferred over manual elapsed calculation. */
918
+ getPlaybackTime?: () => number;
915
919
  }
916
920
 
917
921
  /**