fix: url, base -> hlsObject.uri, streamInfo.url

This commit is contained in:
mikhail 2024-05-31 16:44:40 +05:00
parent 21e224bd14
commit 3df60b7fea

View File

@ -8,7 +8,7 @@ function transformObject(streamInfo, hlsObject) {
} }
const fullUrl = hlsObject.uri.startsWith("/") const fullUrl = hlsObject.uri.startsWith("/")
? new URL(url, base).toString() ? new URL(hlsObject.uri, streamInfo.url).toString()
: new URL(path.join(streamInfo.url, "/../", hlsObject.uri)).toString(); : new URL(path.join(streamInfo.url, "/../", hlsObject.uri)).toString();
hlsObject.uri = createInternalStream(fullUrl, streamInfo); hlsObject.uri = createInternalStream(fullUrl, streamInfo);