Skip to content

Commit

Permalink
Add Video Thumbnail and metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcibotari committed Feb 1, 2025
1 parent 4afab3a commit afe1c97
Show file tree
Hide file tree
Showing 12 changed files with 371 additions and 56 deletions.
173 changes: 171 additions & 2 deletions functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"express": "^4.21.2",
"firebase-admin": "^13.0.2",
"firebase-functions": "^6.2.0",
"fluent-ffmpeg": "^2.1.3",
"ffmpeg-static": "^5.2.0",
"sharp": "^0.33.5",
"stripe": "^17.4.0",
"uuid": "^11.0.5",
Expand All @@ -35,6 +37,7 @@
"openapi3-ts": "^4.4.0",
"@types/express": "^4.17.21",
"@types/uuid": "^10.0.0",
"@types/fluent-ffmpeg": "^2.1.27",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"eslint": "^8.57.1",
Expand Down
33 changes: 26 additions & 7 deletions functions/src/models/asset.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,32 @@ export interface AssetFile extends AssetBase {
source?: string;
}

export interface AssetMetadata {
format?: string;
width?: number;
height?: number;
orientation?: 'landscape' | 'portrait' | 'squarish';
animated?: boolean;
}
export type AssetMetadata =
| {
format?: string;
width?: number;
height?: number;
orientation?: 'landscape' | 'portrait' | 'squarish';
}
| {
type: 'image';
format?: string;
width?: number;
height?: number;
orientation?: 'landscape' | 'portrait' | 'squarish';
progressive?: boolean;
animated?: boolean;
}
| {
type: 'video';
format?: string;
formatLong?: string;
width?: number;
height?: number;
orientation?: 'landscape' | 'portrait' | 'squarish';
duration?: number;
bitRate?: number;
};

// Import and Export
export interface AssetFolderExport extends Omit<AssetFolder, 'createdAt' | 'updatedAt'> {
Expand Down
Loading

0 comments on commit afe1c97

Please sign in to comment.