types.ts
| 1 | export interface AudioFile { |
| 2 | name: string; |
| 3 | duration: number; |
| 4 | } |
| 5 | |
| 6 | export type FileListing = (Directory | AudioFile)[]; |
| 7 | |
| 8 | export interface Directory { |
| 9 | name: string; |
| 10 | files: FileListing; |
| 11 | } |
| 12 | |
| 13 | export enum MediaFormat { |
| 14 | "opus/ogg" = "opus/ogg", |
| 15 | "opus/webm" = "opus/webm", |
| 16 | mp3 = "mp3", |
| 17 | vorbis = "vorbis", |
| 18 | } |
| 19 |