-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3] feat: VideoModal-VideoSection UI implemented
- Loading branch information
1 parent
916a980
commit 678df9e
Showing
3 changed files
with
60 additions
and
2 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
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 |
---|---|---|
@@ -1,9 +1,63 @@ | ||
import React, { useContext } from 'react'; | ||
import styled, { ThemeContext } from 'styled-components'; | ||
import SampleVideo from 'assets/video/shorts_1min.mp4'; | ||
import sampleVideoUrl from 'assets/video/shorts_1min.mp4'; | ||
|
||
const VideoSection = () => { | ||
return <div>Hi</div>; | ||
return ( | ||
<VideoWrapper> | ||
<video | ||
loop | ||
muted | ||
autoPlay | ||
playsInline | ||
style={{ | ||
width: '100%', | ||
height: '100%', | ||
position: 'absolute', | ||
objectFit: 'cover', | ||
zIndex: 0, | ||
}} | ||
> | ||
<source src={sampleVideoUrl} type="video/mp4" /> | ||
<track kind="captions" /> | ||
</video> | ||
<VideoController> | ||
<PlayButton /> | ||
<VolumeButton /> | ||
</VideoController> | ||
</VideoWrapper> | ||
); | ||
}; | ||
|
||
const VideoWrapper = styled.div` | ||
height: 100%; | ||
width: 100%; | ||
position: relative; | ||
overflow: hidden; | ||
border-radius: 5px 0 0 5px; | ||
`; | ||
|
||
const VideoController = styled.div` | ||
position: absolute; | ||
display: flex; | ||
bottom: 20px; | ||
width: 100%; | ||
padding: 0 20px; | ||
justify-content: space-between; | ||
`; | ||
|
||
const PlayButton = styled.div` | ||
height: 24px; | ||
width: 24px; | ||
background: #fff; | ||
cursor: pointer; | ||
`; | ||
|
||
const VolumeButton = styled.div` | ||
height: 24px; | ||
width: 24px; | ||
background: #fff; | ||
cursor: pointer; | ||
`; | ||
|
||
export default VideoSection; |