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

Increase frame size of embedded videos, allow full screen #927

Closed
wants to merge 1 commit into from
Closed
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 src/shared/components/post/metadata-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class MetadataCard extends Component<
</div>
)}
{this.state.expanded && post.embed_video_url && (
<iframe src={post.embed_video_url}></iframe>
<center><iframe allowFullscreen="allowfullscreen" src={post.embed_video_url} style="aspect-ratio:16/9;max-width:85vw" width="560px" frameborder="0"></iframe></center>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not hardcode widths or aspect ratios like this. Use bootstrap classes made for iframes: https://getbootstrap.com/docs/5.3/helpers/ratio/#example

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI the feature you linked appears to be new in Bootstrap v5. As the UI is still using bootstrap v4 the .ratio helper is not available yet.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsit is working on Bootstrap 5: #1378

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have opened a PR following the recommended approach #1437

)}
</>
);
Expand Down