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) => { ...@@ -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}`}> <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") ? ( {resource.type.startsWith("audio") ? (
<> <>
<audio controls> <audio src={resourceUrl} controls></audio>
<source src={resourceUrl} type={resource.type} />
</audio>
</> </>
) : ( ) : (
<> <>
......
...@@ -84,9 +84,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => { ...@@ -84,9 +84,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
const url = getResourceUrl(resource); const url = getResourceUrl(resource);
return ( return (
<SquareDiv key={resource.id} className="memo-resource"> <SquareDiv key={resource.id} className="memo-resource">
<video preload="metadata" controls key={resource.id}> <video preload="metadata" crossOrigin="anonymous" src={absolutifyLink(url)} controls></video>
<source src={absolutifyLink(url)} type={resource.type} />
</video>
</SquareDiv> </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