mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 13:53:53 +02:00
Properly handle subrequests for redirected URLs
This commit is contained in:
@@ -77,12 +77,15 @@ export class HlsDemuxer extends Demuxer {
|
||||
readMetadata() {
|
||||
return this.metadataPromise ??= (async () => {
|
||||
assert(this.input._rootSource instanceof PathedSource);
|
||||
const { rootPath } = this.input._rootSource;
|
||||
|
||||
const slice = await this.input._reader.requestEntireFile();
|
||||
assert(slice);
|
||||
const lines = readAllLines(slice, slice.length, { ignore: canIgnoreLine });
|
||||
|
||||
// Important: get the root path AFTER reading data to get the final root path, possibly affected by
|
||||
// redirects. Any follow requests should be related to the redirected path, not the original one.
|
||||
const { rootPath } = this.input._rootSource;
|
||||
|
||||
const variantStreams: {
|
||||
fullPath: string;
|
||||
attributes: AttributeList;
|
||||
|
||||
Reference in New Issue
Block a user