Skip to content

Commit b49554b

Browse files
authored
feat: add YT playlist support (#1947)
* feat: add YT playlist support related muxinc/media-elements#134 thanks @jy95 * fix: update patterns.ts to support YT playlists
1 parent ddd6303 commit b49554b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"hls-video-element": "^1.5.5",
5858
"vimeo-video-element": "^1.5.1",
5959
"wistia-video-element": "^1.3.2",
60-
"youtube-video-element": "^1.5.3"
60+
"youtube-video-element": "^1.6.0"
6161
},
6262
"devDependencies": {
6363
"@biomejs/biome": "1.8.2",

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)