X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fserver-commands%2Fvideos%2Flive-command.ts;h=dc3c5a86ef8f45862665448648bcf47644633f00;hb=fabe350bcac2d24c8524d4b6bb776dba7e374c8d;hp=cc9502c6f1efe9735092dd84b1cece35eba90857;hpb=77239b425a8e00822a53c9907415832a473c3eb6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/server-commands/videos/live-command.ts b/shared/server-commands/videos/live-command.ts index cc9502c6f..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.getMockPlaylistBaseUrl() + 'hls' + ? join(objectStorageBaseUrl, 'hls') : server.url + '/static/streaming-playlists/hls' let error = true