From 9858514bb4605070096637e87a8109bceb0d6d85 Mon Sep 17 00:00:00 2001 From: David Palmer Date: Wed, 21 Jun 2023 16:15:02 +1200 Subject: [PATCH 1/3] 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. --- src/shared/components/post/metadata-card.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/shared/components/post/metadata-card.tsx b/src/shared/components/post/metadata-card.tsx index e6a864af..3c6f6bbb 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 && ( - +
+ +
)} ); From c16c00db0dffbe9503c3c61cb8067614f8424549 Mon Sep 17 00:00:00 2001 From: David Palmer Date: Wed, 21 Jun 2023 16:28:27 +1200 Subject: [PATCH 2/3] add a prefix to hint to screenreaders what this iframe is --- src/shared/components/post/metadata-card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/post/metadata-card.tsx b/src/shared/components/post/metadata-card.tsx index 3c6f6bbb..80ce173b 100644 --- a/src/shared/components/post/metadata-card.tsx +++ b/src/shared/components/post/metadata-card.tsx @@ -80,7 +80,7 @@ export class MetadataCard extends Component< allowFullScreen className="post-metadata-iframe" src={post.embed_video_url} - title={post.embed_title} + title={"Embedded Video: " + post.embed_title} > )} From 924e6706993c5d291aa9f269ad933d83da4a4147 Mon Sep 17 00:00:00 2001 From: David Palmer Date: Thu, 22 Jun 2023 12:23:36 +1200 Subject: [PATCH 3/3] remove embed prefix until a translation can be added --- src/shared/components/post/metadata-card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/post/metadata-card.tsx b/src/shared/components/post/metadata-card.tsx index 0b28b28f..bc6576a4 100644 --- a/src/shared/components/post/metadata-card.tsx +++ b/src/shared/components/post/metadata-card.tsx @@ -80,7 +80,7 @@ export class MetadataCard extends Component< allowFullScreen className="post-metadata-iframe" src={post.embed_video_url} - title={"Embedded Video: " + post.embed_title} + title={post.embed_title} > )}