]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/video-details.model.ts
Lazy load static objects
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video-details.model.ts
index e4d443a06ae88f5bed879946b92e1580c447ef29..14347a109da8478747c0127e5c18262a616795ff 100644 (file)
@@ -55,4 +55,10 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
   hasHlsPlaylist () {
     return !!this.getHlsPlaylist()
   }
+
+  getFiles () {
+    if (this.files.length === 0) return this.getHlsPlaylist().files
+
+    return this.files
+  }
 }