X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fserver-commands%2Fvideos%2Flive-command.ts;h=dc3c5a86ef8f45862665448648bcf47644633f00;hb=fabe350bcac2d24c8524d4b6bb776dba7e374c8d;hp=de193fa49666a8d0333bdb427283c7895949f030;hpb=3545e72c686ff1725bbdfd8d16d693e2f4aa75a3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/server-commands/videos/live-command.ts b/shared/server-commands/videos/live-command.ts index de193fa49..dc3c5a86e 100644 --- a/shared/server-commands/videos/live-command.ts +++ b/shared/server-commands/videos/live-command.ts @@ -121,7 +121,7 @@ export class LiveCommand extends AbstractCommand { permanentLive: boolean privacy?: VideoPrivacy }) { - const { saveReplay, permanentLive, privacy } = options + const { saveReplay, permanentLive, privacy = VideoPrivacy.PUBLIC } = options const { uuid } = await this.create({ ...options, @@ -130,6 +130,7 @@ export class LiveCommand extends AbstractCommand { name: 'live', permanentLive, saveReplay, + replaySettings: { privacy }, channelId: this.server.store.channel.id, privacy } @@ -192,12 +193,20 @@ export class LiveCommand extends AbstractCommand { playlistNumber: number segment: number objectStorage: boolean + objectStorageBaseUrl?: string }) { - const { server, objectStorage, playlistNumber, segment, videoUUID } = options + const { + server, + objectStorage, + playlistNumber, + segment, + videoUUID, + objectStorageBaseUrl = ObjectStorageCommand.getMockPlaylistBaseUrl() + } = options const segmentName = `${playlistNumber}-00000${segment}.ts` const baseUrl = objectStorage - ? ObjectStorageCommand.getPlaylistBaseUrl() + 'hls' + ? join(objectStorageBaseUrl, 'hls') : server.url + '/static/streaming-playlists/hls' let error = true @@ -253,7 +262,7 @@ export class LiveCommand extends AbstractCommand { const segmentName = `${playlistNumber}-00000${segment}.ts` const baseUrl = objectStorage - ? ObjectStorageCommand.getPlaylistBaseUrl() + ? ObjectStorageCommand.getMockPlaylistBaseUrl() : `${this.server.url}/static/streaming-playlists/hls` const url = `${baseUrl}/${videoUUID}/${segmentName}` @@ -275,7 +284,7 @@ export class LiveCommand extends AbstractCommand { const { playlistName, videoUUID, objectStorage = false } = options const baseUrl = objectStorage - ? ObjectStorageCommand.getPlaylistBaseUrl() + ? ObjectStorageCommand.getMockPlaylistBaseUrl() : `${this.server.url}/static/streaming-playlists/hls` const url = `${baseUrl}/${videoUUID}/${playlistName}`