PeerTube/server/core/helpers/custom-validators/video-lives.ts

12 lines
361 B
TypeScript
Raw Normal View History

import { LiveVideoLatencyMode } from '@peertube/peertube-models'
2022-03-04 13:40:02 +01:00
function isLiveLatencyModeValid (value: any) {
return [ LiveVideoLatencyMode.DEFAULT, LiveVideoLatencyMode.SMALL_LATENCY, LiveVideoLatencyMode.HIGH_LATENCY ].includes(value)
}
// ---------------------------------------------------------------------------
export {
isLiveLatencyModeValid
}