Skip to content

Commit

Permalink
fix(player): do not preconnect to jsdelivr for hls when imported
Browse files Browse the repository at this point in the history
closes #1009
  • Loading branch information
mihar-22 committed Nov 21, 2023
1 parent ec8a4f9 commit f404094
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions packages/vidstack/src/providers/hls/loader.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { MediaSrc } from '../../core';
import { isHLSSrc } from '../../utils/mime';
import { preconnect } from '../../utils/network';
import { isHLSSupported } from '../../utils/support';
import type { MediaProviderLoader } from '../types';
import { VideoProviderLoader } from '../video/loader';
Expand All @@ -12,10 +11,6 @@ export class HLSProviderLoader
{
static supported = isHLSSupported();

preconnect() {
preconnect('https://cdn.jsdelivr.net', 'preconnect');
}

override canPlay(src: MediaSrc) {
return HLSProviderLoader.supported && isHLSSrc(src);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/vidstack/src/utils/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ export function getRequestCredentials(crossorigin?: string | null): RequestCrede
return crossorigin === 'use-credentials'
? 'include'
: isString(crossorigin)
? 'same-origin'
: undefined;
? 'same-origin'
: undefined;
}

0 comments on commit f404094

Please sign in to comment.