MCPcopy Create free account
hub / github.com/code100x/cms / isYoutubeUrl

Function isYoutubeUrl

src/components/VideoPlayer2.tsx:713–716  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

711 }, [searchParams, player]);
712
713 const isYoutubeUrl = (url: string) => {
714 const regex = /^https:\/\/www\.youtube\.com\/embed\/[a-zA-Z0-9_-]+/;
715 return regex.test(url);
716 };
717
718 if (isYoutubeUrl(vidUrl)) return <YoutubeRenderer url={vidUrl} />;
719

Callers 1

VideoPlayerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected