-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- /content/container - /content/content-page - /site/pages/landing - /content/theme-wrapper - /site/pages/category
- Loading branch information
1 parent
bc37be6
commit 16aec2d
Showing
12 changed files
with
200 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { CmsContent } from '@lib/cms/CmsContent'; | ||
import { getImageURL } from '@utils/getImageURL'; | ||
|
||
type BaseImageProps = { | ||
name: string; | ||
defaultHost: string; | ||
endpoint: string; | ||
} & CmsContent; | ||
|
||
const BaseImage = ({ ...data }: BaseImageProps) => { | ||
return ( | ||
<picture key={data.name} className="amp-dc-image"> | ||
<img src={getImageURL(data, { strip: true })} className="amp-dc-image-pic" width="100%" alt={data.name} /> | ||
</picture> | ||
); | ||
}; | ||
|
||
export default BaseImage; |
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 @@ | ||
export { default } from './BaseImage'; |
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,67 @@ | ||
import React from 'react'; | ||
import { CmsContent } from '@lib/cms/CmsContent'; | ||
import { Box } from '@mui/material'; | ||
|
||
type BaseVideoProps = { | ||
name: string; | ||
defaultHost: string; | ||
endpoint: string; | ||
} & CmsContent; | ||
|
||
const BaseVideo = ({ ...data }: BaseVideoProps) => { | ||
return ( | ||
<Box> | ||
<video | ||
className="amp-dc-video" | ||
style={{ width: '100%' }} | ||
crossOrigin="anonymous" | ||
poster={`https://${data.defaultHost}/v/${data.endpoint}/${data.name}?protocol=https`} | ||
controls | ||
src={`https://${data.defaultHost}/v/${data.endpoint}/${data.name}/mp4_720p?protocol=https`} | ||
> | ||
<source | ||
src={`https://${data.defaultHost}/v/${data.endpoint}/${data.name}/mp4_720p?protocol=https`} | ||
data-res="High" | ||
data-bitrate="2119" | ||
data-label="High" | ||
type="video/mpeg4" | ||
/> | ||
|
||
<source | ||
src={`https://${data.defaultHost}/v/${data.endpoint}/${data.name}/mp4_480p?protocol=https`} | ||
data-res="Medium" | ||
data-bitrate="689" | ||
data-label="Medium" | ||
type="video/mpeg4" | ||
/> | ||
|
||
<source | ||
src={`https://${data.defaultHost}/v/${data.endpoint}/${data.name}/webm_720p?protocol=https`} | ||
data-res="High" | ||
data-bitrate="2000" | ||
data-label="high" | ||
type="video/webm" | ||
/> | ||
|
||
<source | ||
src={`https://${data.defaultHost}/v/${data.endpoint}/${data.name}/webm_480p?protocol=https`} | ||
data-res="Medium" | ||
data-bitrate="624" | ||
data-label="Medium" | ||
type="video/webm" | ||
/> | ||
|
||
<track | ||
label="English" | ||
kind="captions" | ||
srcLang="en" | ||
src={`https://cdn.c1.amplience.net/c/${data.endpoint}/${data.name}-captions-en-US`} | ||
default | ||
/> | ||
</video> | ||
<Box className="pause-button inactive"></Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default BaseVideo; |
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 @@ | ||
export { default } from './BaseVideo'; |
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
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
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
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