chore: add file type to audio (#1492)

* chore: add file type to audio

* chore: update
This commit is contained in:
boojack 2023-04-08 19:16:25 +08:00 committed by GitHub
parent 3eac19d258
commit 4e023e2500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,9 @@ const MemoResource: React.FC<Props> = (props: Props) => {
<div className={`w-auto flex flex-row justify-start items-center hover:opacity-80 ${className}`}>
{resource.type.startsWith("audio") ? (
<>
<audio className="h-8" src={resourceUrl} controls></audio>
<audio controls>
<source src={resourceUrl} type={resource.type} />
</audio>
</>
) : (
<>