-
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.
* audio as placeholder * rewrite audio and video * enable thumbnail previewer * pagination works but needs polish * next page works; not previous page * bug
- Loading branch information
1 parent
361ec32
commit df78ed9
Showing
11 changed files
with
138 additions
and
67 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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from "react"; | ||
|
||
export default function Audio(props) { | ||
const {fileId, audioSrc, ...other} = props; | ||
return <audio controls><source id={fileId} src={audioSrc} /></audio> | ||
} |
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,22 @@ | ||
import React from "react"; | ||
import { Typography } from "@material-ui/core"; | ||
|
||
export default function Thumbnail(props){ | ||
const {fileId, imgSrc, fileType, ...other} = props; | ||
return ( | ||
(() => { | ||
if (fileType === "image/jpeg" || fileType === "image/jpg" || fileType === "image/png" | ||
|| fileType === "image/gif" || fileType === "image/bmp"){ | ||
return <img className="rubberbandimage" src={imgSrc} alt="img" id={`rubberbandCanvas-${fileId}`}/>; | ||
} | ||
else if (fileType === "image/tiff"){ | ||
return <embed alt="No plugin capable of displaying TIFF images was found." | ||
width={750} height={550} src={imgSrc} type="image/tiff" negative="no" id="embedded" />; | ||
} | ||
else{ | ||
return <Typography>ERROR: Unrecognised image format.</Typography>; | ||
} | ||
|
||
})() | ||
) | ||
} |
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,8 @@ | ||
import React from "react"; | ||
|
||
export default function Video(props) { | ||
const {fileId, videoSrc, ...other} = props; | ||
return (<video width='100%' id='ourvideo' controls> | ||
<source id={fileId} src={videoSrc}></source> | ||
</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
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