+ if (cacheFileObject.url.mediaType === 'application/x-mpegURL') {
+ const url = cacheFileObject.url
+
+ const playlist = video.VideoStreamingPlaylists.find(t => t.type === VideoStreamingPlaylistType.HLS)
+ if (!playlist) throw new Error('Cannot find HLS playlist of video ' + video.url)
+
+ return {
+ expiresOn: new Date(cacheFileObject.expires),
+ url: cacheFileObject.id,
+ fileUrl: url.href,
+ strategy: null,
+ videoStreamingPlaylistId: playlist.id,
+ actorId: byActor.id
+ }
+ }
+
+ const url = cacheFileObject.url