diff --git a/src/fetchers/common.ts b/src/fetchers/common.ts index 71956ba..fbdf74e 100644 --- a/src/fetchers/common.ts +++ b/src/fetchers/common.ts @@ -15,7 +15,11 @@ export function makeFullUrl(url: string, ops?: FullUrlOptions): string { if (rightSide.startsWith('/')) rightSide = rightSide.slice(1); const fullUrl = leftSide + rightSide; - if (!fullUrl.startsWith('http://') && !fullUrl.startsWith('https://')) + + // we need the data scheme for base64 encoded hls playlists + // this is for playlists that themselves have cors but not their parts + // this allows us to proxy them, encode them into base64 and then fetch the parts normally + if (!fullUrl.startsWith('http://') && !fullUrl.startsWith('https://') && !fullUrl.startsWith('data:')) throw new Error(`Invald URL -- URL doesn't start with a http scheme: '${fullUrl}'`); const parsedUrl = new URL(fullUrl);