Skip to content

Commit

Permalink
feat: image compatible with MP4
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Jul 24, 2023
1 parent 3b8af39 commit f3516f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/ui/markdown/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,5 +259,10 @@ const MarkdownImage = (props: any) => {
}
nextProps.alt = props.alt?.replace(/^[¡!]/, '')
const { w } = useWrappedElementSize()

if (props.src.endsWith('.mp4')) {
return <video src={props.src} controls playsInline />
}

return <FixedZoomedImage {...nextProps} containerWidth={w} />
}

1 comment on commit f3516f4

@vercel
Copy link

@vercel vercel bot commented on f3516f4 Jul 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

springtide.vercel.app
shiro-git-main-innei.vercel.app
innei.in
shiro-innei.vercel.app

Please sign in to comment.