@waveform-playlist/browser 9.5.1 → 10.0.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 +61 -9
- package/dist/index.js +158 -107
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4816 -4459
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -18
- package/LICENSE.md +0 -21
package/dist/index.d.ts
CHANGED
|
@@ -1146,6 +1146,8 @@ declare interface PlaylistStateContextValue {
|
|
|
1146
1146
|
selectedTrackId: string | null;
|
|
1147
1147
|
loopStart: number;
|
|
1148
1148
|
loopEnd: number;
|
|
1149
|
+
/** Whether playback continues past the end of loaded audio */
|
|
1150
|
+
indefinitePlayback: boolean;
|
|
1149
1151
|
}
|
|
1150
1152
|
|
|
1151
1153
|
/**
|
|
@@ -1908,21 +1910,18 @@ export declare interface UseExportWavReturn {
|
|
|
1908
1910
|
*
|
|
1909
1911
|
* @example
|
|
1910
1912
|
* ```tsx
|
|
1911
|
-
* const { splitClipAtPlayhead } = useClipSplitting({ ... });
|
|
1912
|
-
*
|
|
1913
1913
|
* useKeyboardShortcuts({
|
|
1914
1914
|
* shortcuts: [
|
|
1915
1915
|
* {
|
|
1916
|
-
* key: '
|
|
1917
|
-
* action:
|
|
1918
|
-
* description: '
|
|
1916
|
+
* key: ' ',
|
|
1917
|
+
* action: togglePlayPause,
|
|
1918
|
+
* description: 'Play/Pause',
|
|
1919
1919
|
* preventDefault: true,
|
|
1920
1920
|
* },
|
|
1921
1921
|
* {
|
|
1922
|
-
* key: '
|
|
1923
|
-
*
|
|
1924
|
-
*
|
|
1925
|
-
* description: 'Split at selection boundaries',
|
|
1922
|
+
* key: 's',
|
|
1923
|
+
* action: splitClipAtPlayhead,
|
|
1924
|
+
* description: 'Split clip at playhead',
|
|
1926
1925
|
* preventDefault: true,
|
|
1927
1926
|
* },
|
|
1928
1927
|
* ],
|
|
@@ -1971,6 +1970,55 @@ export declare const useMediaElementData: () => MediaElementDataContextValue;
|
|
|
1971
1970
|
|
|
1972
1971
|
export declare const useMediaElementState: () => MediaElementStateContextValue;
|
|
1973
1972
|
|
|
1973
|
+
export declare function useOutputMeter(options?: UseOutputMeterOptions): UseOutputMeterReturn;
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* Hook for monitoring master output levels
|
|
1977
|
+
*
|
|
1978
|
+
* Connects an AudioWorklet meter processor to the Destination node for
|
|
1979
|
+
* real-time output level monitoring. Computes sample-accurate peak and
|
|
1980
|
+
* RMS via the meter worklet — no transient is missed.
|
|
1981
|
+
*
|
|
1982
|
+
* IMPORTANT: Uses getGlobalContext() from playout to ensure the meter
|
|
1983
|
+
* is created on the same AudioContext as the audio engine. Tone.js's
|
|
1984
|
+
* getContext()/getDestination() return the DEFAULT context, which is
|
|
1985
|
+
* replaced when getGlobalContext() calls setContext() on first audio init.
|
|
1986
|
+
*/
|
|
1987
|
+
export declare interface UseOutputMeterOptions {
|
|
1988
|
+
/**
|
|
1989
|
+
* Number of channels to meter.
|
|
1990
|
+
* Default: 2 (stereo output)
|
|
1991
|
+
*/
|
|
1992
|
+
channelCount?: number;
|
|
1993
|
+
/**
|
|
1994
|
+
* How often to update the levels (in Hz).
|
|
1995
|
+
* Default: 60 (60fps)
|
|
1996
|
+
*/
|
|
1997
|
+
updateRate?: number;
|
|
1998
|
+
/**
|
|
1999
|
+
* Whether audio is currently playing. When this transitions to false,
|
|
2000
|
+
* all levels (current, peak, RMS) and smoothed state are reset to zero.
|
|
2001
|
+
* Without this, the browser's tail-time optimization stops calling the
|
|
2002
|
+
* worklet's process() when no audio flows, leaving the last non-zero
|
|
2003
|
+
* levels frozen in state.
|
|
2004
|
+
* Default: false
|
|
2005
|
+
*/
|
|
2006
|
+
isPlaying?: boolean;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
export declare interface UseOutputMeterReturn {
|
|
2010
|
+
/** Per-channel peak output levels (0-1) */
|
|
2011
|
+
levels: number[];
|
|
2012
|
+
/** Per-channel held peak levels (0-1) */
|
|
2013
|
+
peakLevels: number[];
|
|
2014
|
+
/** Per-channel RMS output levels (0-1) */
|
|
2015
|
+
rmsLevels: number[];
|
|
2016
|
+
/** Reset all held peak levels to 0 */
|
|
2017
|
+
resetPeak: () => void;
|
|
2018
|
+
/** Error from meter setup (worklet load failure, context issues, etc.) */
|
|
2019
|
+
error: Error | null;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
1974
2022
|
export declare const usePlaybackAnimation: () => PlaybackAnimationContextValue;
|
|
1975
2023
|
|
|
1976
2024
|
/**
|
|
@@ -2248,6 +2296,9 @@ declare interface WaveformPlaylistProviderProps {
|
|
|
2248
2296
|
* Use this during progressive loading to avoid rebuilding the engine for
|
|
2249
2297
|
* each track — flip to false when all tracks are ready for a single build. */
|
|
2250
2298
|
deferEngineRebuild?: boolean;
|
|
2299
|
+
/** Disable automatic stop when the cursor reaches the end of the longest
|
|
2300
|
+
* track. Useful for DAW-style recording beyond existing audio. */
|
|
2301
|
+
indefinitePlayback?: boolean;
|
|
2251
2302
|
children: ReactNode;
|
|
2252
2303
|
}
|
|
2253
2304
|
|
|
@@ -2259,6 +2310,7 @@ declare interface WaveformPlaylistTheme {
|
|
|
2259
2310
|
selectedWaveOutlineColor: WaveformColor;
|
|
2260
2311
|
selectedWaveFillColor: WaveformColor;
|
|
2261
2312
|
selectedTrackControlsBackground: string;
|
|
2313
|
+
selectedTrackBackground: string;
|
|
2262
2314
|
timeColor: string;
|
|
2263
2315
|
timescaleBackgroundColor: string;
|
|
2264
2316
|
playheadColor: string;
|