]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/server-commands/videos/live-command.ts
Translated using Weblate (Ukrainian)
[github/Chocobozzz/PeerTube.git] / shared / server-commands / videos / live-command.ts
index cc9502c6f1efe9735092dd84b1cece35eba90857..dc3c5a86ef8f45862665448648bcf47644633f00 100644 (file)
@@ -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