|
|
@@ -27,7 +27,7 @@ export default (({ post }: Props) => { |
|
|
|
return <TwitterEmbed userId={userId} statusId={statusId}/> |
|
|
|
case 'youtube.com': |
|
|
|
{ |
|
|
|
const [videoId] = url.pathname.match (/(?<=\/watch\?v\=)[a-zA-Z0-9]+?(?=\/|$|&)/)! |
|
|
|
const videoId = url.searchParams.get ('v')! |
|
|
|
return ( |
|
|
|
<YoutubeEmbed videoId={videoId} opts={{ playerVars: { |
|
|
|
playsinline: 1, |
|
|
|