Add basic HTML5 audio component to audio files
Signed-off-by: Marquis Kurt <software@marquiskurt.net>
This commit is contained in:
parent
b31b9cce9d
commit
a13e561f5b
|
@ -76,6 +76,15 @@ class AttachmentComponent extends Component<
|
||||||
className={classes.mediaObject}
|
className={classes.mediaObject}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
case "audio":
|
||||||
|
return (
|
||||||
|
<audio
|
||||||
|
controls
|
||||||
|
autoPlay={false}
|
||||||
|
src={slide.url}
|
||||||
|
className={classes.mediaObject}
|
||||||
|
/>
|
||||||
|
);
|
||||||
case "gifv":
|
case "gifv":
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
export type Attachment = {
|
export type Attachment = {
|
||||||
id: string;
|
id: string;
|
||||||
type: "unknown" | "image" | "gifv" | "video";
|
type: "unknown" | "image" | "gifv" | "audio" | "video";
|
||||||
url: string;
|
url: string;
|
||||||
remote_url: string | null;
|
remote_url: string | null;
|
||||||
preview_url: string;
|
preview_url: string;
|
||||||
|
|
Loading…
Reference in New Issue