Skip to content

Commit

Permalink
feat(ai): add metadata as conditional prop to MuxVideo mdx component
Browse files Browse the repository at this point in the history
  • Loading branch information
zacjones93 authored and kodiakhq[bot] committed Jan 15, 2025
1 parent 4faa585 commit 67810e1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/ai-hero/src/markdown/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,15 @@ const YouTube: React.FC<YouTubeProps> = ({ videoId }) => {

type MuxVideoProps = {
playbackId: string
metadata?: {
video_id?: string
video_title?: string
}
}

const MuxVideo: React.FC<MuxVideoProps> = ({ playbackId }) => {
const MuxVideo: React.FC<MuxVideoProps> = ({ playbackId, metadata }) => {
return playbackId ? (
<MuxPlayer data-body-video="" playbackId={playbackId} />
<MuxPlayer data-body-video="" playbackId={playbackId} metadata={metadata} />
) : null
}

Expand Down

0 comments on commit 67810e1

Please sign in to comment.