-import { HTMLServerConfig, Video } from '@shared/models'
+import { HTMLServerConfig, Video, VideoPrivacy } from '@shared/models'
function buildVideoOrPlaylistEmbed (options: {
embedUrl: string
return userP2PEnabled
}
+function videoRequiresAuth (video: Video) {
+ return new Set([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL ]).has(video.privacy.id)
+}
+
export {
buildVideoOrPlaylistEmbed,
- isP2PEnabled
+ isP2PEnabled,
+ videoRequiresAuth
}
// ---------------------------------------------------------------------------