]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/helpers/custom-validators/video-view.ts
/!\ Use a dedicated config file for development
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / video-view.ts
CommitLineData
b2111066
C
1import { exists } from './misc'
2
3function isVideoTimeValid (value: number, videoDuration?: number) {
4 if (value < 0) return false
5 if (exists(videoDuration) && value > videoDuration) return false
6
7 return true
8}
9
10export {
11 isVideoTimeValid
12}