From 936b920dbb3b9763dcf9854977e4d558fa9cebb6 Mon Sep 17 00:00:00 2001 From: Alexander Druz Date: Fri, 2 Aug 2024 13:29:51 +0200 Subject: [PATCH 1/3] Do not set repeat mode if backend is not yet ready --- src/components/shared/AudioViewer/index.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/shared/AudioViewer/index.tsx b/src/components/shared/AudioViewer/index.tsx index 9cffdc4f..4c73f08b 100644 --- a/src/components/shared/AudioViewer/index.tsx +++ b/src/components/shared/AudioViewer/index.tsx @@ -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; From 8734d1f546005e2da9d0c7e84e6071350195e95e Mon Sep 17 00:00:00 2001 From: Alexander Druz Date: Fri, 2 Aug 2024 13:33:28 +0200 Subject: [PATCH 2/3] Export `isWindow` in Spotlight --- src/lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.ts b/src/lib.ts index d6cb859f..3234dff2 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -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, From f292ae7c5c2225e03750ff07dc7488ec7b3afddc Mon Sep 17 00:00:00 2001 From: Alexander Druz Date: Fri, 2 Aug 2024 13:36:10 +0200 Subject: [PATCH 3/3] Remove js lincense template --- license-checker-template.json | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 license-checker-template.json diff --git a/license-checker-template.json b/license-checker-template.json deleted file mode 100644 index 0f82f848..00000000 --- a/license-checker-template.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "", - "version": "", - "licenses": "", - "repository": "", - "path": "", - "licenseFile": "", - "copyright": "" -}