(
video:
| {
duration: number | null;
width: number | null;
height: number | null;
fps: number | null;
}
| undefined,
)
| 339 | } |
| 340 | |
| 341 | function getMetadataFromVideoRow( |
| 342 | video: |
| 343 | | { |
| 344 | duration: number | null; |
| 345 | width: number | null; |
| 346 | height: number | null; |
| 347 | fps: number | null; |
| 348 | } |
| 349 | | undefined, |
| 350 | ): VideoEditRenderResult["metadata"] | null { |
| 351 | if ( |
| 352 | !video || |
| 353 | !isPositiveNumber(video.width) || |
| 354 | !isPositiveNumber(video.height) || |
| 355 | !isPositiveNumber(video.fps) |
| 356 | ) { |
| 357 | return null; |
| 358 | } |
| 359 | |
| 360 | return { |
| 361 | duration: isPositiveNumber(video.duration) ? video.duration : 0, |
| 362 | width: video.width, |
| 363 | height: video.height, |
| 364 | fps: video.fps, |
| 365 | }; |
| 366 | } |
| 367 | |
| 368 | async function getCompletedMetadata( |
| 369 | videoId: string, |
no test coverage detected