api/internal-hls: don't remake chunk istreams if already wrapped

This commit is contained in:
jj 2024-12-15 17:59:36 +00:00
parent d8cfb78047
commit 459b2c8283
No known key found for this signature in database

View file

@ -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;