mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
12 lines
249 B
TypeScript
12 lines
249 B
TypeScript
import { exists } from './misc.js'
|
|
|
|
function isVideoTimeValid (value: number, videoDuration?: number) {
|
|
if (value < 0) return false
|
|
if (exists(videoDuration) && value > videoDuration) return false
|
|
|
|
return true
|
|
}
|
|
|
|
export {
|
|
isVideoTimeValid
|
|
}
|