Commit 73980e96 authored by Steven's avatar Steven

chore: fix video element syntax

parent 087e631d
......@@ -20,9 +20,7 @@ const MemoResource: React.FC<Props> = (props: Props) => {
<div className={`w-auto flex flex-row justify-start items-center text-gray-500 dark:text-gray-400 hover:opacity-80 ${className}`}>
{resource.type.startsWith("audio") ? (
<>
<audio controls>
<source src={resourceUrl} type={resource.type} />
</audio>
<audio src={resourceUrl} controls></audio>
</>
) : (
<>
......
......@@ -84,9 +84,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
const url = getResourceUrl(resource);
return (
<SquareDiv key={resource.id} className="memo-resource">
<video preload="metadata" controls key={resource.id}>
<source src={absolutifyLink(url)} type={resource.type} />
</video>
<video preload="metadata" crossOrigin="anonymous" src={absolutifyLink(url)} controls></video>
</SquareDiv>
);
})}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment