mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
api/internal-hls: transform segment uri when probing the HLS tunnel
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run service tests / test service functionality (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run service tests / test service functionality (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
This commit is contained in:
parent
23f28acff0
commit
0ce777cbfc
@ -121,7 +121,15 @@ export async function probeInternalHLSTunnel(streamInfo) {
|
|||||||
if (!randomSegment.uri)
|
if (!randomSegment.uri)
|
||||||
throw "segment is missing 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;
|
return segmentSize;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user