From c609ebbf92110d208ddee391bc8d15ce3c9acca5 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Fri, 4 Oct 2024 16:27:30 +0200 Subject: [PATCH] Fix datarhei/restreamer#825 --- src/utils/restreamer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/restreamer.js b/src/utils/restreamer.js index 341507a..f43fb76 100644 --- a/src/utils/restreamer.js +++ b/src/utils/restreamer.js @@ -859,14 +859,14 @@ class Restreamer { // Sanity check on the RTMP app let app = val.config.rtmp.app; const re = new RegExp('/+', 'g'); - app = app.replace(re, '/'); + app = app.replace(re, '/'); // replace all multiple occurences of / with only one / if (app !== '/') { if (app[app.length - 1] === '/') { - app = app.substring(0, app.length - 2); + app = app.substring(0, app.length - 1); // Remove the trailing / } if (app[0] !== '/') { - app = '/' + app; + app = '/' + app; // Add a / at the beginning } } else { app = ''; @@ -2260,7 +2260,7 @@ class Restreamer { metadata.player = this.InitPlayerSettings(metadata.player); // use h264 preview stream if enabled - const channel_id_h264 = metadata.control.preview?.enable ? `${channelid}_h264`: channelid + const channel_id_h264 = metadata.control.preview?.enable ? `${channelid}_h264` : channelid; const playerConfig = { ...metadata.player,