Skip to content

Commit 459b2c8

Browse files
committed
api/internal-hls: don't remake chunk istreams if already wrapped
1 parent d8cfb78 commit 459b2c8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

api/src/stream/internal-hls.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ function transformObject(streamInfo, hlsObject) {
1616

1717
let fullUrl;
1818
if (getURL(hlsObject.uri)) {
19-
fullUrl = hlsObject.uri;
19+
fullUrl = new URL(hlsObject.uri);
2020
} else {
2121
fullUrl = new URL(hlsObject.uri, streamInfo.url);
2222
}
2323

24-
hlsObject.uri = createInternalStream(fullUrl.toString(), streamInfo);
24+
if (fullUrl.hostname !== '127.0.0.1') {
25+
hlsObject.uri = createInternalStream(fullUrl.toString(), streamInfo);
2526

26-
if (hlsObject.map) {
27-
hlsObject.map = transformObject(streamInfo, hlsObject.map);
27+
if (hlsObject.map) {
28+
hlsObject.map = transformObject(streamInfo, hlsObject.map);
29+
}
2830
}
2931

3032
return hlsObject;

0 commit comments

Comments
 (0)