Browse Source

#17 YouTube 対応(修正)

#17
みてるぞ 3 weeks ago
parent
commit
199783a6d4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      frontend/src/components/PostEmbed.tsx

+ 1
- 1
frontend/src/components/PostEmbed.tsx View File

@@ -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,


Loading…
Cancel
Save