diff --git a/api/src/stream/internal-hls.js b/api/src/stream/internal-hls.js index 83deb440..55634c71 100644 --- a/api/src/stream/internal-hls.js +++ b/api/src/stream/internal-hls.js @@ -16,15 +16,17 @@ function transformObject(streamInfo, hlsObject) { let fullUrl; if (getURL(hlsObject.uri)) { - fullUrl = hlsObject.uri; + fullUrl = new URL(hlsObject.uri); } else { fullUrl = new URL(hlsObject.uri, streamInfo.url); } - hlsObject.uri = createInternalStream(fullUrl.toString(), streamInfo); + if (fullUrl.hostname !== '127.0.0.1') { + hlsObject.uri = createInternalStream(fullUrl.toString(), streamInfo); - if (hlsObject.map) { - hlsObject.map = transformObject(streamInfo, hlsObject.map); + if (hlsObject.map) { + hlsObject.map = transformObject(streamInfo, hlsObject.map); + } } return hlsObject;