-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nx-dev): improve bandwidth usage convert gif to mp4 (#27129)
This PR aims to improve the bandwidth usage of nx-dev which is hosted on Vercel. (cherry picked from commit fcbc142)
- Loading branch information
1 parent
bc56654
commit 4fde8e2
Showing
7 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { VideoLoop } from './video-loop.component'; | ||
import { Schema } from '@markdoc/markdoc'; | ||
|
||
export const videoPlayer: Schema = { | ||
render: 'VideoPlayer', | ||
attributes: { | ||
src: { | ||
type: 'String', | ||
required: true, | ||
}, | ||
alt: { | ||
type: 'String', | ||
required: false, | ||
}, | ||
link: { | ||
type: 'String', | ||
required: false, | ||
}, | ||
}, | ||
}; | ||
|
||
export function VideoPlayer({ | ||
src, | ||
alt, | ||
link, | ||
}: { | ||
src: string; | ||
alt: string; | ||
link: string; | ||
}): JSX.Element { | ||
return ( | ||
<div className="overflow-x-auto"> | ||
{link ? ( | ||
<a href={link} target="_blank" rel="noreferrer"> | ||
<VideoLoop src={src} alt={alt}></VideoLoop> | ||
</a> | ||
) : ( | ||
<VideoLoop src={src} alt={alt}></VideoLoop> | ||
)} | ||
</div> | ||
); | ||
} |