Skip to content

Commit

Permalink
feat: inline play Hero videos (#255)
Browse files Browse the repository at this point in the history
* fix: inline videos play

* fix typo

* add poster
  • Loading branch information
DiogoSoaress authored Dec 18, 2023
1 parent 173c225 commit 59f6fdf
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 12 deletions.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed public/videos/aa-sdk-mobile.mp4
Binary file not shown.
Binary file removed public/videos/aa-sdk.mp4
Binary file not shown.
Binary file removed public/videos/intro-chip.mp4
Binary file not shown.
12 changes: 7 additions & 5 deletions src/components/Core/AASdk/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ const AASdk = ({ title, caption, text, link }: BaseBlock) => {
)}
</Grid>
<div className={css.videoWrapper}>
<video autoPlay muted loop className={css.video}>
<source src={isSmallScreen ? '/videos/aa-sdk-mobile.webm' : '/videos/aa-sdk.webm'} type="video/webm" />
<video autoPlay muted playsInline loop className={css.video}>
<source
src={isSmallScreen ? '/videos/aa-sdk-mobile.hevc.mp4' : '/videos/aa-sdk.hevc.mp4'}
src={isSmallScreen ? '/videos/Core/aa-sdk-mobile.webm' : '/videos/Core/aa-sdk.webm'}
type="video/webm"
/>
<source
src={isSmallScreen ? '/videos/Core/aa-sdk-mobile.hevc.mp4' : '/videos/Core/aa-sdk.hevc.mp4'}
type="video/mp4"
/>
<source src={isSmallScreen ? '/videos/aa-sdk-mobile.mp4' : '/videos/aa-sdk.mp4'} type="video/mp4" />
<img src="/images/aa-sdk.png" alt="AA SDK Overview" />
<img src="/images/Core/aa-sdk.png" alt="AA SDK Overview" />
</video>
<a className={clsx(css.videoLink, css.authKitLink)} href={AUTH_KIT_LINK} target="_blank" rel="noreferrer">
Auth Kit
Expand Down
9 changes: 4 additions & 5 deletions src/components/Core/Intro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ const CoreIntro = ({ title, text, link, scroll }: BaseBlock & { scroll?: { title
alignItems="center"
>
<Grid item md={6} display="flex" justifyContent="center">
<video autoPlay muted loop className={css.video}>
<source src="/videos/intro-chip.webm" type="video/webm" />
<source src="/videos/intro-chip.hevc.mp4" type="video/mp4" />
<source src="/videos/intro-chip.mp4" type="video/mp4" />
<img src="/images/intro-chip.png" alt="Core Chip" />
<video autoPlay muted playsInline loop poster="/images/Core/intro-chip.png" className={css.video}>
<source src="/videos/Core/intro-chip.webm" type="video/webm" />
<source src="/videos/Core/intro-chip.hevc.mp4" type="video/mp4" />
<img src="/images/Core/intro-chip.png" alt="Core Chip" />
</video>
</Grid>
<Grid item md={6}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Home/Intro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const Intro = ({ title, text, buttons }: BaseBlock) => {
</Grid>
</Grid>
<div className={css.filter}>
<video autoPlay muted loop className={css.video}>
<source src="/videos/safe-logo.mp4" type="video/mp4" />
<video autoPlay muted playsInline loop className={css.video}>
<source src="/videos/Home/safe-logo.mp4" type="video/mp4" />
</video>
<div className={css.frame} />
</div>
Expand Down

0 comments on commit 59f6fdf

Please sign in to comment.