@waveform-playlist/browser 13.1.2 → 13.1.3
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 +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
package/dist/index.mjs
CHANGED
|
@@ -1306,9 +1306,13 @@ function useAnnotationKeyboardControls({
|
|
|
1306
1306
|
continuousPlay = false,
|
|
1307
1307
|
enabled = true,
|
|
1308
1308
|
scrollContainerRef,
|
|
1309
|
-
onPlay
|
|
1309
|
+
onPlay,
|
|
1310
|
+
samplesPerPixel: samplesPerPixelProp,
|
|
1311
|
+
sampleRate: sampleRateProp
|
|
1310
1312
|
}) {
|
|
1311
|
-
const
|
|
1313
|
+
const playlistData = usePlaylistDataOptional();
|
|
1314
|
+
const samplesPerPixel = samplesPerPixelProp != null ? samplesPerPixelProp : playlistData == null ? void 0 : playlistData.samplesPerPixel;
|
|
1315
|
+
const sampleRate = sampleRateProp != null ? sampleRateProp : playlistData == null ? void 0 : playlistData.sampleRate;
|
|
1312
1316
|
const activeIndex = useMemo3(() => {
|
|
1313
1317
|
if (!activeAnnotationId) return -1;
|
|
1314
1318
|
return annotations.findIndex((a) => a.id === activeAnnotationId);
|
|
@@ -4661,6 +4665,7 @@ var usePlaylistData = () => {
|
|
|
4661
4665
|
}
|
|
4662
4666
|
return context;
|
|
4663
4667
|
};
|
|
4668
|
+
var usePlaylistDataOptional = () => useContext(PlaylistDataContext);
|
|
4664
4669
|
|
|
4665
4670
|
// src/MediaElementPlaylistContext.tsx
|
|
4666
4671
|
import {
|
|
@@ -7339,6 +7344,7 @@ export {
|
|
|
7339
7344
|
usePlaybackShortcuts,
|
|
7340
7345
|
usePlaylistControls,
|
|
7341
7346
|
usePlaylistData,
|
|
7347
|
+
usePlaylistDataOptional,
|
|
7342
7348
|
usePlaylistState,
|
|
7343
7349
|
useSpectrogramIntegration,
|
|
7344
7350
|
useTimeFormat,
|