초기 커밋: DefVideo 소스 등록
abcVideo 플레이어 소스 (client / server / shared / pythonsource / docs / .claude). .gitignore 적용으로 node_modules·storage·samplevideo·미디어 등 대용량 일괄 제외. 103 files, ~964K. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1
shared/src/index.ts
Normal file
1
shared/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './types';
|
||||
75
shared/src/types.ts
Normal file
75
shared/src/types.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
// Video source types
|
||||
export type VideoSourceType = 'local' | 'server';
|
||||
|
||||
export type HlsConversionStatus = 'idle' | 'converting' | 'done' | 'error';
|
||||
|
||||
export interface VideoMeta {
|
||||
videoId: string;
|
||||
filename: string;
|
||||
size: number;
|
||||
duration: number;
|
||||
fps: number;
|
||||
width: number;
|
||||
height: number;
|
||||
codec: string;
|
||||
hlsStatus: HlsConversionStatus;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
// Annotation types
|
||||
export type AnnotationType = 'subtitle' | 'memo';
|
||||
|
||||
export interface AnnotationPosition {
|
||||
x: number; // 0-100 percentage
|
||||
y: number; // 0-100 percentage
|
||||
}
|
||||
|
||||
export interface AnnotationSize {
|
||||
width: number; // 0-100 percentage
|
||||
height: number; // 0-100 percentage
|
||||
}
|
||||
|
||||
export interface AnnotationStyle {
|
||||
fontSize?: number;
|
||||
color?: string;
|
||||
backgroundColor?: string;
|
||||
}
|
||||
|
||||
export interface Annotation {
|
||||
id: string;
|
||||
videoId: string;
|
||||
type: AnnotationType;
|
||||
timeStart: number; // seconds (float)
|
||||
timeEnd: number; // seconds (float)
|
||||
text: string;
|
||||
position: AnnotationPosition;
|
||||
size: AnnotationSize;
|
||||
style: AnnotationStyle;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export type CreateAnnotationInput = Omit<Annotation, 'id' | 'createdAt' | 'updatedAt'>;
|
||||
export type UpdateAnnotationInput = Partial<Omit<Annotation, 'id' | 'videoId' | 'createdAt'>>;
|
||||
|
||||
// API response types
|
||||
export interface ApiResponse<T> {
|
||||
data?: T;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface HlsProgressEvent {
|
||||
videoId: string;
|
||||
percent: number;
|
||||
time: number;
|
||||
status: HlsConversionStatus;
|
||||
}
|
||||
|
||||
// Upload types
|
||||
export interface UploadStatus {
|
||||
uploadId: string;
|
||||
filename: string;
|
||||
size: number;
|
||||
uploadedBytes: number;
|
||||
status: 'uploading' | 'complete' | 'error';
|
||||
}
|
||||
Reference in New Issue
Block a user