-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add video to database-per-tenant use case
- Loading branch information
Showing
7 changed files
with
35 additions
and
1 deletion.
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.
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,3 @@ | ||
import Video from './video'; | ||
|
||
export default Video; |
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,28 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
import PauseableVideo from 'components/shared/pauseable-video'; | ||
|
||
const Video = ({ name, width, height }) => ( | ||
/* | ||
Video omtimization parameters: | ||
mp4: -pix_fmt yuv420p -vf scale={width}:-2 -movflags faststart -vcodec libx264 -crf 20 | ||
webm: -c:v libvpx-vp9 -crf 20 -vf scale={width}:-2 -deadline best -an | ||
*/ | ||
<PauseableVideo | ||
className="mb-14 lg:mb-12 md:mb-10 sm:mb-8" | ||
videoClassName="!m-0 !rounded-none" | ||
width={width} | ||
height={height} | ||
> | ||
<source src={`/videos/pages/doc/${name}.mp4`} type="video/mp4" /> | ||
<source src={`/videos/pages/doc/${name}.webm`} type="video/webm" /> | ||
</PauseableVideo> | ||
); | ||
|
||
Video.propTypes = { | ||
name: PropTypes.string.isRequired, | ||
width: PropTypes.number.isRequired, | ||
height: PropTypes.number.isRequired, | ||
}; | ||
|
||
export default Video; |
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