aboutsummaryrefslogtreecommitdiff
path: root/src/server/SharedMediaTypes.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-05-03 10:55:33 -0400
committerbobzel <zzzman@gmail.com>2024-05-03 10:55:33 -0400
commitf927a585c75a20629379bcb34d1483c0ca9d8db9 (patch)
treef070e9e64ecaf251e6708b8ce4d722f121a6d039 /src/server/SharedMediaTypes.ts
parent723c8b33ade753764d1d02b130c189fb65e20425 (diff)
parent9b424c94d7a89950e9cf3f72e684bd15a61e87ae (diff)
merged with new version of master
Diffstat (limited to 'src/server/SharedMediaTypes.ts')
-rw-r--r--src/server/SharedMediaTypes.ts36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/server/SharedMediaTypes.ts b/src/server/SharedMediaTypes.ts
index 7db1c2dae..8ae13454e 100644
--- a/src/server/SharedMediaTypes.ts
+++ b/src/server/SharedMediaTypes.ts
@@ -13,6 +13,11 @@ export namespace AcceptableMedia {
export const audioFormats = ['.wav', '.mp3', '.mpeg', '.flac', '.au', '.aiff', '.m4a', '.webm'];
}
+export enum AudioAnnoState {
+ stopped = 'stopped',
+ playing = 'playing',
+}
+
export namespace Upload {
export function isImageInformation(uploadResponse: Upload.FileInformation): uploadResponse is Upload.ImageInformation {
return 'nativeWidth' in uploadResponse;
@@ -22,24 +27,17 @@ export namespace Upload {
return 'duration' in uploadResponse;
}
+ export interface AccessPathInfo {
+ [suffix: string]: { client: string; server: string };
+ }
export interface FileInformation {
accessPaths: AccessPathInfo;
rawText?: string;
duration?: number;
}
-
- export type FileResponse<T extends FileInformation = FileInformation> = { source: File; result: T | Error };
-
- export type ImageInformation = FileInformation & InspectionResults;
-
- export type VideoInformation = FileInformation & VideoResults;
-
- export interface AccessPathInfo {
- [suffix: string]: { client: string; server: string };
- }
-
- export interface VideoResults {
- duration: number;
+ export interface EnrichedExifData {
+ data: ExifData & ExifData['gps'];
+ error?: string;
}
export interface InspectionResults {
source: string;
@@ -51,9 +49,13 @@ export namespace Upload {
nativeHeight: number;
filename?: string;
}
-
- export interface EnrichedExifData {
- data: ExifData & ExifData['gps'];
- error?: string;
+ export interface VideoResults {
+ duration: number;
}
+
+ export type FileResponse<T extends FileInformation = FileInformation> = { source: File; result: T | Error };
+
+ export type ImageInformation = FileInformation & InspectionResults;
+
+ export type VideoInformation = FileInformation & VideoResults;
}