Skip to content

Commit 83cf825

Browse files
committed
fix: update patterns.ts to support YT playlists
1 parent 1116ed3 commit 83cf825

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/patterns.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
66
// Match Mux m3u8 URLs without the extension so users can use hls.js with Mux by adding the `.m3u8` extension. https://regexr.com/7um5f
77
export const MATCH_URL_MUX = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/;
88
export const MATCH_URL_YOUTUBE =
9-
/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/;
9+
/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;
1010
export const MATCH_URL_VIMEO = /vimeo\.com\/(?!progressive_redirect).+/;
1111
export const MATCH_URL_WISTIA =
1212
/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/;

0 commit comments

Comments
 (0)