-import { UserRight, VideoConstant, VideoDetails as VideoDetailsServerModel, VideoFile, VideoState } from '../../../../../shared'
-import { AuthUser } from '../../core'
+import { VideoConstant, VideoDetails as VideoDetailsServerModel, VideoFile, VideoState } from '../../../../../shared'
import { Video } from '../../shared/video/video.model'
import { Account } from '@app/shared/account/account.model'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
getHlsPlaylist () {
return this.streamingPlaylists.find(p => p.type === VideoStreamingPlaylistType.HLS)
}
+
+ hasHlsPlaylist () {
+ return !!this.getHlsPlaylist()
+ }
+
+ getFiles () {
+ if (this.files.length === 0) return this.getHlsPlaylist().files
+
+ return this.files
+ }
}