+ // ---------------------------------------------------------------------------
+
+ getSegmentFile (options: OverrideCommandOptions & {
+ videoUUID: string
+ playlistNumber: number
+ segment: number
+ objectStorage?: boolean // default false
+ }) {
+ const { playlistNumber, segment, videoUUID, objectStorage = false } = options
+
+ const segmentName = `${playlistNumber}-00000${segment}.ts`
+ const baseUrl = objectStorage
+ ? ObjectStorageCommand.getMockPlaylistBaseUrl()
+ : `${this.server.url}/static/streaming-playlists/hls`
+
+ const url = `${baseUrl}/${videoUUID}/${segmentName}`
+
+ return this.getRawRequest({
+ ...options,
+
+ url,
+ implicitToken: false,
+ defaultExpectedStatus: HttpStatusCode.OK_200
+ })
+ }
+
+ getPlaylistFile (options: OverrideCommandOptions & {
+ videoUUID: string
+ playlistName: string
+ objectStorage?: boolean // default false
+ }) {
+ const { playlistName, videoUUID, objectStorage = false } = options
+
+ const baseUrl = objectStorage
+ ? ObjectStorageCommand.getMockPlaylistBaseUrl()
+ : `${this.server.url}/static/streaming-playlists/hls`
+
+ const url = `${baseUrl}/${videoUUID}/${playlistName}`
+
+ return this.getRawRequest({
+ ...options,
+
+ url,
+ implicitToken: false,
+ defaultExpectedStatus: HttpStatusCode.OK_200
+ })
+ }
+
+ // ---------------------------------------------------------------------------
+