Table,
UpdatedAt
} from 'sequelize-typescript'
+import { CONFIG } from '@server/initializers/config'
import { getHLSPrivateFileUrl, getHLSPublicFileUrl } from '@server/lib/object-storage'
import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename } from '@server/lib/paths'
import { isVideoInPrivateDirectory } from '@server/lib/video-privacy'
}
private getMasterPlaylistObjectStorageUrl (video: MVideo) {
- if (video.hasPrivateStaticPath()) {
+ if (video.hasPrivateStaticPath() && CONFIG.OBJECT_STORAGE.PROXY.PROXIFY_PRIVATE_FILES === true) {
return getHLSPrivateFileUrl(video, this.playlistFilename)
}
}
private getSha256SegmentsObjectStorageUrl (video: MVideo) {
- if (video.hasPrivateStaticPath()) {
+ if (video.hasPrivateStaticPath() && CONFIG.OBJECT_STORAGE.PROXY.PROXIFY_PRIVATE_FILES === true) {
return getHLSPrivateFileUrl(video, this.segmentsSha256Filename)
}