This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add video download and bulk session delete functionalities (#97)
- Loading branch information
1 parent
107c733
commit 566c289
Showing
16 changed files
with
16,594 additions
and
5,427 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,34 +1,63 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import Button from "./button"; | ||
|
||
const Container = styled.div` | ||
padding: 10px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
gap: 10px; | ||
`; | ||
|
||
const VideoContainer = styled.div` | ||
height: 90%; | ||
width: 100%; | ||
`; | ||
|
||
const StyledVideo = styled.video` | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
height: auto; | ||
max-height: 100%; | ||
`; | ||
|
||
const DownloadButton = styled.a` | ||
width: 50%; | ||
color: #fff; | ||
background: #6fc76b; | ||
padding: 5px; | ||
margin-right: 10px; | ||
margin-left: 10px; | ||
border-radius: 10px; | ||
text-align: center; | ||
font-size: 14px; | ||
`; | ||
|
||
type PropsType = { | ||
session_id: string; | ||
url: string; | ||
downloadUrl: string; | ||
height?: number; | ||
width?: number; | ||
}; | ||
|
||
export default function VideoPlayer(props: PropsType) { | ||
const { url, width } = props; | ||
const { url, width, downloadUrl, session_id } = props; | ||
return ( | ||
<Container> | ||
<StyledVideo | ||
className="react-player" | ||
src={url} | ||
width={width || "100%"} | ||
controls={true} | ||
/> | ||
<VideoContainer> | ||
<StyledVideo | ||
className="react-player" | ||
src={url} | ||
width={width || "100%"} | ||
controls={true} | ||
controlsList="nodownload" | ||
/> | ||
</VideoContainer> | ||
<DownloadButton href={downloadUrl} download={session_id}> | ||
Download Video | ||
</DownloadButton> | ||
</Container> | ||
); | ||
} |
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
Oops, something went wrong.