Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/lib/AudioUltra/Media/MediaLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,15 @@ export class MediaLoader extends Destructable {
}
});

xhr.open('GET', url, true);
// Handle relative urls, by converting them to absolute so any query params can be preserved
const newUrl = new URL(url, /^https?/.exec(url) ? undefined : window.location.href);

// Arbitrary setting of query param to stop caching from reusing any media requests which may have less headers
// cached than this request. This is to prevent a CORS error when the headers are different between partial
// content and full content requests.
newUrl.searchParams.set('lsref', '1');

xhr.open('GET', newUrl.toString(), true);
xhr.send();
});
}
Expand Down