Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix auto download bug #2552

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"sortpack"
]
},
"packageManager": "[email protected]",
"packageManager": "[email protected]+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a",
"engineStrict": true,
"importSort": {
".js, .jsx, .ts, .tsx": {
Expand Down
20 changes: 3 additions & 17 deletions src/shared/components/post/post-listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 (
<>
Expand Down