Skip to content

Commit

Permalink
Merge pull request #458 from Renumics/fix/audio-overview
Browse files Browse the repository at this point in the history
Fix/audio overview
  • Loading branch information
druzsan authored Aug 2, 2024
2 parents 75a685a + f292ae7 commit 5950f4d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
9 changes: 0 additions & 9 deletions license-checker-template.json

This file was deleted.

12 changes: 9 additions & 3 deletions src/components/shared/AudioViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,19 @@ const AudioViewer = ({
]);

useEffect(() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(waveform.current?.backend as any).media.loop = repeat;
if (isReady && autoplay && !waveform.current?.isPlaying()) {
switchActiveWidget();
waveform.current?.play();
}
}, [isReady, autoplay, repeat]);
}, [isReady, autoplay]);

useEffect(() => {
const backend = waveform.current?.backend;
if (backend) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(backend as any).media.loop = repeat;
}
}, [isReady, repeat]);

useEffect(() => {
if (!waveform.current?.isReady) return;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export { default as api } from './api';
export type { App } from './stores/pluginStore';
export { useDataset, convertValue } from './stores/dataset';
export { useColors } from './stores/colors';
export { isAudio, isBoolean, getNullValue, isCategorical } from './datatypes';
export { isAudio, isBoolean, getNullValue, isCategorical, isWindow } from './datatypes';
export type {
EmbeddingDataType,
DataType,
Expand Down

0 comments on commit 5950f4d

Please sign in to comment.