diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-27 08:30:56 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-27 08:30:56 +0100 |
commit | 8059e050ef4e800c95851ac97abbb2330fe17882 (patch) | |
tree | 6cd6cc94cea7d5234e95ddb86aed5be206c4f81c /shared/server-commands/videos | |
parent | 2e5dd0bef8797dad82e5a908c30bc126cb924033 (diff) | |
download | PeerTube-8059e050ef4e800c95851ac97abbb2330fe17882.tar.gz PeerTube-8059e050ef4e800c95851ac97abbb2330fe17882.tar.zst PeerTube-8059e050ef4e800c95851ac97abbb2330fe17882.zip |
Fix live with base url object storage
Diffstat (limited to 'shared/server-commands/videos')
-rw-r--r-- | shared/server-commands/videos/live-command.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/shared/server-commands/videos/live-command.ts b/shared/server-commands/videos/live-command.ts index cc9502c6f..4541465ba 100644 --- a/shared/server-commands/videos/live-command.ts +++ b/shared/server-commands/videos/live-command.ts | |||
@@ -192,12 +192,20 @@ export class LiveCommand extends AbstractCommand { | |||
192 | playlistNumber: number | 192 | playlistNumber: number |
193 | segment: number | 193 | segment: number |
194 | objectStorage: boolean | 194 | objectStorage: boolean |
195 | objectStorageBaseUrl?: string | ||
195 | }) { | 196 | }) { |
196 | const { server, objectStorage, playlistNumber, segment, videoUUID } = options | 197 | const { |
198 | server, | ||
199 | objectStorage, | ||
200 | playlistNumber, | ||
201 | segment, | ||
202 | videoUUID, | ||
203 | objectStorageBaseUrl = ObjectStorageCommand.getMockPlaylistBaseUrl() | ||
204 | } = options | ||
197 | 205 | ||
198 | const segmentName = `${playlistNumber}-00000${segment}.ts` | 206 | const segmentName = `${playlistNumber}-00000${segment}.ts` |
199 | const baseUrl = objectStorage | 207 | const baseUrl = objectStorage |
200 | ? ObjectStorageCommand.getMockPlaylistBaseUrl() + 'hls' | 208 | ? join(objectStorageBaseUrl, 'hls') |
201 | : server.url + '/static/streaming-playlists/hls' | 209 | : server.url + '/static/streaming-playlists/hls' |
202 | 210 | ||
203 | let error = true | 211 | let error = true |