summaryrefslogtreecommitdiff
path: root/apps/web/src/services
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/services')
-rw-r--r--apps/web/src/services/storage/service.ts (renamed from apps/web/src/services/storage/storage-service.ts)8
-rw-r--r--apps/web/src/services/transcription/service.ts (renamed from apps/web/src/services/transcription/index.ts)6
-rw-r--r--apps/web/src/services/video-cache/service.ts (renamed from apps/web/src/services/media/video-cache.ts)2
3 files changed, 6 insertions, 10 deletions
diff --git a/apps/web/src/services/storage/storage-service.ts b/apps/web/src/services/storage/service.ts
index cb0b2ced..02f8d290 100644
--- a/apps/web/src/services/storage/storage-service.ts
+++ b/apps/web/src/services/storage/service.ts
@@ -333,12 +333,9 @@ class StorageService {
]);
}
- // Utility methods
async clearAllData(): Promise<void> {
- // Clear all projects
await this.projectsAdapter.clear();
-
- // Note: Project-specific media and timelines will be cleaned up when projects are deleted
+ // project-specific media and timelines cleaned up when projects are deleted
}
async getStorageInfo(): Promise<{
@@ -392,7 +389,6 @@ class StorageService {
try {
const currentData = await this.loadSavedSounds();
- // Check if sound is already saved
if (currentData.sounds.some((sound) => sound.id === soundEffect.id)) {
return; // Already saved
}
@@ -456,7 +452,6 @@ class StorageService {
}
}
- // Check browser support
isOPFSSupported(): boolean {
return OPFSAdapter.isSupported();
}
@@ -470,6 +465,5 @@ class StorageService {
}
}
-// Export singleton instance
export const storageService = new StorageService();
export { StorageService };
diff --git a/apps/web/src/services/transcription/index.ts b/apps/web/src/services/transcription/service.ts
index 37c650da..c34a82ce 100644
--- a/apps/web/src/services/transcription/index.ts
+++ b/apps/web/src/services/transcription/service.ts
@@ -1,4 +1,5 @@
import type {
+ TranscriptionLanguage,
TranscriptionResult,
TranscriptionProgress,
TranscriptionModelId,
@@ -8,7 +9,6 @@ import {
TRANSCRIPTION_MODELS,
} from "@/constants/transcription-constants";
import type { WorkerMessage, WorkerResponse } from "./worker";
-import type { LanguageCode } from "@/types/language";
type ProgressCallback = (progress: TranscriptionProgress) => void;
@@ -20,12 +20,12 @@ class TranscriptionService {
async transcribe({
audioData,
- language,
+ language = "auto",
modelId = DEFAULT_TRANSCRIPTION_MODEL,
onProgress,
}: {
audioData: Float32Array;
- language?: LanguageCode;
+ language?: TranscriptionLanguage;
modelId?: TranscriptionModelId;
onProgress?: ProgressCallback;
}): Promise<TranscriptionResult> {
diff --git a/apps/web/src/services/media/video-cache.ts b/apps/web/src/services/video-cache/service.ts
index f3ddfcb2..36441981 100644
--- a/apps/web/src/services/media/video-cache.ts
+++ b/apps/web/src/services/video-cache/service.ts
@@ -15,6 +15,7 @@ interface VideoSinkData {
prefetching: boolean;
prefetchPromise: Promise<void> | null;
}
+
export class VideoCache {
private sinks = new Map<string, VideoSinkData>();
private initPromises = new Map<string, Promise<void>>();
@@ -311,4 +312,5 @@ export class VideoCache {
};
}
}
+
export const videoCache = new VideoCache();