mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 04:11:12 +00:00
Fix auto download bug (#2552)
This commit is contained in:
parent
1ee1bdeaa9
commit
4293c5a6c3
2 changed files with 4 additions and 18 deletions
|
@ -145,7 +145,7 @@
|
|||
"sortpack"
|
||||
]
|
||||
},
|
||||
"packageManager": "pnpm@9.4.0",
|
||||
"packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a",
|
||||
"engineStrict": true,
|
||||
"importSort": {
|
||||
".js, .jsx, .ts, .tsx": {
|
||||
|
|
|
@ -225,8 +225,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
return <></>;
|
||||
}
|
||||
|
||||
// if direct video link
|
||||
if (url && isVideo(url)) {
|
||||
// if direct video link or embedded video link
|
||||
if (url && (isVideo(url) || post.embed_video_url)) {
|
||||
return (
|
||||
<div className="embed-responsive ratio ratio-16x9 mt-3">
|
||||
<video
|
||||
|
@ -236,26 +236,12 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
controls
|
||||
className="embed-responsive-item col-12"
|
||||
>
|
||||
<source src={url} type="video/mp4" />
|
||||
<source src={post.embed_video_url ?? url} type="video/mp4" />
|
||||
</video>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// if embedded video link
|
||||
if (url && post.embed_video_url) {
|
||||
return (
|
||||
<div className="ratio ratio-16x9">
|
||||
<iframe
|
||||
allowFullScreen
|
||||
className="post-metadata-iframe"
|
||||
src={post.embed_video_url}
|
||||
title={post.embed_title}
|
||||
></iframe>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (this.imageSrc) {
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Reference in a new issue