diff --git a/src/components/VideoPlayer.tsx b/src/components/VideoPlayer.tsx index 418a341..956655a 100644 --- a/src/components/VideoPlayer.tsx +++ b/src/components/VideoPlayer.tsx @@ -34,7 +34,10 @@ const tryGetVideoUrl = (urlInput: string | null) => { return urlInput; } - if (urlInput.startsWith("https://youtu.be")) { + if ( + urlInput.startsWith("https://youtu.be") || + urlInput.startsWith("https://music.youtube.com") + ) { // regex to extract the video ID from: https://youtu.be/sjgtpKxhZa4?si=lhbg5O4yeHiABClV const videoId = urlInput.match( /(?:\?v=|&v=|youtu\.be\/)(.*?)(?:\?|$)/, diff --git a/src/pages/index.astro b/src/pages/index.astro index 17d5237..23439cf 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -39,7 +39,10 @@ import Footer from "../components/Footer.astro"; Cruise CONTROL is a simple speed and loop control for YouTube videos.
-Enter either the full video URL or the ID to get started.
++ Enter either the full video URL, YouTube Music URL, or the video ID to + get started. +