From: David Palmer Date: Wed, 21 Jun 2023 04:15:02 +0000 (+1200) Subject: wrap video embeds in the ratio container X-Git-Url: http://these/git/readmes/%7B%60%24%7BarchiveTodayUrl%7D/%7BcanonicalUrl%7D?a=commitdiff_plain;h=9858514bb4605070096637e87a8109bceb0d6d85;p=lemmy-ui.git wrap video embeds in the ratio container This should correctly size the embedded video iframe to the full available width, which looks better and is compatible with mobile devices. Also add the "allowfullscreen" modifier to the iframe so that the video can be expanded to the browser's fullscreen mode. Also add the post.embed_title as the iframe "title" attribute. --- diff --git a/src/shared/components/post/metadata-card.tsx b/src/shared/components/post/metadata-card.tsx index e6a864a..3c6f6bb 100644 --- a/src/shared/components/post/metadata-card.tsx +++ b/src/shared/components/post/metadata-card.tsx @@ -75,10 +75,14 @@ export class MetadataCard extends Component< )} {this.state.expanded && post.embed_video_url && ( - +
+ +
)} );