]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-live.ts
Add live notification tests
[github/Chocobozzz/PeerTube.git] / server / models / video / video-live.ts
index 345918cb9d6e0dad4b5b8848ecad9e46d54d7750..f3bff74ea93a24f2f025d0b8b9d9399fd790558b 100644 (file)
@@ -93,7 +93,11 @@ export class VideoLiveModel extends Model<VideoLiveModel> {
 
   toFormattedJSON (): LiveVideo {
     return {
-      rtmpUrl: WEBSERVER.RTMP_URL,
+      // If we don't have a stream key, it means this is a remote live so we don't specify the rtmp URL
+      rtmpUrl: this.streamKey
+        ? WEBSERVER.RTMP_URL
+        : null,
+
       streamKey: this.streamKey,
       saveReplay: this.saveReplay
     }