Add basic HTML5 audio component to audio files

Signed-off-by: Marquis Kurt <software@marquiskurt.net>
This commit is contained in:
Marquis Kurt 2019-11-11 11:31:04 -05:00
parent b31b9cce9d
commit a13e561f5b
No known key found for this signature in database
GPG Key ID: 725636D259F5402D
2 changed files with 10 additions and 1 deletions

View File

@ -76,6 +76,15 @@ class AttachmentComponent extends Component<
className={classes.mediaObject}
/>
);
case "audio":
return (
<audio
controls
autoPlay={false}
src={slide.url}
className={classes.mediaObject}
/>
);
case "gifv":
return (
<img

View File

@ -3,7 +3,7 @@
*/
export type Attachment = {
id: string;
type: "unknown" | "image" | "gifv" | "video";
type: "unknown" | "image" | "gifv" | "audio" | "video";
url: string;
remote_url: string | null;
preview_url: string;