@waveform-playlist/browser 14.0.0 → 15.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.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -13
- package/dist/index.mjs.map +1 -1
- package/dist/tone.d.mts +156 -82
- package/dist/tone.d.ts +156 -82
- package/dist/tone.js +450 -90
- package/dist/tone.js.map +1 -1
- package/dist/tone.mjs +447 -89
- package/dist/tone.mjs.map +1 -1
- package/package.json +15 -9
package/dist/index.mjs
CHANGED
|
@@ -1942,7 +1942,7 @@ var WaveformPlaylistProvider = ({
|
|
|
1942
1942
|
tracksRef.current = tracks;
|
|
1943
1943
|
const isEngineTracks = tracks === engineTracksRef.current;
|
|
1944
1944
|
const prevTracks = prevTracksRef.current;
|
|
1945
|
-
const isIncrementalAdd = engineRef.current !== null &&
|
|
1945
|
+
const isIncrementalAdd = engineRef.current !== null && tracks.length > prevTracks.length && prevTracks.every((pt) => {
|
|
1946
1946
|
const current = tracks.find((t) => t.id === pt.id);
|
|
1947
1947
|
return current === pt;
|
|
1948
1948
|
});
|
|
@@ -2055,12 +2055,10 @@ var WaveformPlaylistProvider = ({
|
|
|
2055
2055
|
setTrackStates([]);
|
|
2056
2056
|
setPeaksDataArray([]);
|
|
2057
2057
|
if (engineRef.current) {
|
|
2058
|
-
engineRef.current.
|
|
2059
|
-
|
|
2060
|
-
|
|
2058
|
+
engineRef.current.setTracks([]);
|
|
2059
|
+
prevTracksRef.current = tracks;
|
|
2060
|
+
return;
|
|
2061
2061
|
}
|
|
2062
|
-
prevTracksRef.current = tracks;
|
|
2063
|
-
return;
|
|
2064
2062
|
}
|
|
2065
2063
|
const wasPlaying = isPlayingRef.current;
|
|
2066
2064
|
const resumePosition = currentTimeRef.current;
|
|
@@ -3658,7 +3656,7 @@ import {
|
|
|
3658
3656
|
SpectrogramLabels,
|
|
3659
3657
|
CLIP_HEADER_HEIGHT
|
|
3660
3658
|
} from "@waveform-playlist/ui-components";
|
|
3661
|
-
import {
|
|
3659
|
+
import { resolveRecordingOffsetSamples } from "@waveform-playlist/core";
|
|
3662
3660
|
|
|
3663
3661
|
// src/components/AnimatedPlayhead.tsx
|
|
3664
3662
|
import { useRef as useRef12, useEffect as useEffect8 } from "react";
|
|
@@ -4423,13 +4421,12 @@ var PlaylistVisualization = ({
|
|
|
4423
4421
|
);
|
|
4424
4422
|
}),
|
|
4425
4423
|
(recordingState == null ? void 0 : recordingState.isRecording) && recordingState.trackId === track.id && ((_d2 = recordingState.peaks[0]) == null ? void 0 : _d2.length) > 0 && (() => {
|
|
4426
|
-
const
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
lookAhead,
|
|
4424
|
+
const latencyOffsetSamples = resolveRecordingOffsetSamples({
|
|
4425
|
+
overrideSeconds: recordingState.latencyOffset,
|
|
4426
|
+
outputLatency: getOutputLatency(),
|
|
4427
|
+
lookAhead: getLookAhead(),
|
|
4431
4428
|
sampleRate
|
|
4432
|
-
);
|
|
4429
|
+
});
|
|
4433
4430
|
const latencyPixels = Math.floor(latencyOffsetSamples / samplesPerPixel);
|
|
4434
4431
|
const skipPeakElements = latencyPixels * 2;
|
|
4435
4432
|
const previewDuration = Math.max(
|