#17 YouTube 対応(修正)

This commit is contained in:
2025-08-25 23:48:46 +09:00
parent b8c2c221ca
commit 199783a6d4
+1 -1
View File
@@ -27,7 +27,7 @@ export default (({ post }: Props) => {
return <TwitterEmbed userId={userId} statusId={statusId}/> return <TwitterEmbed userId={userId} statusId={statusId}/>
case 'youtube.com': case 'youtube.com':
{ {
const [videoId] = url.pathname.match (/(?<=\/watch\?v\=)[a-zA-Z0-9]+?(?=\/|$|&)/)! const videoId = url.searchParams.get ('v')!
return ( return (
<YoutubeEmbed videoId={videoId} opts={{ playerVars: { <YoutubeEmbed videoId={videoId} opts={{ playerVars: {
playsinline: 1, playsinline: 1,