mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
api/internal-hls: don't remake chunk istreams if already wrapped
This commit is contained in:
parent
d8cfb78047
commit
459b2c8283
1 changed files with 6 additions and 4 deletions
|
@ -16,15 +16,17 @@ function transformObject(streamInfo, hlsObject) {
|
||||||
|
|
||||||
let fullUrl;
|
let fullUrl;
|
||||||
if (getURL(hlsObject.uri)) {
|
if (getURL(hlsObject.uri)) {
|
||||||
fullUrl = hlsObject.uri;
|
fullUrl = new URL(hlsObject.uri);
|
||||||
} else {
|
} else {
|
||||||
fullUrl = new URL(hlsObject.uri, streamInfo.url);
|
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) {
|
if (hlsObject.map) {
|
||||||
hlsObject.map = transformObject(streamInfo, hlsObject.map);
|
hlsObject.map = transformObject(streamInfo, hlsObject.map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return hlsObject;
|
return hlsObject;
|
||||||
|
|
Loading…
Reference in a new issue