diff --git a/site/components/Paragraph.js b/site/components/Paragraph.js index b1096bf..3940a5d 100644 --- a/site/components/Paragraph.js +++ b/site/components/Paragraph.js @@ -1,30 +1,15 @@ -import ReactPlayer from "react-player"; - -const videoLinks = [ - "youtube.com", - "dailymotion.com", - "vimeo.com", - "soundcloud.com", - "facebook.com/watch", - "twitch.com", -]; +import LiteYouTubeEmbed from "react-lite-youtube-embed"; +import { YOUTUBE_REGEX } from "../lib/constants"; export const Paragraph = (props) => { if ( typeof props.children == "object" && props.children.props && props.children.props.href && - videoLinks.some((str) => props.children.props.href.includes(str)) - ) - return ( -