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.
</div>
)}
{this.state.expanded && post.embed_video_url && (
- <iframe
- className="post-metadata-iframe"
- src={post.embed_video_url}
- ></iframe>
+ <div className="ratio ratio-16x9">
+ <iframe
+ allowFullScreen
+ className="post-metadata-iframe"
+ src={post.embed_video_url}
+ title={post.embed_title}
+ ></iframe>
+ </div>
)}
</>
);