fix: show short video durations accurately
This commit is contained in:
@@ -66,7 +66,7 @@ function toVideo(video: BunnyApiVideo): BunnyVideo {
|
||||
status: bunnyMediaStatus(video.status),
|
||||
providerStatus: video.status,
|
||||
encodeProgress: Math.max(0, Math.min(100, Math.round(video.encodeProgress ?? 0))),
|
||||
durationSeconds: typeof video.length === 'number' && video.length > 0 ? Math.round(video.length) : null,
|
||||
durationSeconds: typeof video.length === 'number' && video.length > 0 ? Math.max(1, Math.round(video.length)) : null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user