mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-13 06:06:27 +01:00
api/internal-hls: transform segment uri when probing the HLS tunnel
This commit is contained in:
parent
23f28acff0
commit
0ce777cbfc
1 changed files with 9 additions and 1 deletions
|
@ -121,7 +121,15 @@ export async function probeInternalHLSTunnel(streamInfo) {
|
|||
if (!randomSegment.uri)
|
||||
throw "segment is missing URI";
|
||||
|
||||
const segmentSize = await getSegmentSize(randomSegment.uri, config) / randomSegment.duration;
|
||||
let segmentUrl;
|
||||
|
||||
if (getURL(randomSegment.uri)) {
|
||||
segmentUrl = new URL(randomSegment.uri);
|
||||
} else {
|
||||
segmentUrl = new URL(randomSegment.uri, streamInfo.url);
|
||||
}
|
||||
|
||||
const segmentSize = await getSegmentSize(segmentUrl, config) / randomSegment.duration;
|
||||
return segmentSize;
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue